Git Product home page Git Product logo

sonar-checkstyle's Introduction

Checkstyle is a tool for checking Java source code for adherence to a Code Standard or set of validation rules (best practices).

Contributors chat:

The latest release version can be found at GitHub releases or at Maven repo.

Each-commit builds of maven artifacts can be found at Maven Snapshot repository.

Documentation is available in HTML format, see https://checkstyle.org/checks.html.

Build instructions and Contribution

Build instructions

Setup IDE for development

Explanation on how to create your own module

Verification of code quality

Sending Pull Request

Report Issue

Continuous integration and Quality reports

See our CIs statuses.

Quality reports: https://checkstyle.org/project-reports.html

JavaScript, CSS and Java source file analysis on Codacy:

Feedback/Support

Please send any feedback to https://groups.google.com/forum/?hl=en#!forum/checkstyle

Questions and Answers from community:

Bugs and Feature requests (not the questions): https://github.com/checkstyle/checkstyle/issues

Support/Sponsor checkstyle

If you want to speed up fixing of issue and want to encourage somebody in internet to resolve any issue:

Licensing

This software is licensed under the terms in the file named "LICENSE" in this directory.

The software uses the ANTLR package (https://www.antlr.org/). Its license terms are in the file named "RIGHTS.antlr" in this directory.

This product includes software developed by The Apache Software Foundation (https://www.apache.org/).

The software uses the Logging and Beanutils packages from the Apache Commons project (https://commons.apache.org/). The license terms of these packages are in the file named "LICENSE.apache20" in this directory.

The software uses the Google Guava Libraries (https://github.com/google/guava/). The license terms of these packages are in the file named "LICENSE.apache20" in this directory.

The software uses the Picocli Library (https://github.com/remkop/picocli/). Its license terms are in the file named "LICENSE.apache20" in this directory.

sonar-checkstyle's People

Contributors

axel3rd avatar bananeweizen avatar benzonico avatar dancing-leaves avatar dbolkensteyn avatar dependabot[bot] avatar dgageot avatar ehartmann avatar fmallet avatar ganncamp avatar gaurabdg avatar github-actions[bot] avatar godin avatar jongwooo avatar kevin222004 avatar lindamartin avatar marschall avatar mpaladin avatar muhlba91 avatar nrmancuso avatar pynicolas avatar rahulkhinchi03 avatar rdiachenko avatar rnveach avatar romani avatar simonbrandhof avatar tomverin avatar tsjensen avatar vyom-yadav 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  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  avatar  avatar  avatar

sonar-checkstyle's Issues

unit test run error!

The CheckstyleExecutorTest Test Class 's canGenerateXMLReport_in_english test method run error.
Detail message
java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/InputStream;)V

at com.puppycrawl.tools.checkstyle.PackageNamesLoader.getPackageNames(PackageNamesLoader.java:156)
at com.puppycrawl.tools.checkstyle.Checker.finishLocalSetup(Checker.java:137)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:134)
at org.sonar.plugins.checkstyle.CheckstyleExecutor.execute(CheckstyleExecutor.java:84)
at org.sonar.plugins.checkstyle.CheckstyleExecutorTest.canGenerateXMLReport_in_english(CheckstyleExecutorTest.java:116)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:168)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:119)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:234)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:74)

Can you help me @romani

resolve WARNING during "mvn package"

command "mvn clean package" should pass without WARNINGs.

Some of them:
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[WARNING] JAR will be empty - no content was marked for inclusion!

[WARNING] com.google.guava:guava:jar:10.0.1:compile is provided by SonarQube plugin API and will not be packaged in your plugin
[WARNING] org.slf4j:jcl-over-slf4j:jar:1.7.5:compile is provided by SonarQube plugin API and will not be packaged in your plugin
[WARNING] com.google.code.findbugs:jsr305:jar:1.3.9:compile is provided by SonarQube plugin API and will not be packaged in your plugin
[WARNING] org.slf4j:slf4j-api:jar:1.7.5:compile is provided by SonarQube plugin API and will not be packaged in your plugin
[WARNING] org.picocontainer:picocontainer:jar:2.14.1:compile is provided by SonarQube plugin API and will not be packaged in your plugin

from test:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Update for a lot of Check to make their Sonar config up to implementation, update for rules.xml file (UT validation)

testing of 3.1 release

changes from 2.4 till 3.1

testing - https://github.com/checkstyle/sonar-checkstyle/wiki/How-to-test-released-binary

  1. com.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck
    all options
    http://localhost:9000/coding_rules#rule_key=checkstyle%3Acom.puppycrawl.tools.checkstyle.checks.regexp.RegexpOnFilenameCheck
    http://checkstyle.sourceforge.net/config_regexp.html#RegexpOnFilename

  2. com.puppycrawl.tools.checkstyle.checks.naming.CatchParameterNameCheck
    all options

  3. com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck
    useContainerOrderingForStatic
    tokens

  4. com.puppycrawl.tools.checkstyle.checks.coding.ReturnCountCheck
    all options

  5. com.puppycrawl.tools.checkstyle.checks.TranslationCheck
    all options

  6. com.puppycrawl.tools.checkstyle.checks.whitespace.SingleSpaceSeparatorCheck
    all options

  7. com.puppycrawl.tools.checkstyle.checks.design.VisibilityModifierCheck
    all options

  8. com.puppycrawl.tools.checkstyle.checks.whitespace.WhitespaceAroundCheck
    allowEmptyLambdas

LowerCaseLongSuffixCheck is missed

Upper Ell rule is specified as deprecated. It's recommended to use LowerCaseLongSuffixCheck instead but it isn't found in rules list.
screen shot 2016-10-24 at 2 50 29 pm

After pressing LowerCaseLongSuffixCheck link rule isn't found and empty page is shown.
screen shot 2016-10-24 at 2 53 07 pm

CI for sonar plugin

previously it is was done as (code from README.md):

## Continuous Integration [![Build Status](https://travis-ci.org/SonarQubeCommunity/sonar-checkstyle.svg?branch=master)](https://travis-ci.org/SonarQubeCommunity/sonar-checkstyle)

smth should be done to make to build-able and testable against sonarqube .

fix import of checkstyle config file containing multiple instances/definitions of the same rules

https://github.com/SonarQubeCommunity/sonar-checkstyle/issues/28

Error when creating a new quality profile by importing a checkstyle configuration:

NativeException (javax.persistence.NonUniqueResultException: result returns more than one elements):
    org/hibernate/ejb/QueryImpl.java:109:in `getSingleResult'
    org/sonar/jpa/session/JpaDatabaseSession.java:154:in `getSingleResult'
    org/sonar/core/components/DefaultRuleFinder.java:60:in `find'
    org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java:124:in `processRule'
    org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java:97:in `processModule'
    org/sonar/plugins/checkstyle/CheckstyleProfileImporter.java:69:in `importProfile'
    org/sonar/server/rules/ProfilesConsole.java:140:in `importProfile'
    org/sonar/server/ui/JRubyFacade.java:185:in `importProfile'
    /app/controllers/profiles_controller.rb:71:in `create'
    /app/controllers/profiles_controller.rb:69:in `each_pair'
    /app/controllers/profiles_controller.rb:69:in `create'
    /gems/gems/actionpack-2.2.2/lib/action_controller/base.rb:1253:in `perform_action'
[...]

Maybe the issue comes from a rule with cardinality set to multiple... but not sure.

File chunk from google_checks.xml from checkstyle repo:

...
        <module name="RightCurly"/>
        <module name="RightCurly">
            <property name="option" value="alone"/>
            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
        </module>
...

create docker image for testing of sonar plugin

We need to combine:
https://hub.docker.com/_/sonarqube/
ubuntu+maven+jdk8+git
to create new public image for hub.docker.com owned by checkstyle organization.

to adjust wercker CI to use it as base system.
In that system we need to:

  1. clone sonar-checkstyle sources
  2. package all
  3. install in sonar
  4. restart sonar
  5. make sure sonar is starting
  6. do test launch of "mvn sonar:sonar" against sonar-checkstyle sources. No errors are expected.

update documentation after transfer

from email:

looks like Sonar will not update http://dist.sonarsource.com/reports/coverage/checkstyle.html page.

