I have been using ‘Track uses of disallowed classes’ to hinder parts of my code to import code from areas it should not.
While doing so I noticed two things that could either improve the feature or maybe a bug and was asked to make a new thread for it.
Possible new feature: Allow the regexp for class to start with a wildcard.
E.g if I want to exclude all classes from *.fruits.* I have to add a the root node, e.g things.*.fruits.*. Allowing * at the start would help if you have multiple starts with fruits in them e.g oceanThings.*.fruits.* and landThings.*.fruits.*
Possible bug: Importing constants from a disallowed class is not noticed.
E.g I dissallowe things.*.fruits.* and in my code I use
I do not get an error.
But if I where to do:
I do get an error.