-
Notifications
You must be signed in to change notification settings - Fork 81
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
When directory is specified, danger-swiftlint is still linting files outside the specified directory #53
Conversation
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.
LGTM w/ nits.
lib/danger_plugin.rb
Outdated
@@ -113,6 +115,8 @@ def find_swift_files(files=nil, excluded_paths=[]) | |||
# Remove dups | |||
uniq. | |||
map { |file| File.expand_path(file) }. | |||
# Ensure only files in the selected directory | |||
select { |file| file.start_with?(dir_selected)}. |
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.
Shouldn't there be a space before }
?
spec/danger_plugin_spec.rb
Outdated
|
||
@swiftlint.lint_files | ||
end | ||
|
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.
Looks like indents are somewhat incorrect in this chunk.
I've addressed the comments @thii :) Do you have permissions to upload the gem? |
@victorg1991 I don't :) |
@thii even if I'm using this in danger? |
@victorg1991 Yes. Danger plugins are just normal Ruby gems. |
@ashfurrow any chance to take a look into this? :) Thanks! |
Ah, sorry for the delay. Will look into it now. |
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.
Looks good, I'll add a changelog entry after merging 👍
Cool, this has been released as 0.9.0. Thanks again! |
Wow so fast, thank you so much : D |
No worries! Feel free to ping me if I ever forget something 😅 |
Right now, when I run danger-swiftlint with a custom directory and I have also modified files outside this directory, danger-swiftlint is linting all the files.
With this PR danger-swiftlint will only lint the modified files inside the specified directory :)
If this PR gets approved, can you upload a new version of the Gem? Thanks in advance!
Any comment or question would be appreciated