Skip to content

Regression on code changes and message changes #68

Open
@rnveach

Description

@rnveach

Identified in PR checkstyle/checkstyle#4903 ,

If a PR makes changes to Check logic and changes to a existing message, normal regression will display too many differences as all will be centered around change in message and it will be impossible/hard to discern if any where from code changes.

In this situation, we should force check's message to a specific message for both base and patch runs so only the differences in the code is examined.
Example of configuration for the PR mentioned:

<?xml version="1.0"?>
<!DOCTYPE module PUBLIC
          "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
          "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">

<module name="Checker">
    <property name="charset" value="UTF-8"/>
    <property name="severity" value="warning"/>
    <property name="haltOnException" value="false"/>

    <module name="TreeWalker">
        <module name="SummaryJavadoc">
            <property name="forbiddenSummaryFragments" value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/>
            <message key="summary.first.sentence" value="First sentence of Javadoc is missing an ending period."/>
        </module>
    </module>
</module>

Notice the message is only for summary.first.sentence as that was what was modified in the PR.

Metadata

Metadata

Assignees

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