metricfu / metric_fu

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

Verify Windows support #284

Closed bergholdt closed 7 years ago

bergholdt commented 7 years ago

Create CI build on Windows.

Travis CI does not yet offer Windows builds, so we need to setup a new CI on https://ci.appveyor.com

bergholdt commented 7 years ago

Motivation for this issue is that metric_fu fails on my work PC. Was hoping to reproduce that on Appveyor.

λ bundle exec ruby -Ilib bin/metric_fu
******* STARTING METRIC cane
D:/proj/External/metric_fu/lib/metric_fu/gem_version.rb:34:in `block in gem_runtime_dependencies': undefined method `[]' for nil:NilClass (NoMethodError)
        from D:/proj/External/metric_fu/lib/metric_fu/gem_version.rb:32:in `map'
        from D:/proj/External/metric_fu/lib/metric_fu/gem_version.rb:32:in `gem_runtime_dependencies'
        from D:/proj/External/metric_fu/lib/metric_fu/gem_version.rb:43:in `for'
        from D:/proj/External/metric_fu/lib/metric_fu/gem_version.rb:56:in `for'
        from D:/proj/External/metric_fu/lib/metric_fu/gem_run.rb:13:in `block in initialize'
        from D:/proj/External/metric_fu/lib/metric_fu/gem_run.rb:13:in `fetch'
        from D:/proj/External/metric_fu/lib/metric_fu/gem_run.rb:13:in `initialize'
        from D:/proj/External/metric_fu/lib/metric_fu/metric.rb:51:in `new'
        from D:/proj/External/metric_fu/lib/metric_fu/metric.rb:51:in `run_external'
        from D:/proj/External/metric_fu/lib/metric_fu/generator.rb:90:in `run!'
        from D:/proj/External/metric_fu/lib/metric_fu/metrics/cane/generator.rb:17:in `emit'
        from D:/proj/External/metric_fu/lib/metric_fu/generator.rb:104:in `generate_result'
        from D:/proj/External/metric_fu/lib/metric_fu/reporting/result.rb:48:in `add'
        from D:/proj/External/metric_fu/lib/metric_fu/run.rb:21:in `block in measure'
        from D:/proj/External/metric_fu/lib/metric_fu/run.rb:19:in `each'
        from D:/proj/External/metric_fu/lib/metric_fu/run.rb:19:in `measure'
        from D:/proj/External/metric_fu/lib/metric_fu/run.rb:9:in `run'
        from D:/proj/External/metric_fu/lib/metric_fu/cli/helper.rb:19:in `run'
        from D:/proj/External/metric_fu/lib/metric_fu/cli/client.rb:19:in `run'
        from bin/metric_fu:9:in `<main>'

For some reason the regex in MetricFu::GemVersion fails

            match = line.match(ADD_DEPENDENCY_CALL)
            name = match["name"].downcase.sub("metric_fu-", "")

Need to dive into this, it might simply be a local problem.

bf4 commented 7 years ago

@bergholdt I just added an integration which you should have permission to edit [![Build status](https://ci.appveyor.com/api/projects/status/uch8kpltosjva0tu/branch/master?svg=true)](https://ci.appveyor.com/project/bf4/metric-fu/branch/master) once the appveyor.yml is added etc