Issue #13109: Kill mutation for IllegalTokenTextCheck#13200
Issue #13109: Kill mutation for IllegalTokenTextCheck#13200romani merged 1 commit intocheckstyle:masterfrom
Conversation
|
Github, generate report |
|
Report generation failed on phase "parse_body", |
|
Github, generate report |
|
Setter is executed only when property is defined in config. |
|
I really missed it. such one-sided thinking :) |
|
|
||
| public class InputIllegalTokenTextDefaultFormat { | ||
| public void myTest() { | ||
| String test = "a href"; // ok |
There was a problem hiding this comment.
Please remove all ok comments and never use them, it was our mistake to start to use them.
There was a problem hiding this comment.
If i am not wrong the ant task will be failed in mvn clean verify
There was a problem hiding this comment.
Ok, put one unrelated comment over class, to juy cheat this Check. To avoid dealing with this Check, I will try to disable it in separate PR.
There was a problem hiding this comment.
[INFO] --- maven-antrun-plugin:3.1.0:run (ant-phase-verify) @ checkstyle ---
[INFO] Executing tasks
[INFO] [echo] Checkstyle started (checkstyle-checks.xml): 12/06/2023 10:32:21 am
[INFO] [checkstyle] Running Checkstyle on 1507 files
[INFO] [echo] Checkstyle finished (checkstyle-checks.xml) : 12/06/2023 10:33:26 am
[INFO] [echo] Checkstyle started (checkstyle-non-main-files-checks.xml): 12/06/2023 10:32:21 am
[INFO] [checkstyle] Running Checkstyle on 3657 files
[INFO] [echo] Checkstyle finished (checkstyle-non-main-files-checks.xml): 12/06/2023 10:33:26 am
[INFO] [echo]
[INFO] [echo] Checkstyle started (checkstyle-resources-checks.xml): 12/06/2023 10:32:21 am
[INFO] [checkstyle] Running Checkstyle on 3307 files
[INFO] [echo] Checkstyle finished (checkstyle-resources-checks.xml): 12/06/2023 10:33:26 am
[INFO] [echo] Checkstyle started (checkstyle-input-checks.xml): 12/06/2023 10:32:21 am
[INFO] [checkstyle] Running Checkstyle on 2102 files
[ERROR] [checkstyle] [ERROR] /home/kevin/Desktop/check_style/checkstyle/checkstyle/src/test/resources/com/puppycrawl/tools/checkstyle/checks/coding/illegaltokentext/InputIllegalTokenTextDefaultFormat.java:0: All check input files in the 'src/(it|test)/resources*/' folder must have trailing comments "// ok" and/or "// violation". [StyleValidationCommentInInputs]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 03:16 min
[INFO] Finished at: 2023-06-12T10:35:27+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.1.0:run (ant-phase-verify) on project checkstyle: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] /home/kevin/Desktop/check_style/checkstyle/checkstyle/config/ant-phase-verify.xml:192: Got 1 errors and 0 warnings.
[ERROR] around Ant part ...<ant antfile="config/ant-phase-verify.xml" />... @ 6:50 in /home/kevin/Desktop/check_style/checkstyle/checkstyle/target/antrun/build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
There was a problem hiding this comment.
@Kevin222004 Simply remove trailing //ok comments from variable defs and place one at class level i.e.
public class InputIllegalTokenTextDefaultFormat { // ok
Issue #13109: Kill mutation for IllegalTokenTextCheck
Check
https://checkstyle.org/config_coding.html#IllegalTokenText
Mutation covered
checkstyle/config/pitest-suppressions/pitest-coding-2-suppressions.xml
Lines 57 to 73 in eaed451
Explaintaion
Test cases added
Regression
Diff Regression config: https://gist.githubusercontent.com/Kevin222004/13ca2532a9d40774066ac08c558f4111/raw/e41a49826864eac40ca16a3d2865cfb993255e98/IllegalTokenText.xml
Diff Regression projects: https://gist.githubusercontent.com/Kevin222004/21e3934e85f802e2fbd48af06d122364/raw/604256badd733d8568064f371d55657c04b00dfd/test-projects-2.properties
Report label: Report-2