About the coverage report, you really don't need to keep it up-to-date or provide your own report. Simply remove it! If the report is not up-to-date, it's our problem. It should be Sonarsource work to keep the tracking "alive", as an internal tool. From a pure Checkstyle perspective, and as the new official maintainer of the plugin, I would invite you to :
Remove the now useless part about the rules which have been rewritten from the README.md file, including the link to the report:
A majority of the Checkstyle rules have been rewritten in the Java plugin. Rewritten rules are marked "Deprecated" in the Checkstyle plugin, but a concise summary of replaced rules is available.
Remove all the "DEPRECATED" status tags from the rules in the rules.xml file: https://github.com/checkstyle/sonar-checkstyle/blob/master/sonar-checkstyle-plugin/src/main/resources/org/sonar/plugins/checkstyle/rules.xml
Update all the rules description to remove the links to the sonarsource rules in this folder: https://github.com/checkstyle/sonar-checkstyle/tree/master/sonar-checkstyle-plugin/src/main/resources/org/sonar/l10n/checkstyle/rules/checkstyle
After all, you are now the rightful maintainer of the plugin, and I can't see why these rules should be marked as deprecated anymore. As the checkstyle plugin is not shipped anymore with SonarQube, a SonarQube user installing the checkstyle plugin won't be interested by having the mapping with the Sonarsource java rules.

I'm however pretty sure that if you could provide a list of rules from checkstyle wrongly mapped, someone at Sonarsource will be pretty happy. :)

Cheers,
Michael

Resolve deprecations warnings

Deprecation highlighted by Sonarqube - https://sonarcloud.io/project/issues?id=checkstyle_sonar-checkstyle&resolved=false&rules=java%3AS1874&severities=MINOR

Deprecation usage that were highlighted by Eclipse:

The field RulePriority.BLOCKER is deprecated
The field RulePriority.CRITICAL is deprecated
The field RulePriority.INFO is deprecated
The field RulePriority.MAJOR is deprecated
The field RulePriority.MINOR is deprecated

The method find(RuleQuery) from the type RuleFinder is deprecated
The type RulePriority is deprecated
The type RuleFinder is deprecated
The type ResourcePerspectives is deprecated
The type Project is deprecated
The type BatchExtension is deprecated

The method debtSubCharacteristic() from the type RulesDefinition.Rule is deprecated
The method line(Integer) from the type Issuable.IssueBuilder is deprecated
The method message(String) from the type Issuable.IssueBuilder is deprecated
The method readFileToString(File) from the type FileUtils is deprecated
The method setParent(Rule) from the type Rule is deprecated

The method start(String) from the type TimeProfiler is deprecated
The method stop() from the type TimeProfiler is deprecated

The constructor Project(String) is deprecated
The constructor TimeProfiler() is deprecated

Figureout requirements by api and jdk and other dependecies

Sonar 4.5.4 - jdk 1.6 munimum
Sonar 5.6 - jdk 1.8 minimum

Checkstyle 7.X - jdk 1.8 minimum

Checkstyle-sonar-plugin 3.1 is using 4.5.2 ( https://github.com/checkstyle/sonar-checkstyle/blob/master/pom.xml#L89 ) api but require jdk 1.8

What for we depend on sonar-java-plugin ?
https://github.com/checkstyle/sonar-checkstyle/blob/master/checkstyle-sonar-plugin/pom.xml#L52
This also need to be declared to user.

All test dependencies should be grouped at the end.

As we depend on sonar and checkstyle, we should depend on this two version. If some other dependencies have diffrent version that are provided by sonar, we should make comment on this.

http://www.sonarqube.org/sonar-ecosystem-upgrades-to-java-8/
http://checkstyle.sourceforge.net/releasenotes.html#Release_7.0
http://www.sonarqube.org/downloads/

Many false positive issues after upgrading from SonarQube 4.5 to 5.6 LTS

I'm facing a big issue after upgrading from SonarQube 4.5.4 to LTS 5.6: the new analyzes rise hundreds of new issues (which are false positives). These news issues are primarily related to the following CheckStyle rules : NoLineWrapCheck and WhitespaceAroundCheck. This is very strange because I was using the same 2.4 version of the sonar checkstyle plugin with the previous version.

It seems that the rule engine does't recognize the language anymore. See for example the alerts on diamond operators or annotation on class declaration in the attached screenshots.

First clue: the incriminated rules seems to be "template rules" and SQ displays this warning in the rule's details: "'This rule template was activated on the following profiles in previous versions of SonarQube. It is not possible anymore to do so. Instead, please create a custom rule." But I already got this same message when I was using the version 4.5.4!

I have tried to replace an old "template rule" by a custom rule but same results.

Do anyone have any idea what is going wrong?

2016-07-08 13_30_33-sonarqube - src_main_java_fr_edu_scolarite_lsun_bilan_batch_etablissement
2016-07-08 13_31_39-sonarqube - src_main_java_fr_edu_scolarite_lsun_bilan_batch_division

Sonar 5.5 + Checkstyle

INFO: Checkstyle charset: windows-1252
Exception in thread "main" java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/InputStream;)V
at com.puppycrawl.tools.checkstyle.PackageNamesLoader.getPackageNames(PackageNamesLoader.java:156)
at com.puppycrawl.tools.checkstyle.Checker.finishLocalSetup(Checker.java:137)
at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:134)
at org.sonar.plugins.checkstyle.CheckstyleExecutor.execute(CheckstyleExecutor.java:84)
at org.sonar.plugins.checkstyle.CheckstyleSensor.analyse(CheckstyleSensor.java:57)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:189)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:265)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:260)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:258)
at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:250)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.batch.scan.ProjectScanContainer.startComponents(ProjectScanContainer.java:128)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:124)
at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119)
at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
at com.sun.proxy.$Proxy0.execute(Unknown Source)
at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240)
at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110)
at org.sonarsource.scanner.cli.Main.execute(Main.java:72)
at org.sonarsource.scanner.cli.Main.main(Main.java:60)

