-
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
Support non Swift files in --file
argument
#1755
Conversation
Generated by 🚫 Danger |
542f91e
to
bc00097
Compare
Codecov Report
@@ Coverage Diff @@
## master #1755 +/- ##
=========================================
+ Coverage 87.78% 87.8% +0.02%
=========================================
Files 219 219
Lines 10730 10730
=========================================
+ Hits 9419 9422 +3
+ Misses 1311 1308 -3
Continue to review full report at Codecov.
|
@@ -21,7 +21,7 @@ extension FileManager: LintableFileManager { | |||
.standardizingPath | |||
|
|||
// if path is a file, it won't be returned in `enumerator(atPath:)` | |||
if absolutePath.bridge().isSwiftFile() && absolutePath.isFile { | |||
if absolutePath.isFile { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change? I think the lintablePaths
change is sufficient to support the lint --path file.notswift
scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that's true, but when exactly would this check be true then? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when specifying included
and excluded
configuration values, which IMO doesn't really make sense to specify non-Swift files in there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kinda worried that if we extend included
/excluded
to support globbing, this change would attempt to lint non-Swift files if Sources/**
were specified, for example.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed it 👍
bc00097
to
a300409
Compare
Fixes #1721.