Closed freak4pc closed 6 years ago
Does 0.10.2 work for you? What version of SwiftLint are you using?
I'm also seeing the issue on 0.10.2
[!] Invalid
Dangerfilefile: undefined method
positive?' for 0:Fixnum`
Hmm, can you let me know what Ruby and Bundler versions you have? It would help to reproduce. Thanks!
Sure, my CI (Bitrise) was using Ruby v2.4.0 and Bundler was at v1.16.0
I ended up reverting the plugin back to 0.10.1
to get things working as normal so the issue seems to happen on v0.10.2+.
Error log:
Fetching gem metadata from https://rubygems.org/.............
Fetching rake 12.2.1
Installing rake 12.2.1
Fetching public_suffix 3.0.1
Installing public_suffix 3.0.1
Using addressable 2.5.2
Using bundler 1.16.0
Using claide 1.0.2
Using colored2 3.1.2
Fetching cork 0.3.0
Installing cork 0.3.0
Using nap 1.1.0
Fetching open4 1.3.4
Installing open4 1.3.4
Fetching claide-plugins 0.9.2
Installing claide-plugins 0.9.2
Using multipart-post 2.0.0
Using faraday 0.13.1
Fetching faraday-http-cache 1.3.1
Installing faraday-http-cache 1.3.1
Fetching git 1.3.0
Installing git 1.3.0
Fetching kramdown 1.15.0
Installing kramdown 1.15.0
Fetching no_proxy_fix 0.1.2
Installing no_proxy_fix 0.1.2
Fetching sawyer 0.8.1
Installing sawyer 0.8.1
Fetching octokit 4.7.0
Installing octokit 4.7.0
Using unicode-display_width 1.3.0
Using terminal-table 1.8.0
Fetching danger 5.5.4
Installing danger 5.5.4
Fetching thor 0.20.0
Installing thor 0.20.0
Fetching danger-swiftlint 0.11.0
Installing danger-swiftlint 0.11.0 with native extensions
Bundle complete! 2 Gemfile dependencies, 23 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
[!] The exception involves the following plugins:
- danger-swiftlint
bundler: failed to load command: danger (/usr/local/bin/danger)
Danger::DSLError:
[!] Invalid `Dangerfile` file: Failed due to SwiftLint errors. Updating the Danger gem might fix the issue. Your Danger version: 5.5.4, latest Danger version: 5.5.5
# from Dangerfile:87
# -------------------------------------------
# # ---------------------------------------------------------------------------------
> swiftlint.lint_files fail_on_error: true
#
# -------------------------------------------
/usr/local/lib/ruby/gems/2.4.0/gems/danger-swiftlint-0.11.0/lib/danger_plugin.rb:106:in `lint_files'
Dangerfile:87:in `block in parse'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/danger_core/dangerfile.rb:200:in `eval'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/danger_core/dangerfile.rb:200:in `block in parse'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/danger_core/dangerfile.rb:196:in `instance_eval'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/danger_core/dangerfile.rb:196:in `parse'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/danger_core/dangerfile.rb:273:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/danger_core/executor.rb:27:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/lib/danger/commands/runner.rb:66:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.4.0/gems/danger-5.5.4/bin/danger:5:in `<top (required)>'
/usr/local/bin/danger:23:in `load'
/usr/local/bin/danger:23:in `<top (required)>'
|
When running on danger local
, the DSL error shows as
[!] Invalid `Dangerfile` file: undefined method `positive?' for 0:Fixnum
I'll have to check with buddybuild as its running (and failing) on their CI :)
-- Shai Mishali
On November 16, 2017 at 21:11:09, Ash Furrow (notifications@github.com) wrote:
Hmm, can you let me know what Ruby and Bundler versions you have? It would help to reproduce. Thanks!
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ashfurrow/danger-swiftlint/issues/74#issuecomment-345031026, or mute the thread https://github.com/notifications/unsubscribe-auth/AAk7lGwPUq1FRbp6jtKrV5PAzugdwdKXks5s3IjNgaJpZM4Qa5Bj .
Thanks for the follow-up. I'll try to take a look at this on Saturday/Sunday but time is really tight right now 😬 If anyone is available to lend a hand tracking down the source of the problem, I'd be very grateful 🙇
@ashfurrow No problem, happy to help. I've edited my above comment with the error log.
Uhm that's interesting @ajfigueroa
danger local
works fine for me 🤔 (otherwise this would be super-easy to fix with a git bisect)
Ruby: ruby 2.4.1p111 Bundler: 1.16.0
Rolled back with RVM to 2.4.0 so be on par with your configuration but couldn't get it to "fail" either. That's very very interesting :)
I am having the same issue. Doesn't work with danger-swiftlint version 0.10.2 as well. Works with version 0.10.1.
I couldn't reproduce locally with danger local
but this was still failing on my CI which is interesting. I'll try to dig further into this over the weekend but if anyone else has some time to take a crack at it that would be highly appreciated :)
Thanks @freak4pc – any help would be appreciated. I'm afraid that I don't have a lot of availability to work on this right now.
Okay, this was fixed by @thii and released as 0.12.1. Please let us know how it goes 👍
Great news !
After updating to danger-swiftlint 0.11 my PRs seem to break with the following error:
Rolling back to 0.10 resolves the issue so I assume this is a new bug introduced in latest release.