No way to remove STATIC_IMPORT from validation

import should work with rule templates

With SonarQube 4.5.1 and Checkstyle plugin 2.2, importing the following file triggers an error: "Rule template can't be activated on a Quality profile: checkstyle:com.puppycrawl.tools.checkstyle.checks.regexp.RegexpSinglelineJavaCheck"

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
    "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
  <module name="TreeWalker">
    <module name="RegexpSinglelineJava">
      <!-- . matches any character, so we need to
         escape it and use \. to match dots. -->
      <property name="format" value="System\.out\.println"/>
      <property name="ignoreComments" value="true"/>
    </module>
  </module>
</module>

False positive using ImportOrderCheck rule

It seems that the ordered flag (which is default to true) doesn't work properly with the rule checkstyle:com.puppycrawl.tools.checkstyle.checks.imports.ImportOrderCheck
For example, if you try configure your Eclipse Neon to automatically organize your imports, you will have something like that:

package my.app;

import java.io.Serializable;

import my.app.Service;

The third line will throw an alert:
Wrong order for 'fr.edu.grenoble.composant.securite.ComposantSecurite' import

Same error with groups containing several imports which are nevertheless properly sorted alphabetically by Eclipse.

Issues compiling/running in Eclipse

Importing sonar-checkstyle as a maven project isn't very straightforward and I can't get it to fully work yet.
None of these issues prevent me from compiling/running with pure maven.
I am using Luna Service Release 2 (4.4.2) .

When originally importing as a maven project and doing a build, 91 errors come up in checkstyle-sonar-plugin.
Ex: AbstractCheck cannot be resolved to a type
All errors are because the project can't find the original checkstyle dependency in checkstyle-all.

To fix this, I had to go to the build path of checkstyle-all and tell it to export the Maven Dependencies.
Even though this does remove the build errors, 10 junits still fail with the following exception: java.lang.NoClassDefFoundError: com/puppycrawl/tools/checkstyle/api/AuditListener
I didn't get this error before f93efab.
I have not found a full working solution.

checkstyle-sonar-plugin imports with a compiler level of Java 1.7 class and checkstyle-all imports with a compiler level of Java 1.5.
Checkstyle is currently 1.8 and can't be used with an older JRE unless you use checkstyle-backport-jre6.
Before f93efab , when I ran the junits specifically on a JDK7 I got minor/major version conflict. Had no issues running with a JDK8.

I did have a 3rd issue importing the project with main checkstyle project in the same workspace, but I believe it was fixed with b3ad0d0.

checkstyle-sonar-plugin does not work with sonar 4.5.2 and 4.5.4 require upgrade to 5.6.4

result of mvn sonar:sonar

