[
https://issues.apache.org/jira/browse/MCHECKSTYLE-385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Marwell resolved MCHECKSTYLE-385.
------------------------------------------
Fix Version/s: 3.1.2
Assignee: Benjamin Marwell
Resolution: Fixed
> Violation should be a value class
> ---------------------------------
>
> Key: MCHECKSTYLE-385
> URL: https://issues.apache.org/jira/browse/MCHECKSTYLE-385
> Project: Maven Checkstyle Plugin
> Issue Type: Improvement
> Components: checkstyle:check
> Affects Versions: 3.1.0
> Environment: Any (Linux, Window OS, etc.)
> Reporter: Benjamin Marwell
> Assignee: Benjamin Marwell
> Priority: Minor
> Labels: easyfix, pull-request-available
> Fix For: 3.1.2
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Dear developers,
> while starting to implement the feature
> https://issues.apache.org/jira/browse/MCHECKSTYLE-356, I found out that a
> refactoring is needed.
>
> The method {color:#403294}{{int countViolations(Parser)}}{color} does so many
> things besides counting violations. Some of them are:
> * checking, if printing violations is wanted.
> * actually printing violations
> * counting violations
> * counting ignored violations
> * checking ignored violations count > 0 and logging
> * Keeping track of file changes
> I would like to rework this part of the code with no functional changes by
> creating a "Violation" value class.
> PR follows.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)