code-assert icon indicating copy to clipboard operation
code-assert copied to clipboard

Failure when having rules on a package that only contains packages

Open pkernevez opened this issue 2 years ago • 0 comments

I have a package named 'connectors' that contains several packages but not direct classes. I want to have a rule like:

      DependencyRule common, connector;
  
      @Override
      public void defineRules() {
          common.mustNotUse(connector.allSubOf());
          connector.andAllSub().mayUse(common);
      }

But this test failed:

java.lang.AssertionError: 
Expected: Comply with rules
     but: 
NOT_EXISTING com.xxx.connector              There is a rule for this element, but it has not been found in the code.

But the package exists. If I add a class directly in the package, the error disappears.

Do I miss something ?

pkernevez avatar Jun 15 '22 22:06 pkernevez