ashfurrow / danger-ruby-swiftlint

A Danger plugin for SwiftLint.
https://rubygems.org/gems/danger-swiftlint
MIT License
203 stars 81 forks source link

danger-swiftlint 0.11.0 is throwing false positives for delegate protocol class rule #75

Closed dubemike closed 6 years ago

dubemike commented 6 years ago
screen shot 2017-11-23 at 11 41 51

and you can see that line 104:

screen shot 2017-11-23 at 11 42 59

running swiftlint locally won't throw this warning. any idea what could be happening here?

ashfurrow commented 6 years ago

Hmm, it sounds like the danger plugin isn't using the same .swiftlint.yml as when you run locally. Could you check your usage against the docs? Thanks!

kaybutter commented 6 years ago

@dubemike I had the same problem. The swiftlint binary that came with the gem was not up to date in my case. Setting the binary_path to my own swiftlint installation fixed that for me :)

ajfigueroa commented 6 years ago

It looks like this issue has been resolved in Swiftlint version 0.23.0.

Would the fix involve updating the SWIFTLINT_VERSION in version.rb? Would this likely be a breaking change?

ashfurrow commented 6 years ago

That makes sense to me. Since we're not upgrading the Swiftlint version to a new major version, I don't think this is a breaking change. Anyone up to test locally and send a PR?

ajfigueroa commented 6 years ago

There are a couple of breaking changes with SwiftLint from the current version 0.20.1 outlined from their Changelog below:

SwiftLint Version Breaking Change
0.21.0 Xcode 8.3 or later and Swift 3.1 or later are required to build.
0.22.0 Nested configurations will now be merged with parent configurations rather than replace them outright.
0.23.0 & 0.23.1 None
0.24.0 SwiftLint now requires Xcode 9 and Swift 3.2+ to build and Remove SwiftExpressionKind.other.

What do you all think? Since the issue has been resolved with 0.23.0, it'd be nice to get there at least. I imagine not many people are still using Xcode 8.3. I'm unsure about the nested configurations as I don't use them myself.

thii commented 6 years ago

@ajfigueroa Those changes are for building SwiftLint. This plugin use the prebuilt SwiftLint binary so it doesn't matter which Xcode people are using. You can use the SWIFTLINT_VERSION environment variable to override the default version, or you can specify a path to your SwiftLint binary.

swiftlint.binary_path = '/path/to/swiftlint'
ajfigueroa commented 6 years ago

@thii Oh, that's neat! Please disregard my comment then.

Sent with GitHawk

omirho commented 6 years ago

Swiftlint version was updated in the plugin. Closing this.