sagacify / sonar-scala Goto Github PK
View Code? Open in Web Editor NEWSonarqube plugin for scala analysis
License: GNU Lesser General Public License v3.0
Sonarqube plugin for scala analysis
License: GNU Lesser General Public License v3.0
I believe that, at least with the multi module maven example, there is something wrong. When I execute mvn clean install
I end up with scoverage-module1-1.0.0.jar
and not module1-1.0.0.jar
so I guess this is either the instrumented version or the file suddenly has a wrong name.
Is this expected behavior? How do I get my production ready jars again?
...
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.
...
Sonar server version 6.7.1
Sonar scanner version 3.0.3.778
Sonar scala plugin version 0.0.3
It looks like the rules are always pulled from the default ScalaStyle config. It would be nice for the plugin to instead pull the config out of the project, for consistency between the CI and e.g. IDEs.
(yes, I realize that this project is a de-facto fork, but it's the one where everything appears to be working)
I downloaded sonar-scala-plugin-0.0.3.jar
into sonarqube-6.6/extensions/plugins
and try to run it from gitlab using the gitlab sonar plugin with:
mvn --batch-mode verify sonar:sonar -Dsonar.projectKey=myproject -Dsonar.host.url=$SONAR_URL
But I'm not seeing my scala project in sonar. Is there a step I'm missing? Here's the logs from sonar:
[INFO] Project key: myproject
[INFO] ------------- Scan compiler-templates
[INFO] Load server rules
[INFO] Load server rules (done) | time=19ms
[INFO] Base dir: /home/memqa/builds/d6cac072/0/dev/myproject
[INFO] Working dir: /home/projects/builds/d6cac072/0/dev/myproject/target/sonar
[INFO] Source paths: pom.xml
[INFO] Source encoding: UTF-8, default locale: en_US
[INFO] Index files
[INFO] 1 file indexed
[INFO] Quality profile for xml: Sonar way
[INFO] Sensor SonarJavaXmlFileSensor [java]
[INFO] 1 source files to be analyzed
[INFO] Sensor SonarJavaXmlFileSensor [java] (done) | time=333ms
[INFO] 1/1 source files have been analyzed
[INFO] Sensor XML Sensor [xml]
[INFO] Sensor XML Sensor [xml] (done) | time=75ms
[INFO] Sensor Analyzer for "php.ini" files [php]
[INFO] Sensor Analyzer for "php.ini" files [php] (done) | time=2ms
[INFO] Performing issue tracking
[INFO] 3/3 components tracked
[INFO] ANALYSIS SUCCESSFUL
[INFO] Executing post-job GitLab Commit Issue Publisher
[INFO] Report status=success, desc=SonarQube reported no issues
[INFO] Task total time: 2.420 s
it only sees a source path of pom.xml
...?
Is it possible to get this as one of the metrics the analysis performs? It seems like sonar doesn't support this since scala isn't one of the languages it directly integrates with.
Hello,
this is more question than issue as I am new to sonar with scala. While I was using java all just magically worked out of the box.
Code duplication measure doesn't work or it displays constantly 0.
I think that root cause is here:
INFO: Sensor CPD Block Indexer
INFO: DefaultCpdBlockIndexer is used for scala
INFO: Sensor CPD Block Indexer (done) | time=1ms
INFO: Calculating CPD for 0 files
Am I missing some configuration option here?
When using PMD CPD reports gets generated fine I just don't know if that gets uploaded to sonar.
Third party libraries - scalastyle and scoverage shouldn't be embedded into your library. I't harder to know what exact version is embedded and the upgrade process is not simple.
Instead add them as dependencies and embed them into target artifact using. You can do that in number of ways for ex.: http://maven.apache.org/plugins/maven-shade-plugin/index.html
The existing plugin only supports Sonarqube 5.4 series, can you please update this plugin to support Sonarqube v6.2.
Thanks,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.