-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
Add .swiftlint.yml #383
Add .swiftlint.yml #383
Conversation
.swiftlint.yml
Outdated
identifier_name: | ||
min_length: | ||
warning: 2 |
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.
Can we use excluded:
to add the excluded words instead? (like id)
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.
Sure! fixed in 38131f0
Thank you very much :) |
PS. I believe you will need to add the config file to the Dangerfile https://github.com/danger/swift/blob/master/Dangerfile.swift#L23 |
As you said (#382 (comment)), SwiftLint should be executed in whole project.
But in current, SwiftLint verifies only on |
@417-72KI what about using let files = (danger.git.modifiedFiles + danger.git.createdFiles).filter { ($0.starts(with: "Tests") || $0.starts(with: "Sources")) &&
$0.fileType == .swift }
SwiftLint.lint(.files(files), inline: true) ? |
@f-meloni or, do you mean to make it runs twice (for |
@417-72KI The code I wrote is basically filtering the modified files to only include files in test and sources, but I'm totally fine with your solution. Thank you! |
resolves #382