Giter Club home page Giter Club logo

sonar-scalastyle's Introduction

Build Status

Sonar Scalastyle Plugin

Wraps up Scalastyle as a SonarQube plugin. Currently scalastyle provides 60 different checks. They
are represented as 38 rules without parameters and 22 templates in SonarQube. Templates allow to instantiate the same check multiple times with different values. For example different regular expression rules with different severity levels.

http://www.scalastyle.org/

Instructions

  • Download and unzip SonarQube 4.5.5+
  • Download and unzip Sonar Runner.
  • Download the Sonar Scalastyle Plugin
  • Copy the plugin to extensions/plugins directory of SonarQube.
  • Start the SonarQube server by running the .sh/.bat script under sonarqube<version>/bin/<your os> directory
  • Create a sonar-project.properties file
  • Run sonar-runner in your project's root directory.
  • Check the report on http://localhost:9000/
  • You can log in with default username and password 'admin'.

intended for

Sonar 4.5.5+ ScalaStyle 0.7.0

sonar-scalastyle's People

Contributors

hantuzun avatar hcoles avatar michaelzinsmaier avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sonar-scalastyle's Issues

new features of latest commits?

Hi, I'm still using version 0.0.1 of Sonar Scalastyle Plugin. I've realized that there are new commits. Could you tell me what's new on it?. Currently with version 0.0.1 I miss interesting sections as 'Complexity' of function, class, file; differences on error types: Blocker, Critical, minor etc; tech debt etc

Will I have some of that features with new version?

Thank you

LOC Seems not to be working for .scala files

LOC metrics seem not to be working. I have a Spray app and it will count the .properties file towards LOC but not the .scala files. The normal "lines" count seems fine though.

Sonar-Scalastyle doesn't support sonarqube v6.2

We have been using this open source sonar-scala style plugin for Sonarqube 5.6 and we recently upgraded to Sonarqube v6.2 and indeed this plugin is unsupported.

Can you please update these plugin to support Sonarqube v6.2.

Any help is highly appreciated.

any unit test result referring to any scala test class (using scalatest) won't show in the sonar

I have issue for sonar to understand the test result from scalatest. And I found the following reference.
Do you have answer for it? For me, code coverage is fine the problem is only for unit test result from the test-results directory, where contains the result *.xml files. If the xml refer to a java class then is fine. If it points to a scalatest file then it won't show up.

How to make SonarQube analyzing SBT projects (with Java and Scala) and importing code coverage & unit test coverage?

Thanks
-cl

Sonar not pickup report

Hi,
I'm using a sonarqube 4.5.7 image, and I've installed the plugin. And I'm using ScalaStyle 0.7.0. In my project I execute:

$> ./sbt clean scalastyle

The target/scalastyle-result.xml is generated, and then I execute:

$> sonar-runner

The project appears on sonar, but no report in the style check.
Am I missing something?
Thanks in Advance

New custom scalastyle rule

We need to added a very simple custom scala rule to our sonar. Looking at Scalastyle - Custom rules, seems to be pretty straight forward to generate the custom jar.
The question is that what is the best way to feed this jar to sonar? Is it jam into the lib folder sonar-scalastyle-plugin-0.0.1-SNAPSHOT.jar ? Or there is much better way to do it?
Thanks

-cl

Sonar warning- Rule not found in Scalastyle repository! Rule won't be activated.

Hi,

i compiled the plugin and installed it on sonarqube, but i got a lot of warnings in the log.
it seems that many rules are not activated. Can you specify what should l i do to include them ?

the logs are shown below:

2016.08.28 13:33:36 INFO web[o.s.s.q.RegisterQualityProfiles] Register quality profiles 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.FileTabChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.FileLengthChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.HeaderMatchesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.SpacesAfterPlusChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.WhitespaceEndOfLineChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.SpacesBeforePlusChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.FileLineLengthChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.ClassNamesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.ObjectNamesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.PackageObjectNamesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.EqualsHashCodeChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.IllegalImportsChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.ParameterNumberChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.MagicNumberChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.ReturnChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.NullChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.NoCloneChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.CovariantEqualsChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.StructuralTypeChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.RegexChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.NumberOfTypesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.CyclomaticComplexityChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.IfBraceChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.MethodLengthChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.MethodNamesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.PublicMethodsHaveTypeChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.file.NewLineAtEofChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.NotImplementedErrorUsage not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.ProcedureDefinitionChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.ForBraceChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.SpaceAfterCommentStartChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.FieldNamesChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:36 WARN web[o.s.s.q.RegisterQualityProfiles] Rule for org.scalastyle.scalariform.TodoCommentChecker not found in Scalastyle repository! Rule won't be activated. 2016.08.28 13:33:37 INFO web[o.s.s.q.RegisterQualityProfiles] Register profile {lang=scala, name=Scalastyle} 2016.08.28 13:33:37 INFO web[o.s.s.q.RegisterQualityProfiles] Set default scala profile: Scalastyle 2016.08.28 13:33:37 DEBUG web[o.s.s.q.RegisterQualityProfiles] Register quality profiles (done) | time=1315ms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.