-
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
SwiftPM skip dependencies by default #1637
Comments
I don't agree that this should be the default behavior, since people can use different structures for their project and/or want that the dependencies are linted as well. |
Ignoring uneditable dependencies seems like a reasonable default to me.
By default, you could ignore Since Swift 3, packages only appear in the It would be very bad practice to make changes to a normal, uneditable package hiding inside
I am aware of this. But do you really think someone will ever put source code in folder named If you are still not satisfied, you could always add a command line flag (Actually, since the Swift Package Manager is part of the language itself, and I see no conflict with Xcode, it would probably make more sense to instead implement it as opt‐out—a
That will not lint Or, have a look at Workspace, which I wrote to corral SwiftLint and other tools into interoperating better with the Swift Package Manager. Making SwiftLint skip dependencies is one of the things it automates. |
I thought the issue was talking about |
Yeah, that's what I'm doing now and it's working just fine. |
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions! |
This caused me confusion today. I'll exclude it as mentioned above, but I agree that is should be disabled by default. |
When running
swiftlint
in an SPM project it recursively lints all the dependencies as well, which is almost never useful behavior, since the dependencies are out of the control of the user running the command. I'm aware the workaround is to only runswiftlint
in theSources
andTests
directories or to use theexcludes
directive, but it still seems like this should be the default behavior.The text was updated successfully, but these errors were encountered: