Skip to content

Custom rules not working in SonarQube 7.3+ #37

@hindsholm

Description

@hindsholm

I have noticed that my custom rules have stopped working, and indeed the integration tests confirm this:
mvn clean -Pits -Dsonar.runtimeVersion=X fails for X=7.3 or 7.4 but it works with X=LTS (6.7).
The surefire report contains:

-------------------------------------------------------------------------------
Test set: org.sonar.json.Tests
-------------------------------------------------------------------------------
Tests run: 7, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 176.435 s <<< FAILURE! - in org.sonar.json.Tests
issues_against_rule_forbidden_string(org.sonar.json.CustomRulesTest)  Time elapsed: 0.11 s  <<< FAILURE!
java.lang.AssertionError: expected size:<1> but was:<0> for <[]>
	at org.sonar.json.CustomRulesTest.issues_against_rule_forbidden_string(CustomRulesTest.java:78)

issues_against_rule_forbidden_keys(org.sonar.json.CustomRulesTest)  Time elapsed: 0.015 s  <<< FAILURE!
java.lang.AssertionError: expected size:<1> but was:<0> for <[]>
	at org.sonar.json.CustomRulesTest.issues_against_rule_forbidden_keys(CustomRulesTest.java:65)

See also racodond/sonar-json-custom-rules-plugin#1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions