Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-3724

API: allow to validate rule repositories in unit tests

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.3
    • Component/s: Plugin API, Rules
    • Labels:
      None

      Description

      Rule name and description are mandatory. Server fails to start if they're not defined :

      23:20:59.533 ERROR org.sonar.server.platform.Platform The following rule (repository: checkstyle) must have a description: Rule[id=<null>,name=Class Type Parameter Name,key=com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName,configKey=Checker/TreeWalker/ClassTypeParameterName,plugin=<null>,enabled=true,severity=MAJOR,cardinality=SINGLE]
      org.sonar.api.utils.SonarException: The following rule (repository: checkstyle) must have a description: Rule[id=<null>,name=Class Type Parameter Name,key=com.puppycrawl.tools.checkstyle.checks.naming.ClassTypeParameterName,configKey=Checker/TreeWalker/ClassTypeParameterName,plugin=<null>,enabled=true,severity=MAJOR,cardinality=SINGLE]
      	at org.sonar.server.startup.RegisterRules.validateRule(RegisterRules.java:121) ~[classes/:na]
      

      Missing names and descriptions should be detected as soon as possible, without requiring to start sonar.

        Attachments

          Activity

            People

            Assignee:
            dgageot David Gageot
            Reporter:
            simon.brandhof Simon Brandhof (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: