Closed skuzzle closed 1 year ago
Is the
overall this idea works.
Ok, for a first version I will leave it as outlined in the top comment. The feature will be marked as experimental. Consolidation of not fixable and allowed imports can happen with a next major version. Also I'll add some validation of whether a not fixable definition is actually required in a follow-up version. That will help to keep the build clean in case a not fixable entry isn't actually needed anymore.
This PR introduces the concept of not-fixables classes/compilation units. Those are identified by a single package pattern. Per not-fixable class one can specify one or more package patterns that are allowed here even if they are otherwise banned.
Configuration examples:
What I don't quite like is the considerate functional overlap between
<notFixable>
and<allowedImports>
. In fact the latter can be represented as<notFixable><in>**</in><allowImports>...</allowImports></notFixable>
. One difference is that allowedImports are applied per group while notFixables are valid globally independent of any group.So maybe this will result in deprecating
<allowedImports>
but I don't like the implications this has to our users as they'd have to eventually restructure their configurations.Closes #63