-
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
Config file option to set all violations to errors #5679
Comments
Set strict: true in the configuration. |
I added the following in my
and it did not make any difference. Did I add this correctly? |
Yes, that's how it should work with versions >=0.53.0. |
I am on 0.55.1, and adding |
From my
|
You seem to use the plugin. Are you sure, PS: I recommend using the plugins from the dedicated repository. This comes with a bunch of advantages you can read up in its README. |
Yep, I have down on my ToDo list to switch over to pulling the SPM plugins from https://github.com/SimplyDanny/SwiftLintPlugins instead of https://github.com/realm/SwiftLint. But yes, the
And when we modify the It just doesn't seem like the |
That's a totally different story now. 😅 All options possible in a configuration have a default value which is implicitly set even if an option is not mentioned in a certain configuration. Together with the rule that child configurations specialize parent configurations, the configurations in your packages override the values in your parent. Since That's a bit unfortunate, but it's the way things have worked since forever. That said, and even though a little unwieldy, parent_config: ../../.swiftlint.yml
strict: true should work. |
Yep, that worked. Thanks for your help, @SimplyDanny ! |
I'm not sure if we should ponder whether to change the current semantic, as it's partially confusing indeed. Changing it would mean breaking a lot of existing setups. Also, the "correct" semantic is yet to be defined considering that there can be parent and child configurations. |
I do find it weird that my parent configuration had |
I have filed #5724 to discuss this further. |
New Issue Checklist
New rule request
I want to set all of my SwiftLint violations to be errors instead of warnings.
I realize that if I am running from the command-line (or Build Script Phase) that I can just add the
--strict
option. However, I am using the SwiftLint SPM plugins. So I do not control the invocation of theswiftlint lint
call - the SPM plugin does. The only option that I have is the.swiftlint.yml
file.So I need some way in my
.swiftlint.yml
file to turn the violation severity for every rule to beerror
instead ofwarning
.Is there already some way of doing that?
The text was updated successfully, but these errors were encountered: