-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Added lenient
command line option
#5801
Added lenient
command line option
#5801
Conversation
Generated by 🚫 Danger |
4c5f7d0
to
fc3c378
Compare
fc3c378
to
5a9b47c
Compare
5a9b47c
to
a399c0b
Compare
The options turn more and more complex. It'd be really useful to have the combinations tested. |
f06b9f3
to
90d3837
Compare
Did you have anything particular in mind - it would be quite easy to expose the logic in |
Not sure if it's clean to move |
Something like this perhaps, which tests the logic, if not the actual violations mapping?
|
fbf54ad
to
ea398f2
Compare
ea398f2
to
1625eb0
Compare
Addresses #5779
So I basically just copied #5226 (which I wrote).
If you have
strict
andlenient
as true in the config file, afatalError
will be thrown, but either can be overridden by the--strict
or--lenient
command line options, and they will also override the opposite setting in the config file.For example, if you have
lenient: true
in your config file, but you specify--strict
on the command line, you will get thestrict
behaviour, and your config file setting will be ignored.I tested this manually - it was hard to do a unit test, because we
fatalError
instead of throwing an error right now.As before,
--strict
and--lenient
on the command line will also fatal error.