Giter VIP home page Giter VIP logo

sonar-groovy's Introduction

SonarQube plugin for Groovy

Build Status Quality Gate Status Coverage

Get test builds from GitHub Actions (click on a recent run and get the artifacts from the bottom of the page).

Status

Maintenance

WARNING: This project is currently unmaintained. If you want to take over maintainership, please contact me (see mail address in recent commits) and I'll arrrange a repository move and inform SonarSource about the new maintainer.

Description

This plugin enables analysis of Groovy within SonarQube.

It leverages CodeNarc to raise issues against coding rules and GMetrics for cyclomatic complexity.

For code coverage, the SonarQube JaCoCo plugin should be used. Additionally, this plugin still supports importing binary JaCoCo reports (deprecated, will be removed in the future) and Cobertura.

Plugin 1.4/1.5 1.6 1.7 1.8
CodeNarc 0.25.2 1.4 1.4 1.6.1
GMetrics 0.7 1.0 1.0 1.1
SonarQube 5.6-6.7 6.7-7.9 7.8-8.9 8.0-9.0

Steps to Analyze a Groovy Project

  1. Install SonarQube Server
  2. Install SonarQube Scanner and be sure you can call sonar-scanner from the directory where you have your source code
  3. Install the Groovy Plugin.
  4. Create a sonar-project.properties file at the root of your project
  5. Run sonar-scanner command from the project root dir
  6. Follow the link provided at the end of the analysis to browse your project's quality in SonarQube UI

Notes

CodeNarc: It is possible to reuse a previously generated report from CodeNarc by setting the sonar.groovy.codenarc.reportPaths property.

Groovy File Suffixes: It is possible to define multiple groovy file suffixes to be recognized by setting the sonar.groovy.file.suffixes property. Note that by default, only files having .groovy as extension will be analyzed.

Unit Tests Execution Reports: Import unit tests execution reports (JUnit XML format) by setting the sonar.junit.reportPaths property. Default location is target/surefire-reports.

JaCoCo and Binaries: The groovy plugin requires access to source binaries when analyzing JaCoCo reports. Consequently, property sonar.groovy.binaries has to be configured for the analysis (comma-separated paths to binary folders). For Maven and gradle projects, the property is automatically set.

Coverage Results Import

For coverage, it is recommended to use the generic SonarQube JaCoCo plugin instead of relying on this plugin to import coverage into SonarQube. Nevertheless, we support importing coverage from Cobertura (but this code path isn't used by the author of the plugin).

Code Coverage with Cobertura

To display code coverage data:

  1. Prior to the SonarQube analysis, execute your unit tests and generate the Cobertura XML report.
  2. Import this report while running the SonarQube analysis by setting the sonar.groovy.cobertura.reportPath property to the path to the Cobertura XML report. The path may be absolute or relative to the project base directory.

Contributions

Contributions via GitHub issues and pull requests are very welcome. This project tries to adhere to the Google Java Style, but we don't want a global reformat to keep the Git history readable. To help with this, we use the "ratchet" feature of spotless. If you get an error from spotless during build or CI, you can fix them with:

mvn spotless:apply

Updating CodeNarc

In the directory codenarc-converter there is a little helper tool to convert CodeNarc rules to SonarQube rules. To do its job it needs a source copy of CodeNarc - this is currently achieved by including the used CodeNarc version as a git subbmodule. If you need to update CodeNarc, you need to update that submodule too:

git submodule init
cd codenarc-converter/CodeNarc
git checkout vX.Y.Z
cd ..
git add CodeNarc

You should then run the codenarc-converter (Running mvn verify should be enough if the project is set up correctly) and merge descriptions from codenarc-converter/target/results/rules.xml into sonar-groovy-plugin/src/main/resources/org/sonar/plugins/groovy/rules.xml. The converter does a pretty crude job converting CodeNarc's APT documentation into SonarQube rule descriptions.

sonar-groovy's People

Contributors

appienvanveen avatar benzonico avatar ccfenner avatar dbolkensteyn avatar dependabot[bot] avatar dgageot avatar drautureau-sonarsource avatar ehartmann avatar ganncamp avatar gaudol avatar godin avatar goober avatar henryju avatar hydragyrum avatar itbalaji avatar iwarapter avatar mpaladin avatar musketyr avatar pascalporta444 avatar rdmueller avatar simonbrandhof avatar tobix avatar tomverin avatar wohops 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  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

sonar-groovy's Issues

Remove 'test_success_density' metric

SonarQube warns:

[WARNING] Metric 'test_success_density' is an internal metric computed by SonarQube/SonarCloud. Provided value is ignored.

This has been deprecated since at least SonarQube 6 ๐Ÿงน

import statements being tagged as duplicate code blocks

Hi,

I have some Groovy code, and I can see that imports are being marked as duplicated (see attached image). Highlighted by the grey bar down the right hand side.
sonar-duplicate-detection-imports - blurred

I was wondering is there any method of configuring duplicate block detection?
(preferably to ignore import statements for duplicate block detection)

Would appreciate any advice on the matter.
Cheers

Update plugin properties to declare them as multi-values property

SonarQube LTS 8.9.0
sonar-groovy-plugin-1.7

Plugin is throwing the following WARNING:

WARN: Property 'sonar.groovy.file.suffixes' is not declared as multi-values/property set but was read using 'getStringArray' method. The SonarQube plugin declaring this property should be updated.

As a result of SonarQube plugin API change, I believe file:
sonar-groovy-plugin/src/main/java/org/sonar/plugins/groovy/GroovyPlugin.java
needs to be updated to include: .multiValues(true)

See similar change for dotnet plugin.
And similar change for Cxx-plugin

This warning is an annoyance as it's an issue thrown by SonarQube in relation to the plugin, yet is displayed to the users who have no idea what it's about.

Groovy Version Management

This is more just a document of findings around groovy versioning management.

  • We were originally using groovy 2.4.11 and the old sonar plugin 1.5 and sonar code reports showed covered lines and uncovered lines all detected as expected.

  • Switched to groovy 2.4.17 and stayed on the old 1,5 plugin resulted in weird behaviour. Lines impossible to cover being flagged as uncovered and code that should be covered being uncovered.

  • Switched to 2.4.17 and the new 1.6 plugin resulted in coverage report returning to sanity.

This may have been caused by underlying groovy bugs that have been fixed between versions, but it kinda suggests we may need an option to specify/set the version of groovy sonar uses dynamically as being out of sync can result in unusual behaviour.

This might also be why the new jacoco plugin from sonar looks at the xml reports rather than exec files as the report will always be static.

Re-house plugin at binaries.sonarsource

I work in a fairly locked-down network, which makes it troublesome to access external packages. Our main access method is the use of proxies, of which our sonar one points to https://binaries.sonarsource.com/. The latest plugin available within this proxy-able location is 1.4.

I wondered whether it might be possible to resume uploading versions of this plugin to that location? It's possible for me to workaround the network and manually bring it in with my own scans, etc., but the addition of this plugin back to these sort of official repos might aid those such as myself who work in restricted environments.

I'd guess that there might be some credentials needed to upload this plugin to binaries.sonarsource, which sonar would be understandably reluctant to make available. However, I feel that given this is the official plugin as listed on their marketplace for Groovy/Sonar interaction, the plugin should be made available in a more official manner.

Including tests as source

(Using sonar-groovy 1.4 and Sonarqube 7.9)

It appears that the plugin has no rules applied to test cases when using sonar property sonar.tests (If it does then we consider it too few rules for our liking, as we have never hit a violation in this circumstance)

Instead we include test cases as sonar.sources, which, of course, brings some new problems.

There is an issue in the previous maintainer's sonar-groovy project about this, which shows others are including tests as source:
pmayweg/sonar-groovy#89

Sonarqube itself seems to have little to no functionality or information what rules are applied against tests vs sources so I presume this distinction is up to the various language plugins?

If I could wish for the functionality, I would wish it to be based on the label applied to the rule (as this is under user control, however I suspect labels are for display filtering only and don't work this way)

I did notice however that in some of the descriptions of the rules, for example "InstanceofRule" there is text such as this:
By default, the rule does not analyze test files. This rule sets the default value of the doNotApplyToFilesMatching property to ignore file names ending in 'Spec.groovy', 'Test.groovy', 'Tests.groovy' or 'TestCase.groovy'.

Since the file where I hit this violation ends with "Spec.groovy", I am curious if there is any user-level control over this parameter that I can exercise to disable certain rules for test cases?

SonarQube 9.0 fails to load sonar-groovy with NoClassDefFoundError: org/sonar/api/profiles/ProfileDefinition

After upgrading to SonarQube 9.0 i had to remove the sonar-groovy plugin because of the following error during startup:

java.lang.IllegalStateException: Fail to load plugin Groovy [groovy]
    at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:77)
    at org.sonar.server.platform.platformlevel.PlatformLevel4.start(PlatformLevel4.java:575)
    at org.sonar.server.platform.PlatformImpl.start(PlatformImpl.java:213)
    at org.sonar.server.platform.PlatformImpl.startLevel34Containers(PlatformImpl.java:187)
    at org.sonar.server.platform.PlatformImpl$1.lambda$doRun$0(PlatformImpl.java:120)
    at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.runIfNotAborted(PlatformImpl.java:370)
    at org.sonar.server.platform.PlatformImpl$1.doRun(PlatformImpl.java:120)
    at org.sonar.server.platform.PlatformImpl$AutoStarterRunnable.run(PlatformImpl.java:354)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: org/sonar/api/profiles/ProfileDefinition
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
    at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.base/java.net.URLClassLoader.defineClass(Unknown Source)
    at java.base/java.net.URLClassLoader$1.run(Unknown Source)
    at java.base/java.net.URLClassLoader$1.run(Unknown Source)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URLClassLoader.findClass(Unknown Source)
    at org.sonar.classloader.ClassRealm.loadClassFromSelf(ClassRealm.java:125)
    at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:37)
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
    at org.sonar.plugins.groovy.GroovyPlugin.define(GroovyPlugin.java:99)
    at org.sonar.server.plugins.ServerExtensionInstaller.installExtensions(ServerExtensionInstaller.java:67)
    ... 8 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.sonar.api.profiles.ProfileDefinition
    at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39)
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87)
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76)
    ... 22 common frames omitted

Had version 1.6 installed and also tried it with 1.7. Let me know if I can help..?

PS: see also at https://community.sonarsource.com/t/sq-crashes-after-upgrade-to-v9/45928/11

Running with 'sonar.groovy.jacoco.reportPath' configured produces error - 'expected one element but was...'

We are on Sonarqube v7.6 and I installed the sonar-groovy 1.6 plugin last week.

The first time I ran a build utilizing this I did not configure the 'sonar.groovy.jacoco.reportPath' property and everything ran fine (I can see .groovy files in Sonar, new issues were created, etc).

I then configured 'sonar.groovy.jacoco.reportPath' to point to an .exec file and the job errored out with the following message:
expected one element but was: <WEB-INF/classes/com/companyName/productName/fileName.groovy, WEB-INF/src/com/companyName/productName/fileName.groovy>

