Issue #14981: Add new property to skip FinalLocalVariable violations …#14983
Conversation
|
Github, generate site |
d5ab5a4 to
54869e0
Compare
|
Github, generate report |
54869e0 to
aff88c0
Compare
aff88c0 to
5237ebb
Compare
|
Github, generate site |
|
Report generation failed on phase "make_report", |
|
Github, generate report |
|
Report generation failed on phase "make_report", |
|
@rnveach @nrmancuso pitest-utils is red because I would go for adding this test class to the targetTest. I think all check tests should be there |
I am not seeing any updates to the POM in this PR, so I am not sure how you say configuration is good. It sounds like POM should add |
nrmancuso
left a comment
There was a problem hiding this comment.
I am good to merge this after one item, and successful diff report:
| public static boolean isUnnamed(DetailAST identifierAst) { | ||
| return "_".equals(identifierAst.getText()); | ||
| } |
There was a problem hiding this comment.
Let's wait for utility until we need this in more than one place
There was a problem hiding this comment.
This condition is no simple, I am not even sure it is worthy of having a utility method
There was a problem hiding this comment.
ok, yes it is very simple I just put it there because we will need to use it a lot instead of putting it in the checks classes
@rnveach here I was talking about the report generation and the regression config
|
5237ebb to
5689f7d
Compare
| /** | ||
| * Control whether to check | ||
| * <a href="https://docs.oracle.com/javase/specs/jls/se21/preview/specs/unnamed-jls.html"> | ||
| * unnamed variables </a>. | ||
| */ |
There was a problem hiding this comment.
JLS doesn't have a separate section for this I just went to (https://docs.oracle.com/javase/specs/index.html) and copied the link of the last review for this feature is this ok?
There was a problem hiding this comment.
Is there some way we can use a non-preview JLS? Nothing we are doing is preview only, right?
5689f7d to
222b855
Compare
|
https://gist.githubusercontent.com/mahfouz72/afd57aa6e51ca161b7927acd959e5211/raw/545956596861401a2bb555f7c7a08b8421247f2c/check.xml |
|
ohh, Thank you |
| } | ||
| final int _ = sideEffect(); | ||
| int _ = sideEffect(); | ||
| int _result = sideEffect(); // violation |
There was a problem hiding this comment.
Please add violation messages, always
| <tr> | ||
| <td>validateUnnamedVariables</td> | ||
| <td>Control whether to check <a href="https://docs.oracle.com/javase/specs/jls/se21/preview/specs/unnamed-jls.html"> | ||
| unnamed variables </a>.</td> |
There was a problem hiding this comment.
Why do we always have a space between s and </a>?
There was a problem hiding this comment.
@nrmancuso I noticed that the spaces come again when I made mvn verify I don't why is it something related to the xml files generation or something?
There was a problem hiding this comment.
Remove it from the setter in the javadoc.
There was a problem hiding this comment.
is it generated from the setter? I thought from the Javadoc on class field
There was a problem hiding this comment.
The javadoc on the class is derived from the others as it is an accumulation of multiple pieces, mostly from the xdoc.
3502ae0 to
0788aad
Compare
|
Github, generate report |
|
Github, generate site |
0788aad to
9e0fd51
Compare
|
Github, generate site |
…iolations on unnamed variables
9e0fd51 to
bb18ca9
Compare
|
Github, generate site |
closes #14981
added a new property named
validateUnnamedVariablesto control whether to validate unnamed variables the default value falseDiff Regression config: https://gist.githubusercontent.com/mahfouz72/afd57aa6e51ca161b7927acd959e5211/raw/2cceba105232745543e237d50c0c4a38883be735/check.xml
Diff Regression patch config: https://gist.githubusercontent.com/mahfouz72/33967bf86e4a29cafa429771b0e95808/raw/a13fee304bdf4e853b3de5dd71a3c4aece177445/check_patch.xml
Diff Regression projects: https://gist.githubusercontent.com/mahfouz72/a3d0af030c8f5efd0d8a39f2c14750bc/raw/a3424ad9b6f722e5de1a927e3d85e383101b2b93/projects-to-test-on.properties