Giter Club home page Giter Club logo

sonar-scala's Introduction

sonar-scala

sonatype-badge bintray-badge-lts bintray-badge-lts-79 bintray-badge-lts-67 gitter-badge

A free and open-source SonarQube plugin for static code analysis of Scala projects.

sonar-scala is an independent SonarQube plugin, driven by and developed with :heart: by the community.

Intended for SonarQube 9.4, SonarQube 8.9 LTS, SonarQube 7.9 LTS, SonarQube 6.7 LTS and Scala 2.11/2.12/2.13.

sonar-scala is developed in Scala. It uses the scalariform library to parse the source code and integrates with Scoverage (code coverage), Scalastyle and Scapegoat (static code analysis). It also provides pull request decoration functionality, which can review pull requests on Github and make comments on new issues directly in the pull request instead of reporting them to SonarQube.

Running analysis from a Windows machine is currently not supported - please use Linux or other Unix-like operating system.

Documentation

See the project website sonar-scala.com for documentation.

Development

To build the project from sources, run the assembly task in sbt shell and the jar assembled with all of the dependencies required by this plugin should be created in the target/scala-2.13 directory.

To debug the plugin, export the following environment variable before running sonar-scanner for your project:

export SONAR_SCANNER_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000"

Once you've done that, sonar-scanner should display the following message Listening for transport dt_socket at address: 8000. You can now attach your IDE to the process on port 8000, set breakpoints and debug the code.

Credits

This project is a continuation of the sonar-scala plugin, which was initially developed by Sagacify.

Many other projects have been used as an inspiration, here is a list of the main ones:

Changelog

For a full list of changes and releases, please see Changelog.

License

The project is licensed under the GNU LGPL v3. See the LICENSE file for more details.

sonar-scala's People

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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sonar-scala's Issues

Windows support

The plugin should work if an analysis is executed from a Windows machine.
For now the only blocker for this is the Scoverage module, more precisely the filename matching process. Reason why it would be better not try to address this until #64 is done.

Note: this is not as priority as other issues at the moment. (e.g. #41, #64, #8).

Add Scala Syntax Highlight

Probably don't add too much value (therefore not so priority). But is somewhat sad not having it.

By looking at this. It seems that is not so difficult to add it, and probably scalariform already does all the hard work for us.

SonarQube crashes

Hello,
I downloaded the latest .jar and added it to the extensions/plugins folder. When I restarted the SonarQube it fails to load.

Please help.

SonarQube version - 6.7.1 (build 35068)

when this .jar is removed from extensions/plugins folder, Sonar works fine.

Change the Scoverage report key

As discussed in #34, we should add support for the new Key (sonar.scala.scoverage.reportPath) while maintaining the support for the old one (sonar.scoverage.reportPath) but adding a deprecation warning, and finally drop the support for the old one when addressing #11.

Create a project microsite

It would be good to have a microsite with detailed instructions on how to set everything up, how to use and configure the plugin, how to set up quality profiles with sonar-scala rules etc.

Scapegoat support

Here is a task list with high-level items so we can keep track of implementation progress:

Here is an example of an existing Scapegoat plugin https://github.com/arthepsy/sonar-scala-extra.

Equivalent of SonarJava's "@Deprecated code should not be used" rule

Is there an equivalent of SonarJava's ""deprecated code should not be used"?

We want it to show up in sonar as a violation, so developers will notice it. However, we can't seem to find a similar rule both in Scalastyle and Scapegoat.

Posted the same question to Scalastyle github, but it seems pretty inactive.

SonarQube API deprecations

Migrate away from deprecated apis.

  • variable DOMAIN_TESTS in object CoreMetrics is deprecated
  • trait Sensor in package batch is deprecated
  • trait CoverageExtension in package batch is deprecated
  • trait SensorContext in package batch is deprecated
  • trait RuleFinder in package rules is deprecated
  • trait ResourcePerspectives in package component is deprecated
  • class Settings in package config is deprecated
  • class Project in package resources is deprecated
  • class Measure in package measures is deprecated
  • class ProfileDefinition in package profiles is deprecated
  • class Resource in package resources is deprecated
  • method getMeasure in trait SensorContext is deprecated
  • method inputDir in trait FileSystem is deprecated
  • method files in trait FileSystem is deprecated
  • method message in trait IssueBuilder is deprecated
  • method line in trait IssueBuilder is deprecated

Wartremover support

It looks like Wartremover doesn't generate any report which could be imported to SonarQube, therefore support for Wartremover might not be currently possible.

I raised the following issue to find out more about the support for report generation: wartremover/wartremover#419.

Filename mismatch in scoverage.xml vs. what ScoverageSensor.getModuleSourceFiles() returns

In my project, ScoverageSensor.getModuleSourceFiles() includes "src/main/scala" and filename attributes in scoverage.xml do not. This means that ScoverageSensor reports that there is no coverage information for all files.

Is there a configuration I'm missing to strip or add this part of the path from the reporting?

I'm running through maven with the sonar maven plugin.

Add Scapegoat to example projects

This probably only applies to the sbt projects, although it might be possible to get it also working with Maven. I'm not sure if there is a way to run Scapegoat with Gradle projects.

Coverage measure for custom coverage metrics should not be saved directly by a Sensor

The following deprecation warnings are shown when running sonar analysis:

WARN: Coverage measure for metric 'lines_to_cover' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
WARN: Coverage measure for metric 'uncovered_lines' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.
WARN: Coverage measure for metric 'coverage_line_hits_data' should not be saved directly by a Sensor. Plugin should be updated to use SensorContext::newCoverage instead.

Use the semantic versioning scheme when parsing Scala version

Currently, the way the Scoverage sensor parses Scala version in ScoverageSensorInternal.getDefaultScoverageReportPathrequires the major, minor, and the patch versions to be present and it will fail in cases where either the user doesn't specify a patch version or, for some reasons, the patch version includes more than one identifier (subversions), which is allowed by semver e.g. 2.12, 2.12.0-alpha.1, 1.0.0-0.3.7, 1.0.0-x.7.z.92 etc.

We should parse the version so that only the major and minor versions are mandatory and the patch version is optional, e.g. 2.11, 2.12 should be allowed.

scoverage plugin not working

Hi @mwz,

As I mentioned in Sagacify/sonar-scala#8 the scoverage plugin is not working for me, I had created a dummy project to reproduce the problem. (BalmungSan/SonarScala-Scoverage-Test).

I scan the project using the following command in the sbt shell, ";coverageOn;clean;test;coverageReport;scapegoat;sonarScan;coverageOff".

But, this is what is show in the sonar web page.
image
And there is no "coverage" measure for the project.
image

Refactor the class DirOrFile

The DirOrFile class located in the XmlScoverageReportConstructingParser.scala file should be refactored to either be fully immutable or not being a case class.

Also the class has the following associated warning: "The outer reference in this type test cannot be checked at run time." that should be addressed. I think that after refactoring the class this warning should disappear.

Adding a custom rule

Hi,

I have added a custom rule. Please see below.

image

When I do the scan this rule is not working (I have hardcoded IP address in my code). Can you please help.

Add Artima SuperSafe plugin

We should add the Artima SuperSafe scala compiler, to ensure the tests written with ScalaTest are completely typesafe.

For reference see this

Scala Test Count is not reported

Scalatest produces "junit xml" files describing the test class, test name, and duration of the test. For a java project, Sonar will read this file and update the "Unit Test Count." This plugin does not provide a way to read in these junit xml files. Other sonar-scala plugins (https://github.com/RadoBuransky/sonar-scala/blob/master/src/main/java/org/sonar/plugins/scala/surefire/SurefireSensor.java) do provide this via the property

sonar.junit.reportPaths=build/test-results/

Is there a way to already do this that I don't see? (if so, please point me to the docs)
If not, can mwz/sonar-scala incorporate this type of sensor?

ERROR - Got exception message from Scalastyle

Hi, we are using sonar-scala with our SonarQube server and TeamCity build server.

In TeamCity we have a build step which runs SonarQube checks.

We get an error in ScalaSensor for ScalaStyle checks:
[11:06:58][Step 4/4] 10:06:59.518 ERROR - Got exception message from Scalastyle. Check you have valid parameters configured for all rules. Exception message was: illegal start of simple expression: Token(RPAREN,),4366,))

The code, tests and coverage all run without problems.

I did run the SonarQube checks with verbose output but this still does not help me to find the problem.

This is the abbreviated log from TeamCity

[11:06:38]Step 4/4: SonarQube Runner (25s)
[11:06:38][Step 4/4] Starting SQR in D:\BuildAgent.1\plugins\sonar-plugin-agent\sonar-qube-runner\bin\sonar-runner.bat
[11:06:38][Step 4/4] -Dproject.home=.
[11:06:38][Step 4/4] -Dsonar.host.url=http://sonarqube.rwe.com:9000
[11:06:38][Step 4/4] -Dsonar.projectKey=CaoGasCe_GsaPlatformNew_TopGun
[11:06:38][Step 4/4] -Dsonar.projectName=TopGun
[11:06:38][Step 4/4] -Dsonar.projectVersion=0.6.0.53
[11:06:38][Step 4/4] -Dsonar.sources=src/main
[11:06:38][Step 4/4] -Dsonar.tests=src/test
[11:06:38][Step 4/4] -Dsonar.binaries=target/scala-2.12/classes
[11:06:38][Step 4/4] -Dsonar.java.binaries=target/scala-2.12/classes266b2cbac87a3f7
[11:06:38][Step 4/4] -Dsonar.sourceEncoding=UTF-8
[11:06:38][Step 4/4] -Dsonar.scala.version=2.12.5
[11:06:38][Step 4/4] -Dsonar.scoverage.reportPath=target/scala-2.12/scoverage-report/scoverage.xml
[11:06:38][Step 4/4] -Dsonar.verbose=true
[11:06:39][Step 4/4] SonarQube Runner 2.4
[11:06:39][Step 4/4] Java 1.8.0_151 Oracle Corporation (64-bit)
[11:06:39][Step 4/4] INFO: SonarQube Server 6.7.2.37468
[11:06:42][Step 4/4] 10:06:43.434 INFO  - Publish mode
[11:06:43][Step 4/4] 10:06:45.033 INFO  - Load global settings
[11:06:44][Step 4/4] 10:06:45.394 INFO  - Load global settings (done) | time=362ms
[11:06:44][Step 4/4] 10:06:45.455 INFO  - User cache: C:\Users\SRV_RWEST_TC_BUILD\.sonar\cache
[11:06:44][Step 4/4] 10:06:46.108 INFO  - Load plugins index
[11:06:44][Step 4/4] 10:06:46.286 INFO  - Load plugins index (done) | time=178ms
[11:06:44][Step 4/4] 10:06:46.286 DEBUG - Load plugins
[11:06:45][Step 4/4] 10:06:46.446 DEBUG - Download plugin sonar-scala_2.12-6.2.0-assembly.jar to C:\Users\SRV_RWEST_TC_BUILD\.sonar\cache\_tmp\fileCache5878176986894495384.tmp
[11:06:45][Step 4/4] 10:06:46.458 DEBUG - GET 200 http://sonarqube.rwe.com:9000/deploy/plugins/scala/sonar-scala_2.12-6.2.0-assembly.jar | time=12ms
[11:06:46][Step 4/4] 10:06:48.078 DEBUG - Load plugins (done) | time=1792ms
[11:06:47][Step 4/4] 10:06:48.517 DEBUG - Plugins:
[11:06:47][Step 4/4] 10:06:48.517 DEBUG -   * GitHub 1.4.2.1027 (github)
[11:06:47][Step 4/4] 10:06:48.517 DEBUG -   * SonarPython 1.9.1.2080 (python)
[11:06:47][Step 4/4] 10:06:48.518 DEBUG -   * Scala 6.2.0 (scala)
[11:06:47][Step 4/4] 10:06:48.518 DEBUG -   * Svn 1.7.0.1017 (scmsvn)
[11:06:47][Step 4/4] 10:06:48.518 DEBUG -   * SonarJS 4.1.0.6085 (javascript)
[11:06:47][Step 4/4] 10:06:48.518 DEBUG -   * SonarC# 7.0.1.4822 (csharp)
[11:06:47][Step 4/4] 10:06:48.518 DEBUG -   * SonarJava 5.3.0.13828 (java)
[11:06:47][Step 4/4] 10:06:48.518 DEBUG -   * LDAP 2.2.0.608 (ldap)
[11:06:47][Step 4/4] 10:06:48.520 DEBUG -   * SonarWeb 2.6.0.1053 (web)
[11:06:47][Step 4/4] 10:06:48.520 DEBUG -   * Git 1.4.0.1037 (scmgit)
[11:06:47][Step 4/4] 10:06:48.521 DEBUG -   * SonarFlex 2.4.0.1222 (flex)
[11:06:47][Step 4/4] 10:06:48.521 DEBUG -   * SonarXML 1.5.0.1373 (xml)
[11:06:47][Step 4/4] 10:06:48.521 DEBUG -   * SonarPHP 2.12.1.3018 (php)
[11:06:47][Step 4/4] 10:06:48.521 DEBUG -   * SonarTS 1.6.0.2388 (typescript)
[11:06:47][Step 4/4] 10:06:48.521 DEBUG -   * SVG Badges 2.0.1 (status)
[11:06:50][Step 4/4] 10:06:51.471 INFO  - Process project properties
[11:06:50][Step 4/4] 10:06:51.500 INFO  - Load project repositories
[11:06:50][Step 4/4] 10:06:51.810 INFO  - Load project repositories (done) | time=310ms
[11:06:50][Step 4/4] 10:06:51.817 INFO  - Execute project builders
[11:06:50][Step 4/4] 10:06:51.818 INFO  - Execute project builders (done) | time=1ms
[11:06:50][Step 4/4] 10:06:52.088 DEBUG - Available languages:
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * Python => "py"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * Scala => "scala"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * JavaScript => "js"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * C# => "cs"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * Java => "java"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * Web => "web"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * Flex => "flex"
[11:06:50][Step 4/4] 10:06:52.088 DEBUG -   * XML => "xml"
[11:06:50][Step 4/4] 10:06:52.089 DEBUG -   * PHP => "php"
[11:06:50][Step 4/4] 10:06:52.089 DEBUG -   * TypeScript => "ts"
[11:06:50][Step 4/4] 10:06:52.118 INFO  - Load quality profiles
[11:06:50][Step 4/4] 10:06:52.268 INFO  - Load quality profiles (done) | time=150ms
[11:06:50][Step 4/4] 10:06:52.375 INFO  - Load active rules
[11:06:51][Step 4/4] 10:06:53.310 INFO  - Load active rules (done) | time=935ms
[11:06:51][Step 4/4] 10:06:53.318 INFO  - Load metrics repository
[11:06:52][Step 4/4] 10:06:53.421 INFO  - Load metrics repository (done) | time=103ms
[11:06:52][Step 4/4] 10:06:53.584 INFO  - Project key: CaoGasCe_GsaPlatformNew_TopGun
[11:06:52][Step 4/4] 10:06:53.585 INFO  - -------------  Scan TopGun
[11:06:52][Step 4/4] 10:06:54.151 INFO  - Load server rules
[11:06:52][Step 4/4] 10:06:54.246 INFO  - Load server rules (done) | time=94ms
[11:06:52][Step 4/4] 10:06:54.317 INFO  - Base dir: D:\BuildAgent.1\work\topgun
[11:06:52][Step 4/4] 10:06:54.317 INFO  - Working dir: D:\BuildAgent.1\work\topgun\.sonar
[11:06:52][Step 4/4] 10:06:54.319 INFO  - Source paths: src/main
[11:06:52][Step 4/4] 10:06:54.319 INFO  - Test paths: src/test
[11:06:52][Step 4/4] 10:06:54.319 INFO  - Source encoding: UTF-8, default locale: en_GB
[11:06:53][Step 4/4] 10:06:54.755 INFO  - Index files
[11:06:53][Step 4/4] 10:06:54.950 INFO  - 40 files indexed
[11:06:53][Step 4/4] 10:06:54.953 INFO  - Quality profile for js: Sonar way
[11:06:53][Step 4/4] 10:06:54.953 INFO  - Quality profile for scala: Scalastyle
[11:06:53][Step 4/4] 10:06:54.953 INFO  - Quality profile for xml: Sonar way
[11:06:56][Step 4/4] 10:06:57.792 DEBUG - Sensors : com.ncredinburgh.sonar.scalastyle.ScalastyleSensor@f5bf288 -> Scala Sensor -> Scoverage Sensor -> SonarJS -> SonarJS Coverage -> SonarJavaXmlFileSensor -> XML Sensor -> Zero Coverage Sensor -> CPD Block Indexer
[11:06:56][Step 4/4] 10:06:57.793 INFO  - Sensor com.ncredinburgh.sonar.scalastyle.ScalastyleSensor [scala]
[11:06:56][Step 4/4] 10:06:57.901 DEBUG - Using config ScalastyleConfiguration(sonar,true,List(ConfigurationChecker(org.scalastyle.scalariform.EqualsHashCodeChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.EqualsHashCodeChecker),None,Some(scalastyle_EqualsHashCodeChecker)), ConfigurationChecker(org.scalastyle.scalariform.StructuralTypeChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.StructuralTypeChecker),None,Some(scalastyle_StructuralTypeChecker)), ConfigurationChecker(org.scalastyle.scalariform.ForBraceChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.ForBraceChecker),None,Some(scalastyle_ForBraceChecker)), ConfigurationChecker(org.scalastyle.scalariform.NoCloneChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.NoCloneChecker),None,Some(scalastyle_NoCloneChecker)), ConfigurationChecker(org.scalastyle.file.FileTabChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.file.FileTabChecker),None,Some(scalastyle_FileTabChecker)), ConfigurationChecker(org.scalastyle.scalariform.SpacesBeforePlusChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.SpacesBeforePlusChecker),None,Some(scalastyle_SpacesBeforePlusChecker)), ConfigurationChecker(org.scalastyle.scalariform.SpacesAfterPlusChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.SpacesAfterPlusChecker),None,Some(scalastyle_SpacesAfterPlusChecker)), ConfigurationChecker(org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.NoWhitespaceBeforeLeftBracketChecker),None,Some(scalastyle_NoWhitespaceBeforeLeftBracketChecker)), ConfigurationChecker(org.scalastyle.scalariform.UppercaseLChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.UppercaseLChecker),None,Some(scalastyle_UppercaseLChecker)), ConfigurationChecker(org.scalastyle.scalariform.NoFinalizeChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.NoFinalizeChecker),None,Some(scalastyle_NoFinalizeChecker)), ConfigurationChecker(org.scalastyle.scalariform.SpaceAfterCommentStartChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.SpaceAfterCommentStartChecker),None,Some(scalastyle_SpaceAfterCommentStartChecker)), ConfigurationChecker(org.scalastyle.file.NewLineAtEofChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.file.NewLineAtEofChecker),None,Some(scalastyle_NewLineAtEofChecker)), ConfigurationChecker(org.scalastyle.scalariform.CovariantEqualsChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.CovariantEqualsChecker),None,Some(scalastyle_CovariantEqualsChecker)), ConfigurationChecker(org.scalastyle.scalariform.SimplifyBooleanExpressionChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.SimplifyBooleanExpressionChecker),None,Some(scalastyle_SimplifyBooleanExpressionChecker)), ConfigurationChecker(org.scalastyle.scalariform.ReturnChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.ReturnChecker),None,Some(scalastyle_ReturnChecker)), ConfigurationChecker(org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.NoWhitespaceAfterLeftBracketChecker),None,Some(scalastyle_NoWhitespaceAfterLeftBracketChecker)), ConfigurationChecker(org.scalastyle.scalariform.NotImplementedErrorUsage,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.NotImplementedErrorUsage),None,Some(scalastyle_NotImplementedErrorUsage)), ConfigurationChecker(org.scalastyle.scalariform.NoWhitespaceBeforeRightBracketChecker,ErrorLevel,true,Map(scalastyle-checker -> org.scalastyle.scalariform.NoWhitespaceBeforeRightBracketChecker),None,Some(scalastyle_NoWhitespaceBeforeRightBracketChecker))))
[11:06:58][Step 4/4] 10:06:59.518 ERROR - Got exception message from Scalastyle. Check you have valid parameters configured for all rules. Exception message was: illegal start of simple expression: Token(RPAREN,),4366,))
[11:06:58][Step 4/4] 10:06:59.518 INFO  - Sensor com.ncredinburgh.sonar.scalastyle.ScalastyleSensor [scala] (done) | time=1725ms
[11:06:58][Step 4/4] 10:06:59.518 INFO  - Sensor Scala Sensor [scala]
[11:06:58][Step 4/4] 10:06:59.712 INFO  - Sensor Scala Sensor [scala] (done) | time=194ms

The file has no scoverage information associated with it.

We're using version 6.2.0 of the plugin, but when running the sonarqube task from Gradle it seems that it somehow fails to parse the scoverage.xml report, even though it finds it and loads it successfully.

These are the errors I am seeing:

[scoverage] Initializing the scoverage sensor.
[scoverage] Successfully loaded the scoverage report file: 'C:\Users\dmarkhas\IdeaProjects\sdk-base\build\reports\scoverage\scoverage.xml'.
[scoverage] The file: 'src/main/scala/com/intel/daas/sdk/Launcher.scala' has no scoverage information associated with it.
[scoverage] The file: 'src/main/scala/com/intel/daas/sdk/application/AbstractSparkApplication.scala' has no scoverage information associated with it.
[scoverage] The file: 'src/main/scala/com/intel/daas/sdk/application/ApplicationContext.scala' has no scoverage information associated with it.

I saw #51 but in this case the filenames match exactly the filenames in the xml report so I'm not sure what's wrong. I've attached the scoverage report (had to rename from .xml to .txt for GitHub) - anything obvious I am missing perhaps?

scoverage.txt

Releases does not include built artifact

The README.md states there should be an artifact on the github releases page. There is not.

So either the README.md is out of date, or the CI system is not correctly uploading all your files.

(I opened a pull request giving basic build instructions in case you don't want to provide downloadable jars)

Adding Cats

The Cats library could helps to simplify some parts of our code and allow us to stay functional.

The point of this issue is to identify all places where Cats should be used, to raise a PR making all those changes at once.

Set up sonar-scala recommended quality profile

Here is a list of Scapegoat and Scalastyle rules that we disabled or changed the severity for in the public SonarQube instance, so we could use it as a reference.

disabled:

  • common-scala:InsufficientCommentDensity - Source files should have a sufficient density of comment lines
  • scapegoat:com.sksamuel.scapegoat.inspections.unneccesary.UnnecessaryReturnUse - Checks for use of `return` keyword in blocks
  • scapegoat:com.sksamuel.scapegoat.inspections.imports.WildcardImport - Checks for wildcard imports
  • scapegoat:com.sksamuel.scapegoat.inspections.RedundantFinalModifierOnCaseClass - Redundant final modifier on case class - update: does not exist in the latest version of Scapegoat
  • Scalastyle:scalastyle_BlockImportChecker - Avoid block imports
  • Scalastyle:scalastyle_UnderscoreImportChecker - Avoid wildcard imports
  • Scalastyle:scalastyle_LowercasePatternMatchChecker - Lowercase pattern match
  • Scalastyle:scalastyle_NoNewLineAtEofChecker - No Newline at EOF
  • Scalastyle:scalastyle_PatternMatchAlignChecker - Pattern match align

changed severity:

  • Scalastyle:scalastyle_SpaceAfterCommentStartChecker - MINOR - Space after the start of the comment

This list doesn't include any changes to Scalastyle templates, but we'll update it once we review those as a part of #35.

Github Coverage plugin

The existing SonarQube Github plugin reports only on issues found in a pull request, but it doesn't report any coverage changes that were introduced by the new code.
It would be great to have some coverage feedback on opened PRs, similarly to the way how codecov integrates with Github, see an example.

This functionality should probably sit in a separate plugin, but I thought I'd open a new issue here just to kick off some discussion.

Fix all Scalastyle+Scapegoat errors

See this

The idea is to address all those errors, or at least the majority of them.
For the moment I will wait until @mwz update the sonar rules and scan the project again, so we can work on the real set of errors.
Also I suppose you will add the sonar scanner as a step in the PR CI pipeline, so we can track our progress as we push commits.

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.