-
Notifications
You must be signed in to change notification settings - Fork 42
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
Using --path option ignores the root folder config file #105
Comments
there is no "project root" so yes adding --config is a good feature |
I agree with the points, there's no such thing as root folder. I personally like Regardless, it would be nice to have I've changed the title to make this a feature request rather than issue with |
|
@mgrebenets could you test new option --config I am wondering how rules path must be managed, according to "--path" so the files must contains
and not
I think the best is to do like swiftlint... |
I make some test with swiftlint on this project which defined
So he look files according to "--path" option, the working directory (so Sources/Sources and find nothing) |
What I get with the tests is this: The storyboard I want to ignore is excluded:
- Apps/MyApp/WatchKitApp/Shared When running from the location of the config: # From location of .iblinter.yml
iblinter --config $(pwd)/.iblinter.yml
# or
iblinter The file gets ignored as expected. When running like so: iblinter --config $(pwd)/.iblinter.yml --path Apps/MyApp/WatchKitApp/Shared the file is linted. I think this is how SwiftLint is behaving. Overall, the main reason I wanted to ignore storyboard is because it was crashing (#104). Now when there is no crash, it becomes less critical. |
So we could do better than swiftlint by making an other option in command or in configuration file, to specify that file path are relative to configuration file, and not working directory |
Hi there
So I'm facing the issue which is actually very common for all other linters and formatters, such as SwiftLint and SwiftFormat.
I've created a file called
.iblinter.yml
in my project root folder, and I choose to ignore all storyboards inExample/Storyboards
path.This all works as expected if I just run
iblinter
in the root folder.But, if I use
--path
option, e.g.iblinter --path Example
, then IBLinter ignores my config file even if I run this command from the project root.As I said, this is not something specific for IBLinter, SwiftFormat and SwiftLint have same behavior.
While I must say
rubocop
is different and respects config files from the project root.With SwiftLint and SwiftFormat I was able to use
-c / --config
option and tell the tools that doesn't matter which paths I want to check, they still should use specific config file.IBLinter is missing the
-c / --config
option though.Could this option be added?
Then I would be able to run
and all my custom rules / exclude paths defined in the config will still apply
The text was updated successfully, but these errors were encountered: