Sonar Scalastyle Plugin
25 July 2014
Han Tuzun
Scalastyle
The style checker for Scala
Highly configurable
Implemented Rules
- simplify.boolean.expression
- file.size.limit
- line.size.limit
- line.contains.tab
- not.implemented.error.usage
- magic.number
- spaces.after.plus
- whitespace.end.of.line
- class.name
- object.name
- equals.hash.code
- illegal.imports
- no.whitespace.before.left.bracket
- no.finalize
- covariant.equals
- structural.type
- number.of.types
- cyclomatic.complexity
- if.brace
- method.length
- number.of.methods
- public.methods.have.type
- var.local
- if.redundant
- token
- deprecated.java
- empty.class
- class.type.parameter.name
- lowercase.pattern.match
- multiple.string.literals
- import.grouping
- procedure.declaration
- space.after.comment.start
SonarQube
A platform to manage code quality
A web application
Saves past reports

The Plugin!
Creates rules for SonarQube
Creates the default quality profile
Exports Scalastyle config xml files
Creates SonarQube issues
Development
SonarQube API 4.1 used
Abstract SonarPlugin extended
Extensions are plugged in
Written in Scala
Challenges
⇩ Poor API Documentation
⇩ Feedback from SonarQube
⇩ Dependency to the Scala Plugin
⇩ A small problem we faced while testing
Poor API Documentation

Dev Mail Group

Feedback from SonarQube

Dependency to the Scala Plugin

Instructions on GitHub
- Download and unzip SonarQube 4.4-RC3
- Download and unzip Sonar Runner
- Download the Sonar Scalastyle Plugin
- Copy the plugin to
extensions/plugins
- Start the SonarQube server
- Create a sonar-project.properties
- Run
sonar-runner
in your project's root directory - Check the report on http://localhost:9000/
Thanks
Get ฿0.001 per bug!
slides.com/emrehan/sonar-scalastyle
emrehan@vngrs.com
erol@vngrs.com
@EmrehanTuzun
Sonar Scalastyle Plugin
By Han Tuzun
Sonar Scalastyle Plugin
- 1,613