UTAO (Unit Test Assertion Oddities) rank issues?
Brought to you by:
dbrosius
A number of UTAO detectors seem to have unreasonably severe ranks. All of the following report a rank of 7 (scary) for what seems to just be a suboptimal, but still valid, choice of assert method to use:
UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_EQUALS
UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS
UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL
UTAO_JUNIT_ASSERTION_ODDITIES_USE_ASSERT_NULL
UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_EQUALS
UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_EQUALS
UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL
UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NULL
This rank could be a typo that was copy and pasted around, as similar UTAO detectors such as UTAO_TESTNG_ASSERTION_ODDITIES_BOOLEAN_ASSERT report a rank of 17--only one edit distance away.
If you agree that the ranks of the mentioned detectors are overly severe and should be adjusted, it would also be appreciated if you could check the other UTAO detectors while you're at it.
The odd thing about FindBugs is that there is this disconnect betwen these 'scary' ranks and what the programmer uses. So the programmer controls how a bug report is produced by choosing bug ranks of LOW, MEDIUM and HIGH. and then can alter them with a bugrank file.
All the UTAO bug patterns are logged at MEDIUM or LOW, and with bugranks adjustments of 0. (none)
The only bug rank modifications are for tests that don't have any asserts, or are using the deprecated junit apis.
I'm not sure why FindBugs considered a NORMAL bug as 'scary",
Let me look into how that mapping actually happens, i agree they really shouldn't be scary
ok, i've juggled the bugranks to get these out of the scary ranks. thanks for the report. btw, this project is actively maintained on github.com/mebigfatguy/fb-contrib
Ah, I seem too have missed the github link on the project page. If I have any other feedback, I'll make sure to give it there.
Thanks!