Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

When --path is used, the directory's .swiftlint.yml is ignored #1631

Closed
vincentisambart opened this issue Jun 20, 2017 · 1 comment · Fixed by #1644
Closed

When --path is used, the directory's .swiftlint.yml is ignored #1631

vincentisambart opened this issue Jun 20, 2017 · 1 comment · Fixed by #1644
Labels
bug Unexpected and reproducible misbehavior.

Comments

@vincentisambart
Copy link

When using SwiftLint 0.20.0, when specifying a path (that is not the current directory) with --path, that directory's .swiftlint.yml is ignored.

To reproduce it, just create the following 2 files in a subdirectory.

# subdir/.swiftlint.yml
disabled_rules:
  - todo
// subdir/MyCode.swift
// TODO: ABCDEFG

Specifying the path 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 # Specifying the path gets you an unexpected warning
.../subdir/MyCode.swift:2:4: warning: Todo Violation: TODOs should be avoided (ABCDEFG). (todo)
@marcelofabri
Copy link
Collaborator

Thanks for the detailed issue. This is probably a side effect of #1604, in case someone wants to take a look at it.

I'll try to check it later.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Unexpected and reproducible misbehavior.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants