codemodder-java icon indicating copy to clipboard operation
codemodder-java copied to clipboard

🚨 Fix Sonar Warnings About Boxed Primitives

Open gilday opened this issue 1 year ago • 3 comments

Sonar correctly identifies that we should prefer specialized function types that use primitive ints.

/towards #work

gilday avatar Jun 27 '24 01:06 gilday

I rejected this suggestion originally by Sonar because column is intentionally null. Binary scanners and IAST tools won't provide it.

nahsra avatar Jun 27 '24 02:06 nahsra

I pushed a change that makes the column retrieval strategy all or nothing: the codemod for the tool x rule combination either always supplies column data or never supplies it. It doesn't leave room for a codemod that sometimes provides column data.

I think this assumption is too strong. I'm thinking a more flexible design that allows for a codemod to sometimes provide the column data and sometimes not provide it may be better. However, I don't have an example of a codemod that needs to sometimes pass column information.

I don't want to belabor this too much, but I think I finally understand what's happening here, so I'm going to make that change and be done with this.

gilday avatar Jul 18 '24 19:07 gilday

Got out of date, and we recently switched remediator to another interface.

nahsra avatar Oct 15 '24 13:10 nahsra