Skip to content

Pint severity levels are not mapped to checkstyle severity levels in checkstyle export #1225

@sboschman

Description

@sboschman

The severity level exported in checkstyle xml format is the pint severity (pint code) / pint severity levels). So Bug and Informational are exported as severity level values in the checkstyle xml.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<checkstyle version="4.3">
  <file name="rule.yaml">
    <error line="289" severity="Information" message="..."></error>
...

On the other hand the defined severity levels for checkstyle are: ignore, info, warning and error.

This requires some post pint modifications on the resulting pint checkstyle xml to be able to use the xml as input for other tools, e.g. reviewdog. As these tools expect the checkstyle severity levels and are unable to handle to pint severity levels.

My suggestion is to add a simple severity mapping in the checkstyle export:

pint severity checkstyle severity
Bug error
Warning warning
Informational info

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions