Join GitHub today
Feature request: option to force exclusion #2051
New Issue Checklist
Hello! I like SwiftLint a lot, so much so that I built a tool called danger-ruby-swiftlint to run SwiftLint on CI with Danger. The way the tool works is it runs SwiftLint against each file that's been changed in a pull request, and reports any violations to GitHub in a comment. However, we've run into a problem, reported here.
Here's the scenario:
To be clear: I don't think this is a bug in SwiftLint. It's just a sort of edge case that I've hit. I had a very similar problem with my very similar danger-rubocop tool, but was able to get around it using Rubocop's
Could we add something equivalent to Rubocop's
I totally understand that this probably isn't a high priority. What I'm really looking for here is a
Thanks for considering it!
My initial thought on this is that this would be useful if it's not too hard to implement/maintain.
I think having the exact same flag on the
Also: do you know about other use cases for this flag? I'm wondering if there's any use case where it'd be helpful to specify it on the configuration file instead of in the command.
@marcelofabri that's a good question about use cases. I did some research and the only use cases I can find for Rubocop's
Concerning whether or not this should be a flag vs a config file option, I don't see any downsides either way. Because SwiftLint doesn't appear to have any flags in the
I think having the same flag for autocorrecting would make sense.
If the majority of use cases would for tools to use it, I think it'd be better to make it an option instead of a configuration, because then consumers wouldn't need to change anything on their project.
SwiftLint does have some options, so I think it'd be fine:
A PR would be very welcome