Have a rule apply to a particular Java submodule

I have a custom rule we built for a particular project that works correctly. However, as the project is expanding, we need it to apply only to classes inside a specific module.
Right now it seems to me the rule is a very little modified copy of the tutorial rule, using a rulesDefinition implementation to add the check to be enforced to all classes. But I just want it to apply to classes in a module I wish to name. I couldn’t find an example like that, can anyone point me to a sample that does that?

Thanks in advance!

Hey there.

Instead of trying to craft logic inside the rule to skip other modules, I would reccomend checking the documentation on Narrowing the Focus > Ignore Issue > Restrict Scope of Coding Rules