ashfurrow / danger-ruby-swiftlint

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

Force SwiftLint version #123

Closed franciscoamado closed 5 years ago

franciscoamado commented 5 years ago

Hi there! 👋🏻

I'm having a problem where locally using the SwiftLint version '0.30.0' and on CI using Danger to also run SwiftLint.

The problem is that the default SwiftLint version for this plugin is '0.28.1' and I'm using rules introduced after that version.

I've tried to force the downloaded version with the environment variable SWIFTLINT_VERSION set to '0.30.0' like advised on other comments. But didn't work.

When installing it still downloads the default version instead.

Any ideas why this is happening?

I'm sorry to bring up a repeated issue.

Thank you for the effort, Francisco

ashfurrow commented 5 years ago

Hmm, what version of this library (danger-swiftlint) are you using? That env var was only added 9 months or so ago.

We could also update the version we install from 0.28.1 to 0.30.0 by sending a PR modifying this file:

https://github.com/ashfurrow/danger-ruby-swiftlint/blob/370b2ad1ffc21cd5c2c58b4c93c94c231abfee06/lib/version.rb#L5

Then everyone could use the new rules. I kind of like that approach, though I'm still curious why the SWIFTLINT_VERSION env var isn't working 🤔

franciscoamado commented 5 years ago

I'm currently using 0.18.2 so it should work as expected 🤷🏻‍♂️

If you agree I'll be happy to send a PR with the SwifLint version bump

ashfurrow commented 5 years ago

A PR would be welcome, thank you :bow:

franciscoamado commented 5 years ago

A PR was merged with the proposed changes