metricfu / metric_fu

A fist full of code metrics
http://metricfu.github.com/metric_fu
MIT License
627 stars 96 forks source link

Fix Travis CI #308

Closed etagwerker closed 4 years ago

etagwerker commented 5 years ago

Hey @bf4,

This PR brings Travis CI's configuration up to speed. It fixes #307.

I realize that it is actively dropping support for all these rubies:

But I think it's a good way to unblock PRs failing.

What do you think?

Thanks!

bf4 commented 5 years ago

failure seem related to out-of-date parser dep in Reek.. which probably means the reek version is out of date... can we just find one version, ruby 21?, that works on appveyor as is?

NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#default_executable= called from C:/projects/metric-fu/metric_fu.gemspec:37.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc= called from C:/projects/metric-fu/metric_fu.gemspec:40.

bundle exec ruby -Ilib bin/metric_fu --no-open

NOTE: Gem::Specification#default_executable= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#default_executable= called from C:/projects/metric-fu/metric_fu.gemspec:37.
NOTE: Gem::Specification#has_rdoc= is deprecated with no replacement. It will be removed on or after 2018-12-01.
Gem::Specification#has_rdoc= called from C:/projects/metric-fu/metric_fu.gemspec:40.
C:/projects/metric-fu/lib/metric_fu/cli/parser.rb:69: warning: constant ::Fixnum is deprecated
******* STARTING METRIC reek
C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_code.rb:21:in `initialize': uninitialized constant Parser::Ruby21 (NameError)
Did you mean?  Parser::Ruby24
               RubyVM
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_code.rb:38:in `new'
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_code.rb:38:in `from'
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_locator.rb:19:in `block in sources'
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_locator.rb:19:in `map'
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_locator.rb:19:in `sources'
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/source/source_repository.rb:29:in `parse'
    from C:/projects/metric-fu/vendor/bundle/ruby/2.4.0/gems/reek-2.2.1/lib/reek/core/examiner.rb:34:in `initialize'
    from C:/projects/metric-fu/lib/metric_fu/metrics/reek/generator.rb:18:in `new'
    from C:/projects/metric-fu/lib/metric_fu/metrics/reek/generator.rb:18:in `run!'
    from C:/projects/metric-fu/lib/metric_fu/metrics/reek/generator.rb:13:in `emit'
    from C:/projects/metric-fu/lib/metric_fu/generator.rb:104:in `generate_result'
    from C:/projects/metric-fu/lib/metric_fu/reporting/result.rb:48:in `add'
    from C:/projects/metric-fu/lib/metric_fu/run.rb:21:in `block in measure'
    from C:/projects/metric-fu/lib/metric_fu/run.rb:19:in `each'
    from C:/projects/metric-fu/lib/metric_fu/run.rb:19:in `measure'
    from C:/projects/metric-fu/lib/metric_fu/run.rb:9:in `run'
    from C:/projects/metric-fu/lib/metric_fu/cli/helper.rb:19:in `run'
    from C:/projects/metric-fu/lib/metric_fu/cli/client.rb:19:in `run'
    from bin/metric_fu:9:in `<main>'
Command exited with code 1
etagwerker commented 5 years ago

@bf4 Unfortunately it is not as simple as that. It is using a version of reek that should be compatible with Ruby 2.1, version 2.2.1: https://github.com/troessner/reek/tree/v2.2.1

I believe this PR would certainly help: https://github.com/troessner/reek/pull/1474/files#diff-f9dae46a54ebb72c2c734ff15d80d26eR57 -- but it is for a more modern version of reek

The goal of this PR is to fix Travis CI and I believe that it does that. Do you want me to open another PR to explore fixing the build in Appveyor?

As you mentioned in https://github.com/metricfu/metric_fu/pull/306#issuecomment-531671894, I'm also interested in keeping my pull requests as small as possible. Appveyor seems to be out of scope for this PR.

etagwerker commented 5 years ago

@bf4 Hi, did you get a chance to see this? 😄

bf4 commented 5 years ago

Can you get it green with as few changes as necessary?

etagwerker commented 5 years ago

@bf4 Sure thing. Just removed as much as possible. How is that now?

etagwerker commented 5 years ago

@bf4 Did you get a chance to see this? 😺

bf4 commented 5 years ago

Nope. Thanks for ping

On Sat, Oct 5, 2019, 11:28 AM Ernesto Tagwerker notifications@github.com wrote:

@bf4 https://github.com/bf4 Did you get a chance to see this? 😺

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/metricfu/metric_fu/pull/308?email_source=notifications&email_token=AABC4QVGTJ5QBELLYME2X6DQNC6BTA5CNFSM4IWRLGMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEANWBAI#issuecomment-538665089, or mute the thread https://github.com/notifications/unsubscribe-auth/AABC4QSO2L3WGNHS4OE7WPDQNC6BTANCNFSM4IWRLGMA .

etagwerker commented 4 years ago

@bronzdoc The Appveyor failure will be solved by #306. I suggest we merge this PR first.