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

Allow to import checkstyle rules using fully qualified class names instead of short module name

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.11
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      In the checkstyle configuration file a check is usually referred to by a short name for example

      <module name="ModifierOrder">
      </module>
      

      However the resulting class loading that checkstyle does is noticeably slow (we did some profiling) because it iterates over every possible class name and throws and catches a lot of exceptions.

      A fix for this that we use internally and works well is to use the fully qualified class name instead. For example:

      <module name="com.puppycrawl.tools.checkstyle.checks.modifier.ModifierOrderCheck">
      </module>
      

      This works well with checkstyle but it can't be imported into Sonar.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            marschall Philippe Marschall
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: