Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#300 Add Category attribute in the xml file

open
nobody
None
5
2012-10-10
2004-06-01
vbrabant
No

Dear,
We would like to build metrics report of our code.
But the result of thoses metrics must be for the
management.
So I have to produce somes nice graphs.

They graphs will contains classic metrics, but also
somes sanity checks metrics.

For sanity checks metrics, we will use Checkstyle. And
would like to produce metrics for each category.

The problem is that, in the generated xml file, for
each error, I have the severity, the source, but not
the category it belongs.

It would be nice if I could have also the category
appearing as attribute of the error:
* Javadoc Comments
* Naming Conventions
* Headers
* Imports
* Size Violations
* Whitespace
* Modifiers
* Blocks
* Coding Problems
* Class Design
* Duplicate Code
* Metrics Checks
* Miscellaneous Checks
* Optional Checks

Could you consider to add those informations in the xml
file ?
And/Or maybe also provide a way to create his own
categories.

Or if someones of you already did the same, could you
please share with me ?

Thanks a lot

Discussion

  • Rick Giles
    Rick Giles
    2004-06-24

    Logged In: YES
    user_id=539926

    The categories above are implicit in the full package name
    of the source attribute value for an error element. Can you
    accomplish what you want with XSLT instruction <xsl:choose>
    and function starts-with()?

     
  • Logged In: YES
    user_id=695103

    I would like this functionality in the errors as well. Using
    the package name sound rather like a quick fix.

    I would also like to include the category in the module
    definition in the checkstyle configuration, as this would be
    VERY beneficial for generating a coding standards document
    from the checkstyle configuration.

     
  • Lars Kühne
    Lars Kühne
    2004-06-29

    Logged In: YES
    user_id=401384

    Martijn, to store additional data in your checkstyle config
    file you can use the "metadata" as a subelement of each
    module. Unfortunately metadata is not currently documented :-(

    Example for you usecase (note you are free to choose your
    own categories):

    <module name="NeedBraces">

    The Checkstyle configuration parser will ignore metadata (it
    was originally meant to be used by IDE plugin authors).