I did configure 'sonar.groovy.jacoco.reportPath' with the same file I use when configuring the 'sonar.jacoco.reportPaths' property (which itself works fine and shows coverage information for Java files within sonar).

Did I maybe miss some other configuration or is it possible that the plugin should be updated to handle this scenario, like what was noted at: willemsrb/sonar-jdepend-plugin#6 (comment)

Thanks

Plugin produces 3 false positive for each test method in Spock Tests

note: this is a copy of an issue I've written at the old sonar groovy plugin. As it is stalled and my company migrated to this one, I just copied the text here. I guess the rule names are the same. If not, pls notice me so that I can update the description: pmayweg/sonar-groovy#89

We use the plugin mainly for our tests which are written in the awesome spock framework.

However, we noticed that at least three rules are applied to the test method name that don't make any sense in the context of a test method:

  • grvy:org.codenarc.rule.convention.NoDefRule
  • grvy:org.codenarc.rule.naming.MethodNameRule.fixed
  • grvy:org.codenarc.rule.junit.JUnitPublicNonTestMethodRule

Here is some sample code that produces those issues

@SpringBootTest
class EndpointHealthCheckIntegrationTest extends Specification {
  @Autowired
  private EndpointHealthCheck healthCheck

  def "endpoint is up and running"() {
    when: 'health is queried'
    Health health = healthCheck.health().block()
    then: 'status should be up'
    health.status == Status.UP
  }
}

I resolve those issues as false positives and have to do it for every test method which is kinda annoying. On a side note, the def setup() and def tearDown() methods from Spock produce the NoDef-Rule violation as well, but they are much less annoying, as they are only rarely necessary (as opposed to a test class with usually 5-10 tests).

  • the convention for spock test methods is to use def and write a meaningful name (as GString) instead of a JUnit-style identifier
  • the JUnit rule is applied to this kind of tests (I guess because Spock uses JUnit in the background). It clearly can't identify the method as a test and tells me that all methods but tests should not be public.

Roadmap for SonarQube plugin marketplace registration

Hi,
Thanks for forking this plugin.
We're using SonarQube via docker and are awaiting the availability of the sonar-groovy plugin reboot in the marketplace before bumping the SonarQube version to latest.
Is there a plan to submit the plugin to the marketplace with the previous plugin's signature?

Test method/class name exceeding maximum lengths when test results are being processed.

Users are running into hard limits on filename/test method name length when test results are being processed by this plugin. Can this limit be increased?

Example error with paths removed is below.

2021-11-21T21:58:03.356-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: Fail to parse the Surefire report:
2021-11-21T21:58:03.356-0600 [ERROR] [org.gradle.internal.buildevents.BuildExceptionReporter] Caused by: javax.xml.stream.XMLStreamException: Maximum attribute size limit (524288) exceeded

Scanner does not populate Codenarc Rules

I am currently setting up SonarQube for a Grails 3 application and have everything up and running except for displaying the Codenarc rules. I have installed the groovy plugin for SonarQube and it is linked to the correct file for reporting the Codenarc results. Additionally, I added all the additional rules it notified me in the scan so I know they are being analyzed. I am currently getting 0 bugs, vulnerabilities, or code smells. Below you can see the logs when I use sonar-scanner -X.

DEBUG: Sensors : CodeNarc -> GroovySensor -> GroovySurefireSensor -> Groovy CoberturaSensor -> Groovy JaCoCo Coverage -> JavaXmlSensor -> SonarCSS Rules -> HTML -> XML Sensor
INFO: Sensor CodeNarc [groovy]
INFO: Sensor CodeNarc [groovy] (done) | time=402ms
INFO: Sensor GroovySensor [groovy]
INFO: Load project repositories

Is there a way to further debug why the codenarc results are not displaying?

Screenshots

Rulesets

image

Repo Overview

image

Codenarc Report

image

Installed Versions

Grails - 3.3.9

SonarQube - 8.2.0.32929 (Docker)
Scanner - 4.3.0.2102

Plugins:

  • Cobertura - 2.0
  • Git - 1.11 (build 11)
  • Groovy - 1.6
  • Java Code Quality and Security - 6.3 (build 21585)
  • SonarCSS - 1.2 (build 1325)
  • SonarHTML - 3.2 (build 2082)
  • SonarJS - 6.2.1 (build 12157)
  • SonarTS - 2.1 (build 4359)
  • SonarXML - 2.0.1 (build 2020)
  • Svn - 1.9.0.1295

CodeNarc sensor unable to resolve classes

CodeNarc sensor reports a lot of errors like:

Compilation failed for [CustomCompilerPhaseSourceDecorator[SourceString[import jenkins.model.Jenkins
// full source code

; org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
None: 1: unable to resolve class jenkins.model.Jenkins
 @ line 1, column 1.
   import jenkins.model.Jenkins
   ^

None: 6: unable to resolve class jenkins.model.Jenkins 
 @ line 6, column 22.
      def availableJdks = Jenkins.get().JDKs*.name
                        ^

2 errors

It looks for me that the sensor classpath is set improperly.

I created an example project which allows to reproduce the problem: https://github.com/agabrys/bugs-reports/tree/master/codenarc-CustomCompilerPhaseSourceDecorator

Environment:

  • SonarQube 7.9.2
  • SonarGroovy 1.6
  • SonarScanner for Gradle 2.8

Upgrade CodeNarc to 3.1.0

Hi, could you please upgrade CodeNarc to the latest version 3.1.0 ?
Currenlty used version 1.6.1 is almost 2 years old and there is lot of progress there.

sonarqube 9.4 issue

  • I just installed Sonarqube 9.4 with the 1.8 groovy plugin
  • when scanning a project (with the latest โ€œsonar-scannerโ€)
  • if there are some .groovy file (in a test folder), I get the following error
ERROR: Error during SonarScanner execution
org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ', (comma)' with class 'java.lang.String' to class 'char'
	at org.codehaus.groovy.runtime.typehandling.ShortTypeHandling.castToChar(ShortTypeHandling.java:72)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.charUnbox(DefaultTypeTransformation.java:73)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToPrimitive(DefaultTypeTransformation.java:341)
	at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:242)
	at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:2716)
	at groovy.lang.MetaClassImpl.setProperty(MetaClassImpl.java:3785)
...

No codenarc reports published using sonar.groovy.codenarc.reportPaths

Fist of all thanks @TobiX for keeping this project alive.

I've been trying to get a project to publish a codenarc report to sonarqube with a customized ruleset. It appears that the report is being correct read from the sonar-scanner and uploaded to the server:

07:01:38.123 INFO: Sensor CodeNarc [groovy]
07:01:38.184 INFO: Sensor CodeNarc [groovy] (done) | time=61ms
07:01:38.185 INFO: Sensor GroovySensor [groovy]

We can read the html version of the report just fine, however the xml results are not being read by the sonar server. I actually get the same issues displayed on the server even if I configure sonar.groovy.codenarc.reportPaths incorrectly (which I've confirmed throws an error in the debug logs of the sonar-scanner).

There is only 3 type of issues that are shown on the server and none of them appear to come from our .xml report. The 2nd and 3rd issue only appear when I also publish a jacoco coverage report. I'm not sure why only the 1st one is always seen.

  • Source files should have a sufficient density of comment lines
  • Lines should have sufficient coverage by tests
  • Branches should have sufficient coverage by tests

We're currently using codenarc 0.25.2 that is in-build with gradle 4.4, which looks like it is the latest version supported by the sonar-groovy plugin.

The only thing that I can guess is causing a problem is our customised ruleset... which is basically the whole point of this exercise because it is not possible to customize rules on the sonar server.

Any advice?

Integrationtests in other source set than "test" are not reported on "Measures" tab when written in Groovy.

Hey and thanks for your great plugin,

I have used your plugin to successfully show my Spock based unit tests in SonarQube.

However when I try to get my integrationtests reported to SonarQube I'm only able to do this for Java/JUnit based ones. My Spock based one just don't show up (even if their corresponding Surefire XML files are located side by side in the same directory).

My setup is that I have an additional source set "integrationtest" parallel to my "main" and "test" source sets in my regular Java project modules. I also have end to end tests that reside in an extra project module that only contains the source set "integrationtest".

Having unit tests, integrationtests and e2e tests as JUnit based tests under the "(integration)test/java" folder test count and test result counts show up correctly in SonarQube for all test types.

Having unit tests, integrationtests and E2E tests as Spock based tests under the "(integration)test/groovy" folder test count and test result counts show up correctly in SonarQube only for the unit tests. The integrationtests and e2e tests are not counted and their results are also not taken into account.

All Surefire reports and JaCoCo reports are correctly generated and in their corresponding directories in the build tree. The html reports are correct and the Surefire XML reports are correctly displayed in my Gitlab CI pipeline.

I am using the SonarQube Gradle plugin to get the test outputs to SonarQube.

Any help would be highly appreciated.

Cheers

Oliver

Vulnerability rules not available?

I got v 1.8 of the plugin and installed it on Sonarqube LTS9.9. However, the Vulnerabilities is showing up as 0 in the quality profile. Is this normal? Or is there something that i might have erred in?

image

Update to version 1.8 changes parameter of rule grvy:org.codenarc.rule.dry.DuplicateStringLiteralRule to a wrong value

After updating SonarGroovy to version 1.8 the default value of rule 'grvy:org.codenarc.rule.dry.DuplicateStringLiteralRule' parameter 'ignoreStringsDelimiter' was changed to ', (Comma)'. This corresponds to the description but leads to an error when executing the scanner:

07:19:42  [main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 07:19:42.495 Executing CodeNarc
07:19:42  [main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 07:19:42.559 Loaded properties file in 26ms; 385 rules
07:19:42  [main] INFO org.sonarsource.scanner.maven.SonarQubeMojo - 07:19:42.572 Loading ruleset from [file:/persistence/workspace/pipeline-library_4979-submodules/target/sonar/codenarc/profile.xml]
07:19:42  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
07:19:42  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - BUILD FAILURE
07:19:42  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
07:19:42  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Total time:  13.129 s
07:19:42  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - Finished at: 2021-09-06T07:19:42+02:00
07:19:42  [main] INFO org.apache.maven.cli.event.ExecutionEventLogger - ------------------------------------------------------------------------
07:19:42  [main] ERROR org.apache.maven.cli.MavenCli - Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.1.1688:sonar (default-cli) on project datev-pipeline-library: Cannot cast object ', (comma)' with class 'java.lang.String' to class 'char' -> [Help 1]
07:19:42  org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.1.1688:sonar (default-cli) on project datev-pipeline-library: Cannot cast object ', (comma)' with class 'java.lang.String' to class 'char'
07:19:42      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
07:19:42      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
07:19:42      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
07:19:42      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
07:19:42      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
07:19:42      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
07:19:42      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
07:19:42      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
07:19:42      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
07:19:42      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
07:19:42      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
07:19:42      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
07:19:42      at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
07:19:42      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:42      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:42      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:42      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:42      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
07:19:42      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
07:19:42      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
07:19:42      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
07:19:42  Caused by: org.apache.maven.plugin.MojoExecutionException: Cannot cast object ', (comma)' with class 'java.lang.String' to class 'char'
07:19:42      at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:67)
07:19:42      at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
07:19:42      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
07:19:42      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
07:19:42      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
07:19:42      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
07:19:42      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
07:19:42      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
07:19:42      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
07:19:42      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
07:19:42      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
07:19:42      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
07:19:42      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
07:19:42      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
07:19:42      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
07:19:42      at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
07:19:42      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:42      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
07:19:43  Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ', (comma)' with class 'java.lang.String' to class 'char'
07:19:43      at org.codehaus.groovy.runtime.typehandling.ShortTypeHandling.castToChar (ShortTypeHandling.java:72)
07:19:43      at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.charUnbox (DefaultTypeTransformation.java:73)
07:19:43      at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToPrimitive (DefaultTypeTransformation.java:341)
07:19:43      at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType (DefaultTypeTransformation.java:242)
07:19:43      at groovy.lang.MetaClassImpl.setProperty (MetaClassImpl.java:2716)
07:19:43      at groovy.lang.MetaClassImpl.setProperty (MetaClassImpl.java:3785)
07:19:43      at org.codenarc.rule.dry.DuplicateStringLiteralRule.setProperty (DuplicateStringLiteralRule.groovy)
07:19:43      at org.codehaus.groovy.runtime.InvokerHelper.setProperty (InvokerHelper.java:213)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.putAt (DefaultGroovyMethods.java:357)
07:19:43      at org.codehaus.groovy.runtime.dgm$509.invoke (Unknown Source)
07:19:43      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke (PogoMetaMethodSite.java:251)
07:19:43      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call (PogoMetaMethodSite.java:71)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:136)
07:19:43      at org.codenarc.util.PropertyUtil.setPropertyFromString (PropertyUtil.groovy:56)
07:19:43      at org.codenarc.util.PropertyUtil$setPropertyFromString.call (Unknown Source)
07:19:43      at org.codenarc.ruleset.XmlReaderRuleSet$_setRuleProperties_closure4.doCall (XmlReaderRuleSet.groovy:123)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:98)
07:19:43      at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
07:19:43      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:264)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at groovy.lang.Closure.call (Closure.java:420)
07:19:43      at groovy.lang.Closure.call (Closure.java:436)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2125)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2110)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2151)
07:19:43      at org.codehaus.groovy.runtime.dgm$163.doMethodInvoke (Unknown Source)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1225)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at groovy.lang.DelegatingMetaClass.invokeMethod (DelegatingMetaClass.java:151)
07:19:43      at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call (PojoMetaClassSite.java:46)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:128)
07:19:43      at org.codenarc.ruleset.XmlReaderRuleSet.setRuleProperties (XmlReaderRuleSet.groovy:120)
07:19:43      at jdk.internal.reflect.GeneratedMethodAccessor134.invoke (Unknown Source)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:98)
07:19:43      at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
07:19:43      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:352)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent (PogoMetaClassSite.java:68)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent (AbstractCallSite.java:177)
07:19:43      at org.codenarc.ruleset.XmlReaderRuleSet$_loadRuleElements_closure2.doCall (XmlReaderRuleSet.groovy:106)
07:19:43      at jdk.internal.reflect.GeneratedMethodAccessor129.invoke (Unknown Source)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:98)
07:19:43      at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
07:19:43      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:264)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at groovy.lang.Closure.call (Closure.java:420)
07:19:43      at groovy.lang.Closure.call (Closure.java:436)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2125)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2110)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2151)
07:19:43      at org.codehaus.groovy.runtime.dgm$163.doMethodInvoke (Unknown Source)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1225)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at groovy.lang.DelegatingMetaClass.invokeMethod (DelegatingMetaClass.java:151)
07:19:43      at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call (PojoMetaClassSite.java:46)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:116)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:128)
07:19:43      at org.codenarc.ruleset.XmlReaderRuleSet.loadRuleElements (XmlReaderRuleSet.groovy:100)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke (PogoMetaMethodSite.java:210)
07:19:43      at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent (PogoMetaMethodSite.java:59)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent (CallSiteArray.java:51)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent (AbstractCallSite.java:157)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent (AbstractCallSite.java:169)
07:19:43      at org.codenarc.ruleset.XmlReaderRuleSet.<init> (XmlReaderRuleSet.groovy:53)
07:19:43      at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
07:19:43      at java.lang.reflect.Constructor.newInstance (Constructor.java:490)
07:19:43      at org.codehaus.groovy.reflection.CachedConstructor.invoke (CachedConstructor.java:83)
07:19:43      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor (ConstructorSite.java:105)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor (CallSiteArray.java:59)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor (AbstractCallSite.java:238)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor (AbstractCallSite.java:250)
07:19:43      at org.codenarc.ruleset.XmlFileRuleSet$_closure1.doCall (XmlFileRuleSet.groovy:51)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:98)
07:19:43      at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
07:19:43      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:264)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at groovy.lang.Closure.call (Closure.java:420)
07:19:43      at groovy.lang.Closure.call (Closure.java:436)
07:19:43      at org.codehaus.groovy.runtime.IOGroovyMethods.withReader (IOGroovyMethods.java:1191)
07:19:43      at org.codehaus.groovy.runtime.IOGroovyMethods.withReader (IOGroovyMethods.java:1240)
07:19:43      at org.codehaus.groovy.runtime.dgm$876.invoke (Unknown Source)
07:19:43      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke (PojoMetaMethodSite.java:274)
07:19:43      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call (PojoMetaMethodSite.java:56)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:116)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:128)
07:19:43      at org.codenarc.ruleset.XmlFileRuleSet.<init> (XmlFileRuleSet.groovy:50)
07:19:43      at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance (NativeConstructorAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:45)
07:19:43      at java.lang.reflect.Constructor.newInstance (Constructor.java:490)
07:19:43      at org.codehaus.groovy.reflection.CachedConstructor.invoke (CachedConstructor.java:83)
07:19:43      at org.codehaus.groovy.runtime.callsite.ConstructorSite$ConstructorSiteNoUnwrapNoCoerce.callConstructor (ConstructorSite.java:105)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallConstructor (CallSiteArray.java:59)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor (AbstractCallSite.java:238)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callConstructor (AbstractCallSite.java:250)
07:19:43      at org.codenarc.ruleset.RuleSetUtil.loadRuleSetFile (RuleSetUtil.groovy:40)
07:19:43      at org.codenarc.ruleset.RuleSetUtil$loadRuleSetFile.call (Unknown Source)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:116)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:128)
07:19:43      at org.codenarc.CodeNarcRunner$_createRuleSet_closure2.doCall (CodeNarcRunner.groovy:101)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.groovy.reflection.CachedMethod.invoke (CachedMethod.java:98)
07:19:43      at groovy.lang.MetaMethod.doMethodInvoke (MetaMethod.java:325)
07:19:43      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod (ClosureMetaClass.java:264)
07:19:43      at groovy.lang.MetaClassImpl.invokeMethod (MetaClassImpl.java:1034)
07:19:43      at groovy.lang.Closure.call (Closure.java:420)
07:19:43      at groovy.lang.Closure.call (Closure.java:436)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2125)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2110)
07:19:43      at org.codehaus.groovy.runtime.DefaultGroovyMethods.each (DefaultGroovyMethods.java:2151)
07:19:43      at org.codehaus.groovy.runtime.dgm$163.invoke (Unknown Source)
07:19:43      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke (PojoMetaMethodSite.java:274)
07:19:43      at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call (PojoMetaMethodSite.java:56)
07:19:43      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall (CallSiteArray.java:47)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:116)
07:19:43      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call (AbstractCallSite.java:128)
07:19:43      at org.codenarc.CodeNarcRunner.createRuleSet (CodeNarcRunner.groovy:100)
07:19:43      at org.codenarc.CodeNarcRunner.execute (CodeNarcRunner.groovy:72)
07:19:43      at org.sonar.plugins.groovy.codenarc.CodeNarcSensor.runCodeNarc (CodeNarcSensor.java:168)
07:19:43      at org.sonar.plugins.groovy.codenarc.CodeNarcSensor.execute (CodeNarcSensor.java:102)
07:19:43      at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse (AbstractSensorWrapper.java:48)
07:19:43      at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute (ModuleSensorsExecutor.java:85)
07:19:43      at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1 (ModuleSensorsExecutor.java:59)
07:19:43      at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy (ModuleSensorsExecutor.java:77)
07:19:43      at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute (ModuleSensorsExecutor.java:59)
07:19:43      at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart (ModuleScanContainer.java:82)
07:19:43      at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137)
07:19:43      at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123)
07:19:43      at org.sonar.scanner.scan.ProjectScanContainer.scan (ProjectScanContainer.java:392)
07:19:43      at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively (ProjectScanContainer.java:388)
07:19:43      at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart (ProjectScanContainer.java:357)
07:19:43      at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137)
07:19:43      at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123)
07:19:43      at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart (GlobalContainer.java:150)
07:19:43      at org.sonar.core.platform.ComponentContainer.startComponents (ComponentContainer.java:137)
07:19:43      at org.sonar.core.platform.ComponentContainer.execute (ComponentContainer.java:123)
07:19:43      at org.sonar.batch.bootstrapper.Batch.doExecute (Batch.java:72)
07:19:43      at org.sonar.batch.bootstrapper.Batch.execute (Batch.java:66)
07:19:43      at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute (BatchIsolatedLauncher.java:46)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke (IsolatedLauncherProxy.java:60)
07:19:43      at com.sun.proxy.$Proxy25.execute (Unknown Source)
07:19:43      at org.sonarsource.scanner.api.EmbeddedScanner.doExecute (EmbeddedScanner.java:185)
07:19:43      at org.sonarsource.scanner.api.EmbeddedScanner.execute (EmbeddedScanner.java:137)
07:19:43      at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute (ScannerBootstrapper.java:65)
07:19:43      at org.sonarsource.scanner.maven.SonarQubeMojo.execute (SonarQubeMojo.java:104)
07:19:43      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
07:19:43      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
07:19:43      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
07:19:43      at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
07:19:43      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
07:19:43      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
07:19:43      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
07:19:43      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
07:19:43      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
07:19:43      at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
07:19:43      at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
07:19:43      at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
07:19:43      at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
07:19:43      at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
07:19:43      at jdk.internal.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
07:19:43      at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
07:19:43      at java.lang.reflect.Method.invoke (Method.java:566)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
07:19:43      at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)

Nested JUnit 5 tests are not included

Using SonarQube 8.9 with the Groovy plugin, v1.7 doesn't include unit tests written in Groovy using the new JUnit 5 @Nested annotation. This isn't the case for tests written in Java, I found the following thread and issue. It looks as if the Groovy plugin has the same problem.

I've attached a sample project based on the sample from SONARJAVA-3222 but with unit tests written in Groovy, running the following command should show 2 tests executing and passing but only 1 appears in SonarQube.

./gradlew clean build sonarqube

sample.zip

Log: "File not found" messages if jacoco.exec contains information on .java (or any non-Groovy) files

These can add up quite quickliy. Example:

[WARNING] File not found: de/cominto/common/exception/ConfigurationException.java
[WARNING] File not found: de/cominto/common/security/doubleoptin/InvalidTokenExpiredException.java
[WARNING] File not found: de/cominto/common/util/ByteArray.java
[WARNING] File not found: de/cominto/common/web/servlet/listener/SessionCounterListener.java
...

These messages seem to stem from JaCoCoAnalyzer#getInputFile:

  @CheckForNull
  private InputFile getInputFile(ISourceFileCoverage coverage) {
    String path = getFileRelativePath(coverage);
    InputFile sourceInputFileFromRelativePath =
        groovyFileSystem.sourceInputFileFromRelativePath(path);
    if (sourceInputFileFromRelativePath == null) {
      JaCoCoExtensions.logger().warn("File not found: " + path);
    }
    return sourceInputFileFromRelativePath;
  }

where the groovyFileSystem.sourceInputFileFromRelativePath(path) will produce null for non-Groovy files (Predicate "isGroovyLanguage").

In my opinion, logging only when an actual Groovy file was not found would make build-logs a little bit more manageable. My idea would be to just alter the if-condition a little bit:

    if (sourceInputFileFromRelativePath == null && path.endsWith(".groovy")) {
      JaCoCoExtensions.logger().warn("File not found: " + path);
    }

UnsatisfiableDependenciesException with Sonarqube 7.6

Hi,

when I try to use the 1.6-SNAPSHOT with the current Sonarqube 7.6 I get the following Exception:

org.picocontainer.injectors.AbstractInjector$UnsatisfiableDependenciesException: org.sonar.plugins.groovy.codenarc.CodeNarcSensor has unsatisfied dependency 'class org.sonar.api.profiles.RulesProfile' for constructor 'public org.sonar.plugins.groovy.codenarc.CodeNarcSensor(org.sonar.api.profiles.RulesProfile,org.sonar.plugins.groovy.foundation.GroovyFileSystem)' from org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@18c0d600:90<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@4397b95c:441<[Immutable]:org.sonar.core.platform.ComponentContainer$ExtendedDefaultPicoContainer@170ad400:47

The reason is that the class RulesProfile was deprecated and has been removed now, see https://community.sonarsource.com/t/unsatisfied-dependency-in-sq-7-6/6244

