-
Notifications
You must be signed in to change notification settings - Fork 528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue of non-reseting prefixes #183
Fix issue of non-reseting prefixes #183
Conversation
I'm not sure about this.. We are adding extra steps to the linter to fix issues with our tests, this seems completely backwards to me, we should alter the way tests are set and run rather than modify the listing functionality? |
This only resets the prefixes for the rule. Assertions shouldn't be modifying code for the next one. Each assertion should have equal conditions. I noticed this issue when I create another assertion using the defaults and received a different amount of warnings compared to the first time it had run. |
As we just discussed, I don't think the prefixes should be set within the module itself, though having the default prefixes as immutable within is good and a copy of this array should be the one we mutate. This will prevent the problem in the tests and also be just general good practice.. |
Yep agreed! Update pushed. |
Going to tighten this up further. |
Yeah this makes sense. 👍 |
…new-assertion Fix issue of non-reseting prefixes
…array-on-new-assertion Fix issue of non-reseting prefixes
Fixes an issue where any modification to the prefixes array when testing using assertions gets carried across to the next. The issue is fixed by always setting the initial prefixes each time an assertion is run.
Closes #182
DCO 1.1 Signed-off-by: Ben Griffith [email protected]