-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expand XPath IT Regression Testing #6207
Comments
Hi, is this issue still valid? I can contribute some of these missing tests. |
It is still valid as long as we are missing these tests. |
Before moving further on this ticket, I just want to make an exhaustive list of checks to be tested. So that we are all aware of the test effort. They are extracted from https://checkstyle.sourceforge.io/config_filters.html#SuppressionXpathFilter_Description Actual tracker is at issue description. Outdated tracker:
Are we still good about it? Personally I'm happy to contribute, it's a good opportunity to learn different rules. |
Thank you very much !! it would be awesome is you create UT with list like - https://github.com/checkstyle/checkstyle/pull/6969/files#diff-67a0806621fe751520ab842060ba14fcL106 , see whole change of #6969 it show how @pbludov improve step by step , but it is very enforced validation on each change, new Checks already come in better form in first commit. |
You are welcome. I'm very glad to be here, because Checkstyle helps me a lot in my daily job.
Thanks for the hint. I will create it.
Automation is better 😄 |
…lityClassConstructor
…tComplexityCheck
Identified at #6198 (comment) ,
We need to expand XPath IT Regression to all checks that support it.
All checks listed under Currently, filter supports the following checks must appear with regression tests in https://github.com/checkstyle/checkstyle/tree/master/src/it/java/org/checkstyle/suppressionxpathfilter to showcase suppression by XPath works for the check.
Every log statement must be tested from the Check. There should be at least 3 test methods for different structure of code.
Example: if 1 check has 2 log statements, the XPath test must have at least 3 tests, 1 for each log statement + 1 for some weird usecase like very nested violation.
If Check has 1 log statement, but target of check can be in different localtions (in class, in method, in interface, in anonymous class), Check should have at least 3 test methods to have different xpath by structure.
Tests can be copy of examples from our normal test tier at https://github.com/checkstyle/checkstyle/tree/master/src/test/java/com/puppycrawl/tools/checkstyle/checks just smaller.
Each PR must contain only 1 check. Each PR must contain a link to the check's documentation in the first post. (Ex: https://checkstyle.org/config_coding.html#ArrayTrailingComma for ArrayTrailingCommaCheck)
Input files for each test update must be named according to the convention "
InputXpath{Checkname}Xxxx
". The 'Checkname' will be the check for which we are doing test update and 'Xxxx' must be a proper suffix that specifies what the input file is testing.Inputs does not know what config will be used.
Xpath also does not care much on config.
So better to name Inputs by content that they have or violation they have. Example: InputXpathModifiedControlVariableWithForeach
List of remaining Checks for which we need to expand Xpath IT Regression Testing -
checkstyle/src/test/java/com/puppycrawl/tools/checkstyle/internal/XpathRegressionTest.java
Lines 93 to 100 in 627c7d1
The text was updated successfully, but these errors were encountered: