You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I’ve had some false positives with CNC_COLLECTION_NAMING_CONFUSION when using names like offset, asset for collections that were not sets.
I think CNC_COLLECTION_NAMING_CONFUSION should only match if the magic words it searches for (map/set/list/queue) are single words on camel/snake case boundaries.
For example, the following should match:
map
Map
MAP
asSet
SOME_SET
While these shouldn’t:
asset
spielbergsEt
runNmap
COMMAND_NMAP
TAG_NAMES_LI_ST
Also, I’m not sure why you’re excluding toset from the check. Shouldn’t a method named toSet usually return a set?
I suggest you also include checks for the words deque and stack (which should match the java.util.Deque interface).
The text was updated successfully, but these errors were encountered:
sabberworm
changed the title
CNC_COLLECTION_NAMING_CONFUSION should match entire words
CNC_COLLECTION_NAMING_CONFUSION should match entire words only
Aug 3, 2020
I’ve had some false positives with
CNC_COLLECTION_NAMING_CONFUSION
when using names likeoffset
,asset
for collections that were not sets.I think
CNC_COLLECTION_NAMING_CONFUSION
should only match if the magic words it searches for (map/set/list/queue) are single words on camel/snake case boundaries.For example, the following should match:
While these shouldn’t:
Also, I’m not sure why you’re excluding
toset
from the check. Shouldn’t a method namedtoSet
usually return a set?I suggest you also include checks for the words
deque
andstack
(which should match the java.util.Deque interface).The text was updated successfully, but these errors were encountered: