Skip to content
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

Refactor code to fix SwiftLint warnings #196

Merged
merged 2 commits into from
Feb 17, 2019
Merged

Refactor code to fix SwiftLint warnings #196

merged 2 commits into from
Feb 17, 2019

Conversation

ChaosCoder
Copy link
Member

This PR is a follow-up to #195. This makes the code more readable, fixes swiftlint warnings introduced by #195 and reverts some whitespace changes #195 introduced.

There should be no changes in behaviour.

@DangerCI
Copy link

DangerCI commented Feb 16, 2019

Warnings
⚠️

Any changes to library code should be reflected in the Changelog.

Please consider adding a note there and adhere to the Changelog Guidelines.

Generated by 🚫 Danger Swift against 3370189

}

return violations
}

private static func lintAll(directory: String?,
arguments: inout [String],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you need arguments to be inout?
You can make arguments a var inside the function, given you don't need the updated value back

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are absolutely right. Thank you for spotting this Xcode "extract method" relic. :)

@f-meloni
Copy link
Member

can you please fix or add a swiftlint:disable to Sources/Danger/Plugins/SwiftLint/SwiftLint.swift#L125? Thank you :)

Copy link
Member

@f-meloni f-meloni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@f-meloni f-meloni merged commit dbdd8cc into danger:master Feb 17, 2019
@peril-staging
Copy link
Contributor

peril-staging bot commented Feb 24, 2019

Thanks for the PR @ChaosCoder.

This PR has been shipped in v1.4.0 - CHANGELOG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants