Is there a rule to catch usage of specified packages?

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.

Thanks

Hi,

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.

 
Ann

1 Like

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

1 Like