Expected behavior: specific excludes should override broad includes (and vice-versa)
<enunciate ...>
...
<api-classes>
<include pattern="com.mycompany.**"/>
<exclude pattern="com.mycompany.ExceptThisClass"/>
<!-- ^^^ This class should be explicitly excluded ^^^ -->
</api-classes>
...
</enunciate>
Actual behavior: (includes both broad and specific take precedence over excludes)
<enunciate ...>
...
<api-classes>
<include pattern="com.mycompany.**"/>
<exclude pattern="com.mycompany.ExceptThisClass"/>
<!-- ^^^ This class is still included anyway. ^^^ -->
</api-classes>
...
</enunciate>
So merging this PR would invalidate that new documentation.
I think this PR provides a minor improvement to how includes and excludes are used.
Future Discussion:
I think long-term; a more appropriate behavior (less violating of the Principle of Least Astonishment) would be for exact names (a.b.C) to have priority over Ant patterns (a.b.**)
I think the ideal include/exclude paradigm would look like:
Sources:
Expected behavior: specific excludes should override broad includes (and vice-versa)
Actual behavior: (includes both broad and specific take precedence over excludes)
I just mentioned this on: https://github.com/stoicflame/enunciate/wiki/Excluding-Including-Classes
So merging this PR would invalidate that new documentation.
I think this PR provides a minor improvement to how includes and excludes are used.
Future Discussion: I think long-term; a more appropriate behavior (less violating of the Principle of Least Astonishment) would be for exact names (a.b.C) to have priority over Ant patterns (a.b.**)
I think the ideal include/exclude paradigm would look like: Sources:
Config:
Results in
(unless of course they were explicitly referenced in a class and picked up that way.)