You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifying the path to the file causes the directory's .swiftlint.yml to be ignored.
$ swiftlint lint --no-cache --quiet # Not path specified, no warning as expected
$ swiftlint lint --no-cache --quiet --path subdir # Directory path specified, no warning
$ swiftlint lint --no-cache --quiet --path subdir/MyCode.swift # Specifying the file path gets you an unexpected warning
.../subdir/MyCode.swift:1:4: warning: Todo Violation: TODOs should be avoided (ABCDEFG). (todo)
$ swiftlint lint --no-cache --quiet --path $PWD/subdir/MyCode.swift # Same problem with the full path
.../subdir/MyCode.swift:1:4: warning: Todo Violation: TODOs should be avoided (ABCDEFG). (todo)
It seems to me that SwiftLint should automatically look if there is a .swiftlint.yml the directory the file is in, and then its parent directories.
Note if you are in the directory the file is in, no warning is displayed.
Environment
SwiftLint version (run swiftlint version to be sure)?
0.23.0
Installation method used (Homebrew, CocoaPods, building from source, etc)?
@SDGGiesbrecht, I wouldn't have been surprised even if SwiftLint was looking for .swiftlint.yml up to the / root directory (starting from where the Swift file is).
What you name A) --subdirectory and B) --project would probably cover all my use cases (but I would need both).
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!
stalebot
added
the
wontfix
Issues that became stale and were auto-closed by a bot.
label
Nov 8, 2020
New Issue Checklist
Bug Report
Create the following 2 files in a subdirectory.
Specifying the path to the file causes the directory's
.swiftlint.yml
to be ignored.It seems to me that SwiftLint should automatically look if there is a .swiftlint.yml the directory the file is in, and then its parent directories.
Note if you are in the directory the file is in, no warning is displayed.
Environment
swiftlint version
to be sure)?The text was updated successfully, but these errors were encountered: