Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39940

Add possibility to provide rule description within checkstyle.xml

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Incomplete
    • Icon: Minor Minor
    • checkstyle-plugin
    • None

      Currently a lot of static analysis tools, outside of Java world use checkstyle xml as interop format. But it seems to be extremely hard to plug descriptions for custom rules.

      I haven't found any XSD/DTD for checkstyle xml format, and it looks like format is not defined explicitly, but rather in checkstyle XMLLogger code.

      So would like to propose to add a section to checkstyle xml where descriptions can be provided by application that generates report.

      <?xml version="1.0" encoding="utf-8"?>
      <checkstyle version="4.3">
        <detailed-messages>
          ...
        </detailed-messages>
      </checkstyle>
      

      This format is just to illustrate an idea. Maybe it should be adapted for streaming parser, i.e. include description just after first occurence of error type and then just reference it.

      There is related issue JENKINS-11939 which should solve this issue in a different way, but will require Jenkins admins to maintain and update a list of rules for every linter used.
      Also it may help with closing JENKINS-20516

            drulli Ulli Hafner
            betalb Vitalii Ishchenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: