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

Add ability to run swiftlint in strict mode #195

Merged
merged 2 commits into from
Feb 16, 2019
Merged

Add ability to run swiftlint in strict mode #195

merged 2 commits into from
Feb 16, 2019

Conversation

FabioTacke
Copy link
Contributor

Introduce a strict mode that treats warnings like errors in inline mode, i.e. fails the build when a warning occurrs.

@DangerCI
Copy link

DangerCI commented Feb 15, 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.

⚠️

Sources/Danger-Swift/Fake.swift#L1 - Files should have a single trailing newline. (trailing_newline)

⚠️

Sources/Danger/Plugins/SwiftLint/SwiftLint.swift#L34 - Function should have complexity 10 or less: currently complexity equals 11 (cyclomatic_complexity)

Generated by 🚫 Danger Swift against dfc83d3

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.

Looks good, just a small comment

violation.update(file: updatedPath)
violation.file = updatedPath
if strict {
violation.severity = .error
Copy link
Member

Choose a reason for hiding this comment

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

can you please add a specific test for this? This would (I think), also change how the violation gets displayed on the markdown table, in that case that should be tested as well 👍

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.

Ace! 💯

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

peril-staging bot commented Feb 24, 2019

Thanks for the PR @FabioTacke.

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

4 participants