Issue #14945: new check UnnecessaryNullCheckWithInstanceOf#16489
Conversation
|
@romani unexpected output: C:\Users\anmol\IdeaProjects\checkstyle3\src\it\resources\
org\checkstyle\suppressionxpathfilter\unnecessarynullwithinstanceof\
InputXpathUnnecessaryNullCheckWithInstanceOf.java:5:13: Unnecessary nullity check with instanceof operator.
expected: 0
but was : 1
Expected :0
Actual :1
<Click to see difference>The Xpath test is failing, do i need to configure something related to the new check . It seems like the XPath query isn't suppressing the violation, causing it to be flagged at: verify(treeWalkerConfigWithXpath, fileToProcess.getPath(), CommonUtil.EMPTY_STRING_ARRAY);please have a look. |
3a60e0c to
a801670
Compare
923ef37 to
50ec692
Compare
|
@romani all CI is green, please review |
Just use google, we do not have any maintainers that can read or write these |
thanks @nrmancuso |
e8b4fb3 to
f324a11
Compare
|
@mahfouz72 , as this is your issue please be welcome to review first. |
|
@Anmol202005 , please read on how to do regression testing for new modules we need report of how it works in wild reallife code. |
|
github, generate site |
806dd59 to
e99d147
Compare
|
Github, generate report |
|
GitHub, generate website |
f2be459 to
1abfd1e
Compare
|
based on #16489 (comment) please send PRs to following projects (you can send updates to any other projects too): to prove that people are welcoming such updates, and validations is correct. and eventual auto-fix will be well welcomed also. |
73b47e0 to
fdc3659
Compare
a333484 to
0eec961
Compare
0eec961 to
ac0d5f4
Compare
ac0d5f4 to
bbae580
Compare
romani
left a comment
There was a problem hiding this comment.
great job!
we will merge after CI pass.
fixes #14945
New module config: https://gist.githubusercontent.com/Anmol202005/682f29f02f13ab7d347ce269901b8e5c/raw/81e58cd3889446580d12ed949ebcf1fb3f726777/check.xml
Contribution PR: checkstyle/contribution#925