We have two rules:
- modules:
- name:
- "**.*Spec"
within:
- Main
- Spec
- name:
- "Handler.**"
within:
- "Handler.**"
- "**.*Spec"
The intention of these rules are:
- You should not import
Spec modules except in defining tests. Shared helpers should be extracted to utility modules.
- You should not import
Handler modules except in Handler code and in tests for Handler code.
However, the rules appear to be merged. We recently discovered that rules matching the first were not being triggered except in pre-commit, which was only loading that rule. However, these rules were not being enforced in CI or in our make hlint or make hlint-all commands, which loaded all of the rules.
I am working up a minimal reproduction of this behavior.
EDIT:
- Does not appear to trigger with
hlint-3.8 from Hackage. We are using a patched hlint - verifying that this isn't something specific to us...