Repository navigation
Add PR tests by Danger and SwiftLint - #1257
Merged
Merged
Conversation
austinwright
requested changes
Feb 28, 2020
austinwright
approved these changes
Feb 28, 2020
|
|
||
| swiftlint.config_file = '.swiftlint.yml' | ||
| swiftlint.lint_files inline_mode:true | ||
| swiftlint.lint_files fail_on_error:true |
Contributor
There was a problem hiding this comment.
@Kaspik - This second line causes swiftlint to run again, I think you have to aggregate the options onto one swiftlint.lint_files command.
Contributor
There was a problem hiding this comment.
Also, if you look closer at the check phase, we're getting this error (twice):
/opt/hostedtoolcache/Ruby/2.6.5/x64/lib/ruby/gems/2.6.0/gems/danger-swiftlint-0.24.1/ext/swiftlint/bin/swiftlint: 1: /opt/hostedtoolcache/Ruby/2.6.5/x64/lib/ruby/gems/2.6.0/gems/danger-swiftlint-0.24.1/ext/swiftlint/bin/swiftlint: Syntax error: "(" unexpected
/opt/hostedtoolcache/Ruby/2.6.5/x64/lib/ruby/gems/2.6.0/gems/danger-swiftlint-0.24.1/ext/swiftlint/bin/swiftlint: 1: /opt/hostedtoolcache/Ruby/2.6.5/x64/lib/ruby/gems/2.6.0/gems/danger-swiftlint-0.24.1/ext/swiftlint/bin/swiftlint: Syntax error: "(" unexpected
I tried it on my own CI with verbose turned on and am getting this:
Using config file: .swiftlint.yml
Swiftlint will be run from /home/runner/work/<private-repo>/<private-repo>
Swiftlint will exclude the following paths: []
Swiftlint includes the following paths: []
linting with options: {:config=>".swiftlint.yml", :reporter=>"json", :quiet=>true, :pwd=>"/home/runner/work/<private-repo>/<private-repo>", :force_exclude=>true}
Swiftlint will lint the following files: /home/runner/work/<private-repo>/<private-repo>/<private-repo-folder>/TempDangerPoC.swift
/opt/hostedtoolcache/Ruby/2.6.5/x64/lib/ruby/gems/2.6.0/gems/danger-swiftlint-0.24.1/ext/swiftlint/bin/swiftlint: 1: /opt/hostedtoolcache/Ruby/2.6.5/x64/lib/ruby/gems/2.6.0/gems/danger-swiftlint-0.24.1/ext/swiftlint/bin/swiftlint: Syntax error: "(" unexpected
Received from Swiftlint: {}
So... not very helpful except that I noticed my included paths specified in my .swiftlint.yml are not being honored.
Member
Author
There was a problem hiding this comment.
Hmmm, I don't think running it twice hurts, but I'll switch it to one-line command.
Yes, there is a bug in SwiftLint, but I didn't have time to look at it yet.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
Added Dangerfile, Gemfile for danger and Swiftlint
Does this close any currently open issues?
No.