Caused by: org.apache.maven.plugin.PluginContainerException: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.2:sonar: java.lang.NoSuchMethodError: org.sonar.plugins.java.api.JavaResourceLocator.classpath()Ljava/util/Collection;
-----------------------------------------------------
realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:3.2
strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
urls[0] = file:~/.m2/repository/org/sonarsource/scanner/maven/sonar-maven-plugin/3.2/sonar-maven-plugin-3.2.jar
urls[1] = file:~/.m2/repository/org/apache/maven/shared/maven-dependency-tree/2.2/maven-dependency-tree-2.2.jar
urls[2] = file:~/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
urls[3] = file:~/.m2/repository/org/eclipse/aether/aether-util/0.9.0.M2/aether-util-0.9.0.M2.jar
urls[4] = file:~/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
urls[5] = file:~/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
urls[6] = file:~/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.22/plexus-utils-3.0.22.jar
urls[7] = file:~/.m2/repository/org/sonarsource/scanner/api/sonar-scanner-api/2.8/sonar-scanner-api-2.8.jar
urls[8] = file:~/.m2/repository/commons-lang/commons-lang/2.6/commons-lang-2.6.jar
urls[9] = file:~/.m2/repository/com/google/code/findbugs/jsr305/2.0.3/jsr305-2.0.3.jar
Number of foreign imports: 1
import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

-----------------------------------------------------

	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:181)
	... 21 more
Caused by: java.lang.NoSuchMethodError: org.sonar.plugins.java.api.JavaResourceLocator.classpath()Ljava/util/Collection;
	at org.sonar.plugins.checkstyle.CheckstyleExecutor.createClassloader(CheckstyleExecutor.java:111)
	at org.sonar.plugins.checkstyle.CheckstyleExecutor.execute(CheckstyleExecutor.java:66)
	at org.sonar.plugins.checkstyle.CheckstyleSensor.analyse(CheckstyleSensor.java:58)
	at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:79)
	at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:70)
	at org.sonar.batch.phases.PhaseExecutor.execute(PhaseExecutor.java:119)
	at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:194)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
	at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:233)
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:228)
	at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:226)
	at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:221)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
	at org.sonar.batch.scan.ScanTask.scan(ScanTask.java:64)
	at org.sonar.batch.scan.ScanTask.execute(ScanTask.java:51)
	at org.sonar.batch.bootstrap.TaskContainer.doAfterStart(TaskContainer.java:125)
	at org.sonar.api.platform.ComponentContainer.startComponents(ComponentContainer.java:93)
	at org.sonar.api.platform.ComponentContainer.execute(ComponentContainer.java:78)
	at org.sonar.batch.bootstrap.BootstrapContainer.executeTask(BootstrapContainer.java:173)
	at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:95)
	at org.sonar.batch.bootstrapper.Batch.execute(Batch.java:67)
	at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.executeOldVersion(BatchIsolatedLauncher.java:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60)
	at com.sun.proxy.$Proxy23.executeOldVersion(Unknown Source)
	at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:238)
	at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151)
	at org.sonarsource.scanner.maven.bootstrap.ScannerBootstrapper.execute(ScannerBootstrapper.java:78)
	at org.sonarsource.scanner.maven.SonarQubeMojo.execute(SonarQubeMojo.java:122)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
	... 21 more
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Sonar 5.3 - Can not execute Checkstyle: cannot initialize module TreeWalker Token "LPAREN" was not found in Acceptable tokens list

Hello,

I have to upgrade from Sonar 5.1 to Sonar 5.3 do to this issue https://jira.sonarsource.com/browse/SONAR-7008
But then I got this error from sonar-checkstyle 5.2:
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.0.2:sonar (default-cli) on project xg-im-aggregator: Can not execute Checkstyle: cannot initialize
module TreeWalker - Token "LPAREN" was not found in Acceptable tokens list in check com.puppycrawl.tools.checkstyle.checks.whitespace.ParenPadCheck

I'm using Sonar 5.3, sonar-maven-plugin 3.0.2 and sonar-checkstyle 5.2

Any ideas,

Thanks in advance

Many exceptions: Unable to find class for com.puppycrawl.tools.checkstyle.checks.naming.FileLength logged with checkstyle plugin 2.6

Hello,

Since the upgrade to Sonarqube 5.6 and the usage of the checkstyle plugin 2.6, many exceptions are logged related to a missing class:

[DEBUG] 09:28:07.898 Keep looking, ignoring exception
com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to find class for com.puppycrawl.tools.checkstyle.checks.modifier.FileLength
at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createObject(PackageObjectFactory.java:133) [checkstyle-all-2.4.jar:na]

