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 Swiftformat #375

Merged
merged 4 commits into from
Feb 28, 2019
Merged

Add Swiftformat #375

merged 4 commits into from
Feb 28, 2019

Conversation

pepicrft
Copy link
Contributor

@pepicrft pepicrft commented Feb 27, 2019

Short description 📝

Add swiftformat and set up Danger to run it in a strict manner so that warnings are reported as errors.

@pepicrft pepicrft self-assigned this Feb 27, 2019
@pepicrft pepicrft requested a review from a team February 27, 2019 02:11
@yonaskolb
Copy link
Collaborator

Not sure I understand the reason for removing SwiftLint? SwiftFormat is great, and that's a good addition, but auto-formatting doesn't replaces the value of linting. It would just replace something like swiftlint autocorrect.
I usually use both tools in concert.

@pepicrft
Copy link
Contributor Author

Not sure I understand the reason for removing SwiftLint? SwiftFormat is great, and that's a good addition, but auto-formatting doesn't replaces the value of linting. It would just replace something like swiftlint autocorrect.

That's a good point. The Dangerfile has swiftformat set up to run as a linter, but I guess since it's not its primary goal, it doesn't provide the same level of linter that Swiftlint does. Let me check if I can configure both without conflicting with each other.

@pepicrft pepicrft changed the title Replace Swiftlint with Swiftformat Add Swiftformat Feb 27, 2019
@pepicrft
Copy link
Contributor Author

Added Swiftlint back and fixed all the warnings and errors that we had in the project. Let mek now what you think @yonaskolb

Copy link
Collaborator

@yonaskolb yonaskolb 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

@@ -4,9 +4,6 @@ require 'fileutils'
require 'colorize'

task :release_check do
puts "Linting code".colorize(:cyan)
system("swiftlint") || abort
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to keep this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's fine to get rid of it since we are running the linter on the PRs before they get merged.

@pepicrft pepicrft merged commit 2b1c9ba into master Feb 28, 2019
@pepicrft pepicrft deleted the swiftformat branch February 28, 2019 00:30
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.

2 participants