Test written in groovy not recognised by sonarqube

We are using the sonarqube version 7.9.3
Wrote source file in java and test in the groovy script.After the sonar scanner execution, sonar failed with the reason there is no code coverage on new lines.
Could you please help on this issue.

java.lang.UnsupportedOperationException: Metric 'files' should not be computed by a Sensor

SonarQube analysis fails with the following Exception, when the current 1.6-SNAPSHOT is used with SonarQube 7.7:

> Task :compileGroovy UP-TO-DATE
> Task :processResources NO-SOURCE
> Task :classes UP-TO-DATE
> Task :compileTestJava NO-SOURCE
> Task :compileTestGroovy UP-TO-DATE
> Task :processTestResources UP-TO-DATE
> Task :testClasses UP-TO-DATE
> Task :test UP-TO-DATE

> Task :sonarqube
CodeNarc completed: (p1=0; p2=5; p3=0) 1075ms
Metric 'lines' is an internal metric computed by SonarQube/SonarCloud. Provided value is ignored.
Metric 'comment_lines_data' is deprecated. Provided value is ignored.

> Task :sonarqube FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sonarqube'.
> Metric 'files' should not be computed by a Sensor

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':sonarqube'.
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:121)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.accept(ExecuteActionsTaskExecuter.java:117)
	at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:184)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:110)
	at org.gradle.api.internal.tasks.execution.ResolveIncrementalChangesTaskExecuter.execute(ResolveIncrementalChangesTaskExecuter.java:84)
	at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:91)
	at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionStateTaskExecuter.execute(ResolveBeforeExecutionStateTaskExecuter.java:74)
	at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
	at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:109)
	at org.gradle.api.internal.tasks.execution.ResolveBeforeExecutionOutputsTaskExecuter.execute(ResolveBeforeExecutionOutputsTaskExecuter.java:67)
	at org.gradle.api.internal.tasks.execution.ResolveAfterPreviousExecutionStateTaskExecuter.execute(ResolveAfterPreviousExecutionStateTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:93)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:45)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:94)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:63)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:49)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:46)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:416)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$CallableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:406)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:102)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.call(DelegatingBuildOperationExecutor.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:43)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:355)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:343)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:336)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:322)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:134)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker$1.execute(DefaultPlanExecutor.java:129)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:202)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:193)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:129)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.UnsupportedOperationException: Metric 'files' should not be computed by a Sensor
	at org.sonar.scanner.sensor.DefaultSensorStorage.saveMeasure(DefaultSensorStorage.java:168)
	at org.sonar.scanner.sensor.DefaultSensorStorage.store(DefaultSensorStorage.java:132)
	at org.sonar.api.batch.sensor.measure.internal.DefaultMeasure.doSave(DefaultMeasure.java:95)
	at org.sonar.api.batch.sensor.internal.DefaultStorable.save(DefaultStorable.java:45)
	at org.sonar.plugins.groovy.GroovySensor.saveMetric(GroovySensor.java:251)
	at org.sonar.plugins.groovy.GroovySensor.processFile(GroovySensor.java:155)
	at org.sonar.plugins.groovy.GroovySensor.computeGroovyMetrics(GroovySensor.java:119)
	at org.sonar.plugins.groovy.GroovySensor.execute(GroovySensor.java:108)
	at org.sonar.scanner.sensor.AbstractSensorWrapper.analyse(AbstractSensorWrapper.java:48)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:85)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.lambda$execute$1(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.withModuleStrategy(ModuleSensorsExecutor.java:77)
	at org.sonar.scanner.sensor.ModuleSensorsExecutor.execute(ModuleSensorsExecutor.java:59)
	at org.sonar.scanner.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:82)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.scan.ProjectScanContainer.scan(ProjectScanContainer.java:359)
	at org.sonar.scanner.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:354)
	at org.sonar.scanner.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:317)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.scanner.bootstrap.GlobalContainer.doAfterStart(GlobalContainer.java:128)
	at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:136)
	at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:122)
	at org.sonar.batch.bootstrapper.Batch.doExecute(Batch.java:73)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:46)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy115.execute(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:185)
	at org.sonarsource.scanner.api.EmbeddedScanner.execute(EmbeddedScanner.java:137)
	at org.sonarqube.gradle.SonarQubeTask.run(SonarQubeTask.java:100)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:103)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:48)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:41)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:28)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:705)
	at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:672)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$4.run(ExecuteActionsTaskExecuter.java:338)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:402)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:394)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor$1.execute(DefaultBuildOperationExecutor.java:165)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:250)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:158)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:92)
	at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:327)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:312)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$200(ExecuteActionsTaskExecuter.java:75)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:158)
	at org.gradle.internal.execution.impl.steps.ExecuteStep.execute(ExecuteStep.java:46)
	at org.gradle.internal.execution.impl.steps.CancelExecutionStep.execute(CancelExecutionStep.java:34)
	at org.gradle.internal.execution.impl.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:69)
	at org.gradle.internal.execution.impl.steps.TimeoutStep.execute(TimeoutStep.java:49)
	at org.gradle.internal.execution.impl.steps.CatchExceptionStep.execute(CatchExceptionStep.java:34)
	at org.gradle.internal.execution.impl.steps.CreateOutputsStep.execute(CreateOutputsStep.java:49)
	at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:42)
	at org.gradle.internal.execution.impl.steps.SnapshotOutputStep.execute(SnapshotOutputStep.java:28)
	at org.gradle.internal.execution.impl.steps.CacheStep.executeWithoutCache(CacheStep.java:133)
	at org.gradle.internal.execution.impl.steps.CacheStep.lambda$execute$5(CacheStep.java:83)
	at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:82)
	at org.gradle.internal.execution.impl.steps.CacheStep.execute(CacheStep.java:37)
	at org.gradle.internal.execution.impl.steps.PrepareCachingStep.execute(PrepareCachingStep.java:33)
	at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:38)
	at org.gradle.internal.execution.impl.steps.StoreSnapshotsStep.execute(StoreSnapshotsStep.java:23)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:95)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:88)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
	at org.gradle.internal.execution.impl.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
	at org.gradle.internal.execution.impl.DefaultWorkExecutor.execute(DefaultWorkExecutor.java:34)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:109)
	... 37 more


