Is there a rule to catch usage of specified packages?

(Stephen Palmer) #1

Version: Version 6.7.4 (build 38452)

Is there a rule similar to squid:S1191 - Classes from “sun.*” packages should not be used that enables us to catch the use of other specified packages?

We have some old packages and certain libraries that we used to use, and want to catch any future use of these to prevent their reintroduction into the code base.


(G Ann Campbell) #2


Assuming we’re talking about Java, S3688 will allow you to raise issues on the use of specific classes. It will be tedious to set up all the classes in your package, but it’s at least doable.


(Stephen Palmer) #3

It says we can use a regex to forbid the use of a package which is perfect, thanks