Have you an idea from where that comes?

Thanks,

Philippe

Unable to import Google Style Gude ruleset

https://github.com/SonarQubeCommunity/sonar-checkstyle/issues/31

jakub-bochenski commented 12 days ago

When trying to import https://raw.githubusercontent.com/checkstyle/checkstyle/master/src/main/resources/google_checks.xml I get

We're sorry, but something went wrong.
Please try back in a few minutes and contact support if the problem persists.
Go back to the homepage

@jakub-bochenski
jakub-bochenski commented 12 days ago

I think this is the cause:

2016.04.14 12:39:59 ERROR web[o.s.s.ui.JRubyFacade] Fail to render: https://sonar.egnyte-internal.com/profiles/create The definition of the profile 'null' (language 'null') contains multiple occurrences of the 'checkstyle:com.puppycrawl.tools.checkstyle.checks.blocks.RightCurlyCheck' rule. The plugin which declares this profile should fix this.

@jakub-bochenski
jakub-bochenski commented 12 days ago

I had to remove

        <module name="AnnotationLocation">
            <property name="tokens" value="VARIABLE_DEF"/>
            <property name="allowSamelineMultipleAnnotations" value="true"/>
        </module>

and

        <module name="RightCurly">
            <property name="option" value="alone"/>
            <property name="tokens" value="CLASS_DEF, METHOD_DEF, CTOR_DEF, LITERAL_FOR, LITERAL_WHILE, LITERAL_DO, STATIC_INIT, INSTANCE_INIT"/>
        </module>

Then it failed to create the profile with this error:

Rule template can't be activated on a Quality profile: checkstyle:com.puppycrawl.tools.checkstyle.checks.coding.IllegalTokenTextCheck 127.0.0.1 - - [14/Apr/2016:13:15:48 +0000] "POST /profiles/create HTTP/1.1" 302 108 "https://sonar.egnyte-internal.com/profiles" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:43.0) Gecko/20100101 Firefox/43.0"

@jakub-bochenski
jakub-bochenski commented 12 days ago

Removing this:

        <module name="IllegalTokenText">
            <property name="tokens" value="STRING_LITERAL, CHAR_LITERAL"/>
            <property name="format" value="\\u00(08|09|0(a|A)|0(c|C)|0(d|D)|22|27|5(C|c))|\\(0(10|11|12|14|15|42|47)|134)"/>
            <property name="message" value="Avoid using corresponding octal or Unicode escape."/>
        </module>

and

        <module name="NoLineWrap"/>

Results in

Value ' LITERAL_FINALLY' must be one of : LITERAL_WHILE, LITERAL_TRY, LITERAL_CATCH, LITERAL_FINALLY, LITERAL_DO, LITERAL_IF, LITERAL_ELSE, LITERAL_FOR, INSTANCE_INIT, STATIC_INIT, LITERAL_SWITCH, LITERAL_SYNCHRONIZED, LITERAL_CASE, LITERAL_DEFAULT, ARRAY_INIT.

Which doesn't make sense.

@jakub-bochenski
jakub-bochenski commented 12 days ago

Removing spaces between elements fixed that resulting in:

Value ' TEXT' must be one of : text,stmnt

after lowercasing it I hit

Rule template can't be activated on a Quality profile: checkstyle:com.puppycrawl.tools.checkstyle.checks.blocks.NeedBracesCheck

so I've removed

        <module name="NeedBraces"/>

resulting in:
Rule template can't be activated on a Quality profile: checkstyle:com.puppycrawl.tools.checkstyle.checks.blocks.LeftCurlyCheck

I'm giving up now as the ruleset is useless with so many changes.

Unable to set existing rules parameters of Checkstyle on Sonarqube from rules xml file

I want to import my checkstyle rules to Sonarqube by setting their parameters according to me. I use Checkstyle Sonar plugin in language Java that my Sonar repository read from rules definition XML file by using RulesDefinitionXmlLoader.

Suppose that I have the following rules XML file to load Sonarqube that contains my custom Checkstyle rules and also LineLength check that is already exists in Checkstyle:

<rules>
    <rule>
        <key>LineLength</key>
        <name>Line Length</name>
        <description>Line Length</description>
        <internalKey>Checker/TreeWalker/LineLength</internalKey>
        <param key="max" name="Max">
            <defaultValue>120</defaultValue>
            <description>Max property with value of '120'</description>
        </param>
    </rule>
    <rule>
        <key>CustomCheck</key>
        <name>CustomCheck</name>
        <description>any custom check</description>
        <internalKey>Checker/TreeWalker/CustomCheck</internalKey>
        <param key="anyParam" name="any">
            <defaultValue>any</defaultValue>
            <description>any param value</description>
        </param>
    </rule>
</rules>

I want to use these rules on Sonarqube. My custom rule and LineLength rule are created on Sonarqube with given parameters. I activated two of them on my used profile. My custom rule successfully works on git pull requests but LineLength check do not works on pull requests. Because there is already LineLength check on Sonarqube that comes from Checkstyle plugin so two LineLength rules seem on the dashboard of Sonarqube. But I want to override existing LineLength check by giving its parameters what I want from my Sonar rule XML file. Note that when I activated two of LineLength rule, two of them successfully works but I do not want to the already existing LineLength rule to work, I want to my LineLength check with my parameters.

Unable to find sonar-checkstyle-plugin-2.4.jar in Nexus

I was able to find the binary for 2.4 of this plugin here:
http://docs.sonarqube.org/display/SONARQUBE45/Checkstyle+Plugin

And this is a direct link:
http://sonarsource.bintray.com/Distribution/sonar-checkstyle-plugin/sonar-checkstyle-plugin-2.4.jar

The problem is that there is a 2.4 version published in Maven
http://search.maven.org/#artifactdetails%7Corg.codehaus.sonar.plugins%7Csonar-checkstyle-plugin%7C2.4%7Csonar-plugin

This is very confusing. Is there a plan to publish the new 2.4 version to Nexus?

missing key 'severity' in SuppressionCommentFilter

Hi Checkstyle team,

I am getting the following exception while running SonarQube analyses. Could you please have a look? I have SonarQube 5.6 (LTS) and Checkstyle 2.4

INFO: Checkstyle configuration: /home/master/workspace/Build-fraud-prediction-proxy-image/.sonar/checkstyle.xml
DEBUG: Severity not set, ignoring exception
com.puppycrawl.tools.checkstyle.api.CheckstyleException: missing key 'severity' in SuppressionCommentFilter
    at com.puppycrawl.tools.checkstyle.DefaultConfiguration.getAttribute(DefaultConfiguration.java:68) ~[checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader$InternalLoader.endElement(ConfigurationLoader.java:481) ~[checkstyle-all-2.4.jar:na]
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:609) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:183) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.emptyElement(XMLDTDValidator.java:766) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:357) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2781) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:118) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:504) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213) [na:1.8.0_91]
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:643) [na:1.8.0_91]
    at com.puppycrawl.tools.checkstyle.api.AbstractLoader.parseInputSource(AbstractLoader.java:99) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.parseInputSource(ConfigurationLoader.java:151) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:230) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:182) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.ConfigurationLoader.loadConfiguration(ConfigurationLoader.java:163) [checkstyle-all-2.4.jar:na]
    at org.sonar.plugins.checkstyle.CheckstyleConfiguration.toCheckstyleConfiguration(CheckstyleConfiguration.java:107) [sonar-checkstyle-plugin-2.4.jar:na]
    at org.sonar.plugins.checkstyle.CheckstyleConfiguration.getCheckstyleConfiguration(CheckstyleConfiguration.java:101) [sonar-checkstyle-plugin-2.4.jar:na]
    at org.sonar.plugins.checkstyle.CheckstyleExecutor.execute(CheckstyleExecutor.java:86) [sonar-checkstyle-plugin-2.4.jar:na]
    at org.sonar.plugins.checkstyle.CheckstyleSensor.analyse(CheckstyleSensor.java:57) [sonar-checkstyle-plugin-2.4.jar:na]
    at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62) [sonar-scanner-api-batch8564566822583896050.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) [sonar-scanner-cli-2.6.1.jar:na]
    at com.sun.proxy.$Proxy0.execute(Unknown Source) [na:na]
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.cli.Main.execute(Main.java:72) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.cli.Main.main(Main.java:60) [sonar-scanner-cli-2.6.1.jar:na]

DEBUG: Keep looking, ignoring exception
com.puppycrawl.tools.checkstyle.api.CheckstyleException: Unable to find class for com.puppycrawl.tools.checkstyle.checks.sizes.SuppressionCommentFilter
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createObject(PackageObjectFactory.java:133) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.doMakeObject(PackageObjectFactory.java:105) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createModule(PackageObjectFactory.java:151) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.Checker.setupChild(Checker.java:158) [checkstyle-all-2.4.jar:na]
    at com.puppycrawl.tools.checkstyle.api.AutomaticBean.configure(AutomaticBean.java:138) [checkstyle-all-2.4.jar:na]
    at org.sonar.plugins.checkstyle.CheckstyleExecutor.execute(CheckstyleExecutor.java:86) [sonar-checkstyle-plugin-2.4.jar:na]
    at org.sonar.plugins.checkstyle.CheckstyleSensor.analyse(CheckstyleSensor.java:57) [sonar-checkstyle-plugin-2.4.jar:na]
    at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ModuleScanContainer.doAfterStart(ModuleScanContainer.java:192) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:241) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:236) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.scan.ProjectScanContainer.doAfterStart(ProjectScanContainer.java:226) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.task.ScanTask.execute(ScanTask.java:47) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.bootstrap.GlobalContainer.executeTask(GlobalContainer.java:106) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.batch.bootstrapper.Batch.executeTask(Batch.java:119) [sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonarsource.scanner.api.internal.batch.BatchIsolatedLauncher.execute(BatchIsolatedLauncher.java:62) [sonar-scanner-api-batch8564566822583896050.jar:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_91]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_91]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_91]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_91]
    at org.sonarsource.scanner.api.internal.IsolatedLauncherProxy.invoke(IsolatedLauncherProxy.java:60) [sonar-scanner-cli-2.6.1.jar:na]
    at com.sun.proxy.$Proxy0.execute(Unknown Source) [na:na]
    at org.sonarsource.scanner.api.EmbeddedScanner.doExecute(EmbeddedScanner.java:240) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.api.EmbeddedScanner.runAnalysis(EmbeddedScanner.java:151) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.cli.Main.runAnalysis(Main.java:110) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.cli.Main.execute(Main.java:72) [sonar-scanner-cli-2.6.1.jar:na]
    at org.sonarsource.scanner.cli.Main.main(Main.java:60) [sonar-scanner-cli-2.6.1.jar:na]
Caused by: java.lang.ClassNotFoundException: com.puppycrawl.tools.checkstyle.checks.sizes.SuppressionCommentFilter
    at org.sonar.classloader.ParentFirstStrategy.loadClass(ParentFirstStrategy.java:39) ~[sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:87) ~[sonar-scanner-engine-shaded-5.6.jar:na]
    at org.sonar.classloader.ClassRealm.loadClass(ClassRealm.java:76) ~[sonar-scanner-engine-shaded-5.6.jar:na]
    at java.lang.Class.forName0(Native Method) ~[na:1.8.0_91]
    at java.lang.Class.forName(Class.java:348) ~[na:1.8.0_91]
    at com.puppycrawl.tools.checkstyle.PackageObjectFactory.createObject(PackageObjectFactory.java:127) [checkstyle-all-2.4.jar:na]
    ... 35 common frames omitted

Thanks a lot for any help!

Change artifact name and provide deployment process

we need to release this plugin with new group/name

location should be at
https://repo1.maven.org/maven2/com/github/

  <groupId>com.github.checkstyle</groupId>
  <artifactId>checkstyle-sonar-plugin</artifactId>
  <version>2.6-SNAPSHOT</version>

attention to artifactId name, it is done to follow names of https://github.com/sevntu-checkstyle/sevntu.checkstyle (maven plugins notation, first name is owner).

deployment could be a script or wiki page with commands.

From SonarQube:

I also asked about what are the conditions to be part of the Update Center from SonarQube (access to updates directly from the UI), as the feature will probably interested you.
Conditions are:
Request For Feedback (RFF) period on the mailing list.
At the end of the RFF, notify a SonarQube(SQ) member through the google group thread, and provide the following information:

  • short description of the version
  • SQ versions compatibility
  • Changelog URL
  • download URL

Our google group is: https://groups.google.com/forum/#!forum/sonarqube
You can directly send an email to the group by using the following email: [email protected]

A few example of RFF thread:
Java 3.13
GitHub Plugin 1.2
Javascript 2.12
Java Properties 1.6

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.