* Get more help at https://help.gradle.org

BUILD FAILED in 5s
5 actionable tasks: 1 executed, 4 up-to-date

Several deprecated metrics have been removed with this SonarQube version:
https://jira.sonarsource.com/browse/SONAR-11794
https://jira.sonarsource.com/browse/SONAR-11664

Missing coverage

Hi Team,

I have installed sonar-groovy 1.8 plugin on sonarqube 10.1.x. My project has both java and groovy tests. No groovy source files.

After installing the plugin, I started seeing .groovy files under "Measures" tab in sonarqube however coverage is not updated.

I see that I have to set sonar.groovy.binaries which I did but see no change. Does below property values look good ? Appreciate your help.

<sonar.groovy.binaries>${project.build.directory}/classes</sonar.groovy.binaries> <sonar.tests>src/test/java,src/test/groovy</sonar.tests>

Thanks,
Veda

Recent versions of SonarQube now only have overall coverage

On recent version of SonarQube, UnitTest and IntegrationTest coverage have being unified into just one overall coverage.

With that, properties such as sonar.jacoco.reportPath has being deprecated and now sonar.jacoco.reportPaths is introduced. No longer we have things like sonar.jacoco.itReportPath, etc...

Maybe we should update the Groovy plugin to go in the same direction.
That means deprecating/removing support for sonar.groovy,jacoco.reportPath and sonar.groovy,jacoco.itReportPath and adding sonar.groovy,jacoco.reportPaths?

Add "realistic" remediation efforts

While remediation efforts (in cost.csv) are by design just rough estimates, the current values are probably way off. Heck, for the recent CodeNarc updates (from 0.25.2 to 1.3) I just put 5min into every new rule, since I wanted to be done with it.

It would probably be a good idea to review these values and correct them, if necessary.

"Variable Name" (grvy:org.codenarc.rule.naming.VariableNameRule.fixed) incorrectly classified as "Bug"

Hi,

SonarQube 8.5 classifies grvy:org.codenarc.rule.naming.VariableNameRule.fixed as a "Bug" whereas I argue that it should be classified as a "Code smell".

From the official documentation:

Bug | An issue that represents something wrong in the code. If this has not broken yet, it will, and probably at the worst possible moment. This needs to be fixed. Yesterday.

Code Smell | A maintainability-related issue in the code. Leaving it as-is means that at best maintainers will have a harder time than they should making changes to the code. At worst, they'll be so confused by the state of the code that they'll introduce additional errors as they make changes.

Source: https://docs.sonarqube.org/latest/user-guide/concepts/

"Variable Name" (grvy:org.codenarc.rule.naming.VariableNameRule.fixed) rule description:

Verifies that the name of each variable matches a regular expression. By default it checks that non-final variable names start with a lowercase letter and contains only letters or numbers. By default, final variable names start with an uppercase letter and contain only uppercase letters, numbers and underscores.

Versions:

  • Groovy plugin version 1.6
  • SonarQube 8.5.1

Related: #14

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.