code_metric_fu 4.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +28 -0
- data/.metrics +3 -0
- data/.rspec +2 -0
- data/.rubocop.yml +15 -0
- data/.rubocop_todo.yml +69 -0
- data/.simplecov +74 -0
- data/.travis.yml +22 -0
- data/.yardopts +4 -0
- data/AUTHORS +12 -0
- data/CONTRIBUTING.md +47 -0
- data/CONTRIBUTORS +76 -0
- data/DEV.md +76 -0
- data/Gemfile +74 -0
- data/Guardfile +30 -0
- data/HISTORY.md +705 -0
- data/MIT-LICENSE +22 -0
- data/README.md +299 -0
- data/Rakefile +27 -0
- data/TODO.md +118 -0
- data/appveyor.yml +31 -0
- data/bin/metric_fu +9 -0
- data/bin/mf-cane +10 -0
- data/bin/mf-churn +10 -0
- data/bin/mf-flay +10 -0
- data/bin/mf-reek +10 -0
- data/bin/mf-roodi +10 -0
- data/bin/mf-saikuro +10 -0
- data/certs/bf4.pem +22 -0
- data/checksum/.gitkeep +0 -0
- data/checksum/metric_fu-4.10.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.11.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.11.1.gem.sha512 +1 -0
- data/checksum/metric_fu-4.11.2.gem.sha512 +1 -0
- data/checksum/metric_fu-4.11.3.gem.sha512 +1 -0
- data/checksum/metric_fu-4.11.4.gem.sha512 +1 -0
- data/checksum/metric_fu-4.12.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.2.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.2.1.gem.sha512 +1 -0
- data/checksum/metric_fu-4.3.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.3.1.gem.sha512 +1 -0
- data/checksum/metric_fu-4.4.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.4.1.gem.sha512 +1 -0
- data/checksum/metric_fu-4.4.2.gem.sha512 +1 -0
- data/checksum/metric_fu-4.4.3.gem.sha512 +1 -0
- data/checksum/metric_fu-4.4.4.gem.sha512 +1 -0
- data/checksum/metric_fu-4.5.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.5.1.gem.sha512 +1 -0
- data/checksum/metric_fu-4.5.2.gem.sha512 +1 -0
- data/checksum/metric_fu-4.6.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.7.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.7.1.gem.sha512 +1 -0
- data/checksum/metric_fu-4.7.2.gem.sha512 +1 -0
- data/checksum/metric_fu-4.7.3.gem.sha512 +1 -0
- data/checksum/metric_fu-4.7.4.gem.sha512 +1 -0
- data/checksum/metric_fu-4.8.0.gem.sha512 +1 -0
- data/checksum/metric_fu-4.9.0.gem.sha512 +1 -0
- data/config/roodi_config.yml +22 -0
- data/config/rubocop.yml +269 -0
- data/gem_tasks/build.rake +197 -0
- data/gem_tasks/rubocop.rake +10 -0
- data/gem_tasks/usage_test.rake +19 -0
- data/gem_tasks/yard.rake +24 -0
- data/lib/metric_fu/calculate.rb +10 -0
- data/lib/metric_fu/cli/client.rb +26 -0
- data/lib/metric_fu/cli/helper.rb +80 -0
- data/lib/metric_fu/cli/parser.rb +138 -0
- data/lib/metric_fu/configuration.rb +150 -0
- data/lib/metric_fu/constantize.rb +57 -0
- data/lib/metric_fu/data_structures/line_numbers.rb +112 -0
- data/lib/metric_fu/data_structures/location.rb +110 -0
- data/lib/metric_fu/data_structures/sexp_node.rb +107 -0
- data/lib/metric_fu/environment.rb +129 -0
- data/lib/metric_fu/errors/analysis_error.rb +4 -0
- data/lib/metric_fu/formatter/html.rb +96 -0
- data/lib/metric_fu/formatter/syntax.rb +45 -0
- data/lib/metric_fu/formatter/yaml.rb +18 -0
- data/lib/metric_fu/formatter.rb +40 -0
- data/lib/metric_fu/gem_run.rb +70 -0
- data/lib/metric_fu/gem_version.rb +92 -0
- data/lib/metric_fu/generator.rb +135 -0
- data/lib/metric_fu/io.rb +132 -0
- data/lib/metric_fu/loader.rb +105 -0
- data/lib/metric_fu/logger.rb +62 -0
- data/lib/metric_fu/logging/mf_debugger.rb +23 -0
- data/lib/metric_fu/metric.rb +143 -0
- data/lib/metric_fu/metrics/cane/generator.rb +95 -0
- data/lib/metric_fu/metrics/cane/grapher.rb +37 -0
- data/lib/metric_fu/metrics/cane/metric.rb +34 -0
- data/lib/metric_fu/metrics/cane/report.html.erb +87 -0
- data/lib/metric_fu/metrics/cane/violations.rb +46 -0
- data/lib/metric_fu/metrics/churn/generator.rb +37 -0
- data/lib/metric_fu/metrics/churn/hotspot.rb +43 -0
- data/lib/metric_fu/metrics/churn/metric.rb +29 -0
- data/lib/metric_fu/metrics/churn/report.html.erb +58 -0
- data/lib/metric_fu/metrics/flay/generator.rb +51 -0
- data/lib/metric_fu/metrics/flay/grapher.rb +37 -0
- data/lib/metric_fu/metrics/flay/hotspot.rb +52 -0
- data/lib/metric_fu/metrics/flay/metric.rb +28 -0
- data/lib/metric_fu/metrics/flay/report.html.erb +29 -0
- data/lib/metric_fu/metrics/flog/generator.rb +113 -0
- data/lib/metric_fu/metrics/flog/grapher.rb +77 -0
- data/lib/metric_fu/metrics/flog/hotspot.rb +46 -0
- data/lib/metric_fu/metrics/flog/metric.rb +29 -0
- data/lib/metric_fu/metrics/flog/report.html.erb +50 -0
- data/lib/metric_fu/metrics/hotspots/analysis/analyzed_problems.rb +34 -0
- data/lib/metric_fu/metrics/hotspots/analysis/analyzer_tables.rb +114 -0
- data/lib/metric_fu/metrics/hotspots/analysis/grouping.rb +23 -0
- data/lib/metric_fu/metrics/hotspots/analysis/groupings.rb +12 -0
- data/lib/metric_fu/metrics/hotspots/analysis/problems.rb +20 -0
- data/lib/metric_fu/metrics/hotspots/analysis/ranked_problem_location.rb +70 -0
- data/lib/metric_fu/metrics/hotspots/analysis/ranking.rb +29 -0
- data/lib/metric_fu/metrics/hotspots/analysis/rankings.rb +91 -0
- data/lib/metric_fu/metrics/hotspots/analysis/record.rb +32 -0
- data/lib/metric_fu/metrics/hotspots/analysis/scoring_strategies.rb +24 -0
- data/lib/metric_fu/metrics/hotspots/analysis/table.rb +67 -0
- data/lib/metric_fu/metrics/hotspots/generator.rb +40 -0
- data/lib/metric_fu/metrics/hotspots/hotspot.rb +87 -0
- data/lib/metric_fu/metrics/hotspots/hotspot_analyzer.rb +61 -0
- data/lib/metric_fu/metrics/hotspots/metric.rb +20 -0
- data/lib/metric_fu/metrics/hotspots/report.html.erb +60 -0
- data/lib/metric_fu/metrics/rails_best_practices/generator.rb +47 -0
- data/lib/metric_fu/metrics/rails_best_practices/grapher.rb +38 -0
- data/lib/metric_fu/metrics/rails_best_practices/metric.rb +31 -0
- data/lib/metric_fu/metrics/rails_best_practices/report.html.erb +22 -0
- data/lib/metric_fu/metrics/rcov/external_client.rb +22 -0
- data/lib/metric_fu/metrics/rcov/generator.rb +75 -0
- data/lib/metric_fu/metrics/rcov/grapher.rb +37 -0
- data/lib/metric_fu/metrics/rcov/hotspot.rb +46 -0
- data/lib/metric_fu/metrics/rcov/metric.rb +61 -0
- data/lib/metric_fu/metrics/rcov/rcov_format_coverage.rb +149 -0
- data/lib/metric_fu/metrics/rcov/rcov_line.rb +48 -0
- data/lib/metric_fu/metrics/rcov/report.html.erb +40 -0
- data/lib/metric_fu/metrics/rcov/simplecov_formatter.rb +74 -0
- data/lib/metric_fu/metrics/reek/generator.rb +97 -0
- data/lib/metric_fu/metrics/reek/grapher.rb +55 -0
- data/lib/metric_fu/metrics/reek/hotspot.rb +95 -0
- data/lib/metric_fu/metrics/reek/metric.rb +26 -0
- data/lib/metric_fu/metrics/reek/report.html.erb +35 -0
- data/lib/metric_fu/metrics/roodi/generator.rb +41 -0
- data/lib/metric_fu/metrics/roodi/grapher.rb +37 -0
- data/lib/metric_fu/metrics/roodi/hotspot.rb +39 -0
- data/lib/metric_fu/metrics/roodi/metric.rb +24 -0
- data/lib/metric_fu/metrics/roodi/report.html.erb +22 -0
- data/lib/metric_fu/metrics/saikuro/generator.rb +145 -0
- data/lib/metric_fu/metrics/saikuro/hotspot.rb +51 -0
- data/lib/metric_fu/metrics/saikuro/metric.rb +31 -0
- data/lib/metric_fu/metrics/saikuro/parsing_element.rb +37 -0
- data/lib/metric_fu/metrics/saikuro/report.html.erb +71 -0
- data/lib/metric_fu/metrics/saikuro/scratch_file.rb +108 -0
- data/lib/metric_fu/metrics/stats/generator.rb +82 -0
- data/lib/metric_fu/metrics/stats/grapher.rb +40 -0
- data/lib/metric_fu/metrics/stats/hotspot.rb +35 -0
- data/lib/metric_fu/metrics/stats/metric.rb +28 -0
- data/lib/metric_fu/metrics/stats/report.html.erb +44 -0
- data/lib/metric_fu/reporter.rb +37 -0
- data/lib/metric_fu/reporting/graphs/graph.rb +69 -0
- data/lib/metric_fu/reporting/graphs/grapher.rb +66 -0
- data/lib/metric_fu/reporting/result.rb +59 -0
- data/lib/metric_fu/run.rb +82 -0
- data/lib/metric_fu/tasks/metric_fu.rake +54 -0
- data/lib/metric_fu/templates/_gem_info.html.erb +8 -0
- data/lib/metric_fu/templates/_graph.html.erb +2 -0
- data/lib/metric_fu/templates/_report_footer.html.erb +1 -0
- data/lib/metric_fu/templates/configuration.rb +25 -0
- data/lib/metric_fu/templates/css/bluff.css +15 -0
- data/lib/metric_fu/templates/css/buttons.css +82 -0
- data/lib/metric_fu/templates/css/default.css +43 -0
- data/lib/metric_fu/templates/css/integrity.css +337 -0
- data/lib/metric_fu/templates/css/rcov.css +32 -0
- data/lib/metric_fu/templates/css/reset.css +7 -0
- data/lib/metric_fu/templates/css/syntax.css +19 -0
- data/lib/metric_fu/templates/index.html.erb +13 -0
- data/lib/metric_fu/templates/javascripts/bluff-min.js +1 -0
- data/lib/metric_fu/templates/javascripts/bluff_graph.js +15 -0
- data/lib/metric_fu/templates/javascripts/excanvas.js +35 -0
- data/lib/metric_fu/templates/javascripts/highcharts.js +294 -0
- data/lib/metric_fu/templates/javascripts/highcharts_graph.js +38 -0
- data/lib/metric_fu/templates/javascripts/js-class.js +1 -0
- data/lib/metric_fu/templates/javascripts/standalone-framework.js +17 -0
- data/lib/metric_fu/templates/javascripts/utils.js +9 -0
- data/lib/metric_fu/templates/layout.html.erb +41 -0
- data/lib/metric_fu/templates/metrics_template.rb +86 -0
- data/lib/metric_fu/templates/report.html.erb +31 -0
- data/lib/metric_fu/templates/report.rb +41 -0
- data/lib/metric_fu/templates/template.rb +247 -0
- data/lib/metric_fu/utility.rb +79 -0
- data/lib/metric_fu/version.rb +9 -0
- data/lib/metric_fu.rb +143 -0
- data/metric_fu.gemspec +72 -0
- data/spec/capture_warnings.rb +55 -0
- data/spec/cli/helper_spec.rb +165 -0
- data/spec/dummy/.gitignore +1 -0
- data/spec/dummy/.gitkeep +0 -0
- data/spec/dummy/.metrics +4 -0
- data/spec/dummy/lib/.gitkeep +0 -0
- data/spec/dummy/lib/bad_encoding.rb +6 -0
- data/spec/dummy/spec/.gitkeep +0 -0
- data/spec/fixtures/20090630.yml +7922 -0
- data/spec/fixtures/coverage-153.rb +11 -0
- data/spec/fixtures/coverage.rb +13 -0
- data/spec/fixtures/exit0.sh +3 -0
- data/spec/fixtures/exit1.sh +3 -0
- data/spec/fixtures/hotspots/flog.yml +86 -0
- data/spec/fixtures/hotspots/generator.yml +47 -0
- data/spec/fixtures/hotspots/generator_analysis.yml +53 -0
- data/spec/fixtures/hotspots/reek.yml +14 -0
- data/spec/fixtures/hotspots/roodi.yml +13 -0
- data/spec/fixtures/hotspots/saikuro.yml +27 -0
- data/spec/fixtures/hotspots/several_metrics.yml +47 -0
- data/spec/fixtures/hotspots/stats.yml +4 -0
- data/spec/fixtures/hotspots/three_metrics_on_same_file.yml +36 -0
- data/spec/fixtures/line_numbers/foo.rb +33 -0
- data/spec/fixtures/line_numbers/module.rb +11 -0
- data/spec/fixtures/line_numbers/module_surrounds_class.rb +15 -0
- data/spec/fixtures/line_numbers/two_classes.rb +11 -0
- data/spec/fixtures/metric_missing.yml +1 -0
- data/spec/fixtures/rcov_output.txt +135 -0
- data/spec/fixtures/saikuro/app/controllers/sessions_controller.rb_cyclo.html +10 -0
- data/spec/fixtures/saikuro/app/controllers/users_controller.rb_cyclo.html +16 -0
- data/spec/fixtures/saikuro/index_cyclo.html +155 -0
- data/spec/fixtures/saikuro_sfiles/thing.rb_cyclo.html +11 -0
- data/spec/metric_fu/calculate_spec.rb +21 -0
- data/spec/metric_fu/configuration_spec.rb +90 -0
- data/spec/metric_fu/data_structures/line_numbers_spec.rb +63 -0
- data/spec/metric_fu/data_structures/location_spec.rb +110 -0
- data/spec/metric_fu/formatter/configuration_spec.rb +44 -0
- data/spec/metric_fu/formatter/html_spec.rb +138 -0
- data/spec/metric_fu/formatter/yaml_spec.rb +61 -0
- data/spec/metric_fu/formatter_spec.rb +49 -0
- data/spec/metric_fu/gem_version_spec.rb +12 -0
- data/spec/metric_fu/generator_spec.rb +130 -0
- data/spec/metric_fu/loader_spec.rb +10 -0
- data/spec/metric_fu/metric_spec.rb +46 -0
- data/spec/metric_fu/metrics/cane/configuration_spec.rb +22 -0
- data/spec/metric_fu/metrics/cane/generator_spec.rb +184 -0
- data/spec/metric_fu/metrics/churn/configuration_spec.rb +13 -0
- data/spec/metric_fu/metrics/churn/generator_spec.rb +64 -0
- data/spec/metric_fu/metrics/flay/configuration_spec.rb +13 -0
- data/spec/metric_fu/metrics/flay/generator_spec.rb +105 -0
- data/spec/metric_fu/metrics/flay/grapher_spec.rb +57 -0
- data/spec/metric_fu/metrics/flog/configuration_spec.rb +18 -0
- data/spec/metric_fu/metrics/flog/generator_spec.rb +77 -0
- data/spec/metric_fu/metrics/flog/grapher_spec.rb +107 -0
- data/spec/metric_fu/metrics/hotspots/analysis/analyzed_problems_spec.rb +104 -0
- data/spec/metric_fu/metrics/hotspots/analysis/analyzer_tables_spec.rb +71 -0
- data/spec/metric_fu/metrics/hotspots/analysis/ranking_spec.rb +30 -0
- data/spec/metric_fu/metrics/hotspots/analysis/rankings_spec.rb +97 -0
- data/spec/metric_fu/metrics/hotspots/analysis/table_spec.rb +6 -0
- data/spec/metric_fu/metrics/hotspots/generator_spec.rb +46 -0
- data/spec/metric_fu/metrics/hotspots/hotspot_analyzer_spec.rb +10 -0
- data/spec/metric_fu/metrics/hotspots/hotspot_spec.rb +16 -0
- data/spec/metric_fu/metrics/rails_best_practices/configuration_spec.rb +55 -0
- data/spec/metric_fu/metrics/rails_best_practices/generator_spec.rb +33 -0
- data/spec/metric_fu/metrics/rails_best_practices/grapher_spec.rb +62 -0
- data/spec/metric_fu/metrics/rcov/configuration_spec.rb +28 -0
- data/spec/metric_fu/metrics/rcov/generator_spec.rb +22 -0
- data/spec/metric_fu/metrics/rcov/grapher_spec.rb +57 -0
- data/spec/metric_fu/metrics/rcov/hotspot_spec.rb +20 -0
- data/spec/metric_fu/metrics/rcov/rcov_line_spec.rb +89 -0
- data/spec/metric_fu/metrics/rcov/simplecov_formatter_spec.rb +67 -0
- data/spec/metric_fu/metrics/reek/configuration_spec.rb +13 -0
- data/spec/metric_fu/metrics/reek/generator_spec.rb +169 -0
- data/spec/metric_fu/metrics/reek/grapher_spec.rb +66 -0
- data/spec/metric_fu/metrics/roodi/configuration_spec.rb +14 -0
- data/spec/metric_fu/metrics/roodi/generator_spec.rb +82 -0
- data/spec/metric_fu/metrics/roodi/grapher_spec.rb +57 -0
- data/spec/metric_fu/metrics/saikuro/configuration_spec.rb +25 -0
- data/spec/metric_fu/metrics/saikuro/generator_spec.rb +71 -0
- data/spec/metric_fu/metrics/stats/generator_spec.rb +96 -0
- data/spec/metric_fu/metrics/stats/grapher_spec.rb +69 -0
- data/spec/metric_fu/reporter_spec.rb +41 -0
- data/spec/metric_fu/reporting/graphs/graph_spec.rb +44 -0
- data/spec/metric_fu/reporting/graphs/grapher_spec.rb +24 -0
- data/spec/metric_fu/reporting/result_spec.rb +50 -0
- data/spec/metric_fu/run_spec.rb +197 -0
- data/spec/metric_fu/templates/configuration_spec.rb +51 -0
- data/spec/metric_fu/templates/metrics_template_spec.rb +11 -0
- data/spec/metric_fu/templates/report_spec.rb +15 -0
- data/spec/metric_fu/templates/template_spec.rb +233 -0
- data/spec/metric_fu/utility_spec.rb +12 -0
- data/spec/metric_fu_spec.rb +33 -0
- data/spec/quality_spec.rb +114 -0
- data/spec/shared/configured.rb +45 -0
- data/spec/shared/test_coverage.rb +95 -0
- data/spec/spec_helper.rb +54 -0
- data/spec/support/deferred_garbaged_collection.rb +33 -0
- data/spec/support/helper_methods.rb +32 -0
- data/spec/support/matcher_create_file.rb +37 -0
- data/spec/support/matcher_create_files.rb +43 -0
- data/spec/support/suite.rb +26 -0
- data/spec/support/test_fixtures.rb +37 -0
- data/spec/support/timeout.rb +7 -0
- data/spec/support/usage_test.rb +150 -0
- data/spec/usage_test_spec.rb +93 -0
- metadata +757 -0
@@ -0,0 +1,86 @@
|
|
1
|
+
---
|
2
|
+
:flog:
|
3
|
+
:method_containers:
|
4
|
+
- :highest_score: 85.5481735632041
|
5
|
+
:path: ""
|
6
|
+
:methods:
|
7
|
+
main#none:
|
8
|
+
:path:
|
9
|
+
:score: 85.5481735632041
|
10
|
+
:operators:
|
11
|
+
:+: 9.10000000000001
|
12
|
+
:assignment: 11.6000000000001
|
13
|
+
:require: 38.5000000000002
|
14
|
+
:branch: 8.80000000000009
|
15
|
+
:join: 20.0000000000002
|
16
|
+
:each: 6.60000000000007
|
17
|
+
:[]: 7.80000000000007
|
18
|
+
:task_defined?: 1.10000000000001
|
19
|
+
:load: 1.20000000000001
|
20
|
+
:average_score: 85.5481735632041
|
21
|
+
:total_score: 85.5481735632041
|
22
|
+
:name: main
|
23
|
+
- :highest_score: 61.5870319141946
|
24
|
+
:path: lib/generators/rcov.rb
|
25
|
+
:methods:
|
26
|
+
Rcov#add_method_data:
|
27
|
+
:path: lib/generators/rcov.rb:57
|
28
|
+
:score: 61.5870319141946
|
29
|
+
:operators:
|
30
|
+
:+: 1.70000000000001
|
31
|
+
:/: 1.80000000000001
|
32
|
+
:method_at_line: 1.90000000000001
|
33
|
+
:puts: 1.70000000000001
|
34
|
+
:assignment: 33.0000000000001
|
35
|
+
:in_method?: 1.70000000000001
|
36
|
+
:message: 1.70000000000001
|
37
|
+
:branch: 12.6
|
38
|
+
:<<: 3.40000000000001
|
39
|
+
:each: 1.50000000000001
|
40
|
+
:lit_fixnum: 1.45
|
41
|
+
:raise: 1.80000000000001
|
42
|
+
:each_pair: 1.3
|
43
|
+
:*: 1.60000000000001
|
44
|
+
:to_f: 2.00000000000001
|
45
|
+
:each_with_index: 3.00000000000001
|
46
|
+
:[]: 22.3000000000001
|
47
|
+
:new: 1.60000000000001
|
48
|
+
Rcov#analyze:
|
49
|
+
:path: lib/generators/rcov.rb:34
|
50
|
+
:score: 19.1504569136092
|
51
|
+
:operators:
|
52
|
+
:+: 1.40000000000001
|
53
|
+
:metric_directory: 1.6
|
54
|
+
:assignment: 9.10000000000004
|
55
|
+
:assemble_files: 1.3
|
56
|
+
:branch: 1.3
|
57
|
+
:open: 1.5
|
58
|
+
:shift: 1.3
|
59
|
+
:split: 1.3
|
60
|
+
:rcov: 3.10000000000001
|
61
|
+
:add_coverage_percentage: 1.3
|
62
|
+
:read: 1.3
|
63
|
+
:[]: 2.70000000000001
|
64
|
+
- :highest_score: 60.0573892206447
|
65
|
+
:path: lib/base/metric_analyzer.rb
|
66
|
+
:methods:
|
67
|
+
HotspotAnalyzer#grouping_key:
|
68
|
+
:path: lib/base/metric_analyzer.rb:117
|
69
|
+
:score: 2.6
|
70
|
+
:operators:
|
71
|
+
:inspect: 1.3
|
72
|
+
:object_id: 1.3
|
73
|
+
HotspotAnalyzer#fix_row_file_path!:
|
74
|
+
:path: lib/base/metric_analyzer.rb:148
|
75
|
+
:score: 20.2743680542699
|
76
|
+
:operators:
|
77
|
+
:assignment: 10.0
|
78
|
+
:include?: 3.1
|
79
|
+
:branch: 7.20000000000001
|
80
|
+
:detect: 1.5
|
81
|
+
:file_paths: 1.7
|
82
|
+
:==: 3.1
|
83
|
+
:to_s: 1.3
|
84
|
+
:[]: 5.40000000000001
|
85
|
+
:average_score: 27.8909176873585
|
86
|
+
:total_score: 195.23642381151
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
:reek:
|
3
|
+
:matches:
|
4
|
+
- :file_path: lib/client/client.rb:42
|
5
|
+
:code_smells:
|
6
|
+
- :type: Large Class
|
7
|
+
:message: has at least 27 methods
|
8
|
+
:method: Devver::Client
|
9
|
+
- :type: Long Method
|
10
|
+
:message: has approx 6 statements
|
11
|
+
:method: Devver::Client#client_requested_sync
|
12
|
+
:flog:
|
13
|
+
:method_containers:
|
14
|
+
- :highest_score: 61.5870319141946
|
15
|
+
:path: /lib/client/client.rb
|
16
|
+
:methods:
|
17
|
+
Client#client_requested_sync:
|
18
|
+
:path: /lib/client/client.rb:42
|
19
|
+
:score: 37.9270319141946
|
20
|
+
:operators:
|
21
|
+
:+: 1.70000000000001
|
22
|
+
:/: 1.80000000000001
|
23
|
+
:method_at_line: 1.90000000000001
|
24
|
+
:puts: 1.70000000000001
|
25
|
+
:assignment: 33.0000000000001
|
26
|
+
:in_method?: 1.70000000000001
|
27
|
+
:message: 1.70000000000001
|
28
|
+
:branch: 12.6
|
29
|
+
:<<: 3.40000000000001
|
30
|
+
:each: 1.50000000000001
|
31
|
+
:lit_fixnum: 1.45
|
32
|
+
:raise: 1.80000000000001
|
33
|
+
:each_pair: 1.3
|
34
|
+
:*: 1.60000000000001
|
35
|
+
:to_f: 2.00000000000001
|
36
|
+
:each_with_index: 3.00000000000001
|
37
|
+
:[]: 22.3000000000001
|
38
|
+
:new: 1.60000000000001
|
39
|
+
:average_score: 11.1209009055421
|
40
|
+
:total_score: 1817.6
|
41
|
+
:name: Client#client_requested_sync
|
42
|
+
:churn:
|
43
|
+
:changes:
|
44
|
+
- :file_path: lib/client/client.rb
|
45
|
+
:times_changed: 54
|
46
|
+
- :file_path: lib/client/foo.rb
|
47
|
+
:times_changed: 52
|
@@ -0,0 +1,53 @@
|
|
1
|
+
---
|
2
|
+
files:
|
3
|
+
- location:
|
4
|
+
class_name:
|
5
|
+
method_name:
|
6
|
+
file_path: lib/client/client.rb:42
|
7
|
+
file_name: lib/client/client.rb
|
8
|
+
line_number: '42'
|
9
|
+
hash_key: '["lib/client/client.rb:42", nil, nil]'
|
10
|
+
details:
|
11
|
+
flog: complexity is 37.9
|
12
|
+
reek: found 2 code smells
|
13
|
+
- location:
|
14
|
+
class_name:
|
15
|
+
method_name:
|
16
|
+
file_path: lib/client/client.rb
|
17
|
+
file_name: lib/client/client.rb
|
18
|
+
line_number:
|
19
|
+
hash_key: '["lib/client/client.rb", nil, nil]'
|
20
|
+
details:
|
21
|
+
churn: detected high level of churn (changed 54 times)
|
22
|
+
- location:
|
23
|
+
class_name:
|
24
|
+
method_name:
|
25
|
+
file_path: lib/client/foo.rb
|
26
|
+
file_name: lib/client/foo.rb
|
27
|
+
line_number:
|
28
|
+
hash_key: '["lib/client/foo.rb", nil, nil]'
|
29
|
+
details:
|
30
|
+
churn: detected high level of churn (changed 52 times)
|
31
|
+
classes:
|
32
|
+
- location:
|
33
|
+
class_name: Client
|
34
|
+
method_name:
|
35
|
+
file_path: lib/client/client.rb:42
|
36
|
+
file_name: lib/client/client.rb
|
37
|
+
line_number: '42'
|
38
|
+
hash_key: '["lib/client/client.rb:42", "Client", nil]'
|
39
|
+
details:
|
40
|
+
flog: complexity is 37.9
|
41
|
+
reek: found 2 code smells
|
42
|
+
methods:
|
43
|
+
- location:
|
44
|
+
class_name: Client
|
45
|
+
method_name: Client#client_requested_sync
|
46
|
+
file_path: lib/client/client.rb:42
|
47
|
+
file_name: lib/client/client.rb
|
48
|
+
line_number: '42'
|
49
|
+
hash_key: '["lib/client/client.rb:42", "Client", "Client#client_requested_sync"]'
|
50
|
+
simple_method_name: '#client_requested_sync'
|
51
|
+
details:
|
52
|
+
flog: complexity is 37.9
|
53
|
+
reek: found 1 code smells
|
@@ -0,0 +1,14 @@
|
|
1
|
+
---
|
2
|
+
:reek:
|
3
|
+
:matches:
|
4
|
+
- :file_path: lib/client/client.rb
|
5
|
+
:code_smells:
|
6
|
+
- :type: Large Class
|
7
|
+
:message: has at least 27 methods
|
8
|
+
:method: Devver::Client
|
9
|
+
- :type: Long Method
|
10
|
+
:message: has approx 6 statements
|
11
|
+
:method: Devver::Client#client_requested_sync
|
12
|
+
- :type: Large Class
|
13
|
+
:message: has at least 20 methods
|
14
|
+
:method: Devver::Foo
|
@@ -0,0 +1,13 @@
|
|
1
|
+
:roodi:
|
2
|
+
:total:
|
3
|
+
- Found 164 errors.
|
4
|
+
:problems:
|
5
|
+
- :line: "158"
|
6
|
+
:file: lib/client/client.rb
|
7
|
+
:problem: Method name "process" cyclomatic complexity is 10. It should be 8 or less.
|
8
|
+
- :line: "232"
|
9
|
+
:file: lib/client/client.rb
|
10
|
+
:problem: Method name "process_ready" cyclomatic complexity is 15. It should be 8 or less.
|
11
|
+
- :line: "288"
|
12
|
+
:file: lib/client/foobar.rb
|
13
|
+
:problem: Method name "send_tests" cyclomatic complexity is 10. It should be 8 or less.
|
@@ -0,0 +1,27 @@
|
|
1
|
+
:saikuro:
|
2
|
+
:files:
|
3
|
+
- :classes:
|
4
|
+
- :complexity: 0
|
5
|
+
:methods: []
|
6
|
+
:lines: 3
|
7
|
+
:class_name: Shorty
|
8
|
+
- :complexity: 19
|
9
|
+
:methods:
|
10
|
+
- :complexity: 9
|
11
|
+
:lines: 6
|
12
|
+
:name: Shorty::Supr#self.handle_full_or_hash_option
|
13
|
+
- :complexity: 1
|
14
|
+
:lines: 9
|
15
|
+
:name: Shorty::Supr#initialize
|
16
|
+
:lines: 92
|
17
|
+
:class_name: Shorty::Supr
|
18
|
+
:filename: supr.rb
|
19
|
+
- :classes:
|
20
|
+
- :complexity: 12
|
21
|
+
:methods:
|
22
|
+
- :complexity: 8
|
23
|
+
:lines: 10
|
24
|
+
:name: Shorty::Bitly#info
|
25
|
+
:lines: 104
|
26
|
+
:class_name: Shorty::Bitly
|
27
|
+
:filename: bitly.rb
|
@@ -0,0 +1,47 @@
|
|
1
|
+
---
|
2
|
+
:reek:
|
3
|
+
:matches:
|
4
|
+
- :file_path: lib/client/client.rb
|
5
|
+
:code_smells:
|
6
|
+
- :type: Large Class
|
7
|
+
:message: has at least 27 methods
|
8
|
+
:method: Devver::Client
|
9
|
+
- :type: Long Method
|
10
|
+
:message: has approx 6 statements
|
11
|
+
:method: Devver::Client#client_requested_sync
|
12
|
+
:flog:
|
13
|
+
:method_containers:
|
14
|
+
- :highest_score: 61.5870319141946
|
15
|
+
:path: /lib/client/client.rb
|
16
|
+
:methods:
|
17
|
+
Client#client_requested_sync:
|
18
|
+
:path: /lib/client/client.rb
|
19
|
+
:score: 37.9270319141946
|
20
|
+
:operators:
|
21
|
+
:+: 1.70000000000001
|
22
|
+
:/: 1.80000000000001
|
23
|
+
:method_at_line: 1.90000000000001
|
24
|
+
:puts: 1.70000000000001
|
25
|
+
:assignment: 33.0000000000001
|
26
|
+
:in_method?: 1.70000000000001
|
27
|
+
:message: 1.70000000000001
|
28
|
+
:branch: 12.6
|
29
|
+
:<<: 3.40000000000001
|
30
|
+
:each: 1.50000000000001
|
31
|
+
:lit_fixnum: 1.45
|
32
|
+
:raise: 1.80000000000001
|
33
|
+
:each_pair: 1.3
|
34
|
+
:*: 1.60000000000001
|
35
|
+
:to_f: 2.00000000000001
|
36
|
+
:each_with_index: 3.00000000000001
|
37
|
+
:[]: 22.3000000000001
|
38
|
+
:new: 1.60000000000001
|
39
|
+
:average_score: 11.1209009055421
|
40
|
+
:total_score: 1817.6
|
41
|
+
:name: Client#client_requested_sync
|
42
|
+
:churn:
|
43
|
+
:changes:
|
44
|
+
- :file_path: lib/client/client.rb
|
45
|
+
:times_changed: 54
|
46
|
+
- :file_path: lib/client/foo.rb
|
47
|
+
:times_changed: 52
|
@@ -0,0 +1,36 @@
|
|
1
|
+
:saikuro:
|
2
|
+
:files:
|
3
|
+
- :classes:
|
4
|
+
- :complexity: 19
|
5
|
+
:methods:
|
6
|
+
- :complexity: 1
|
7
|
+
:lines: 9
|
8
|
+
:name: Client#client_requested_sync
|
9
|
+
- :complexity: 1
|
10
|
+
:lines: 9
|
11
|
+
:name: Client#method_that_is_not_mentioned_elsewhere_in_stats
|
12
|
+
:lines: 92
|
13
|
+
:class_name: Devver::Client
|
14
|
+
:filename: client.rb
|
15
|
+
:reek:
|
16
|
+
:matches:
|
17
|
+
- :file_path: lib/client/client.rb
|
18
|
+
:code_smells:
|
19
|
+
- :type: Large Class
|
20
|
+
:message: has at least 27 methods
|
21
|
+
:method: Devver::Client
|
22
|
+
- :type: Long Method
|
23
|
+
:message: has approx 6 statements
|
24
|
+
:method: Devver::Client#client_requested_sync
|
25
|
+
:flog:
|
26
|
+
:total: 1817.6
|
27
|
+
:pages:
|
28
|
+
- :path: /lib/client/client.rb
|
29
|
+
:highest_score: 37.9
|
30
|
+
:average_score: 13.6
|
31
|
+
:scanned_methods:
|
32
|
+
- :operators:
|
33
|
+
- :operator: "[]"
|
34
|
+
:score: 11.1
|
35
|
+
:score: 37.9
|
36
|
+
:name: Client#client_requested_sync
|
@@ -0,0 +1,33 @@
|
|
1
|
+
class Foo
|
2
|
+
|
3
|
+
def self.awesome
|
4
|
+
1 + 1
|
5
|
+
end
|
6
|
+
|
7
|
+
def what
|
8
|
+
12
|
9
|
+
end
|
10
|
+
|
11
|
+
def hello
|
12
|
+
puts "Hi There"
|
13
|
+
end
|
14
|
+
|
15
|
+
|
16
|
+
def awesome
|
17
|
+
3+4
|
18
|
+
end
|
19
|
+
|
20
|
+
class << self
|
21
|
+
def neat
|
22
|
+
"23 skido"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def whoop
|
29
|
+
"w00t"
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
#comment
|
@@ -0,0 +1 @@
|
|
1
|
+
---
|
@@ -0,0 +1,135 @@
|
|
1
|
+
Profiling enabled.
|
2
|
+
.............................................................................................................................................................................................
|
3
|
+
|
4
|
+
|
5
|
+
Top 10 slowest examples:
|
6
|
+
0.2707830 MetricFu::RoodiGrapher responding to #get_metrics should push 13 to roodi_count
|
7
|
+
0.1994550 MetricFu::RcovGrapher responding to #get_metrics should update labels with the date
|
8
|
+
0.1985800 MetricFu::ReekGrapher responding to #get_metrics should set a hash of code smells to reek_count
|
9
|
+
0.1919860 MetricFu::ReekGrapher responding to #get_metrics should update labels with the date
|
10
|
+
0.1907400 MetricFu::RoodiGrapher responding to #get_metrics should update labels with the date
|
11
|
+
0.1883000 MetricFu::FlogGrapher responding to #get_metrics should update labels with the date
|
12
|
+
0.1882650 MetricFu::FlayGrapher responding to #get_metrics should push 476 to flay_score
|
13
|
+
0.1868780 MetricFu::FlogGrapher responding to #get_metrics should push to top_five_percent_average
|
14
|
+
0.1847730 MetricFu::FlogGrapher responding to #get_metrics should push 9.9 to flog_average
|
15
|
+
0.1844090 MetricFu::FlayGrapher responding to #get_metrics should update labels with the date
|
16
|
+
|
17
|
+
Finished in 2.517686 seconds
|
18
|
+
|
19
|
+
189 examples, 0 failures
|
20
|
+
================================================================================
|
21
|
+
./lib/metric_fu/metrics/hotspots/analysis/record.rb
|
22
|
+
================================================================================
|
23
|
+
module MetricFu
|
24
|
+
class Record
|
25
|
+
--
|
26
|
+
attr_reader :data
|
27
|
+
--
|
28
|
+
def initialize(data, columns)
|
29
|
+
@data = data
|
30
|
+
-- end
|
31
|
+
--
|
32
|
+
def method_missing(name, *args, &block)
|
33
|
+
key = name.to_s
|
34
|
+
if key == 'fetch'
|
35
|
+
@data.send(name, *args, &block)
|
36
|
+
elsif @data.has_key?(key)
|
37
|
+
@data[key]
|
38
|
+
-- else
|
39
|
+
!! super(name, *args, &block)
|
40
|
+
-- end
|
41
|
+
-- end
|
42
|
+
--
|
43
|
+
def []=(key, value)
|
44
|
+
@data[key]=value
|
45
|
+
-- end
|
46
|
+
--
|
47
|
+
def [](key)
|
48
|
+
@data[key]
|
49
|
+
-- end
|
50
|
+
--
|
51
|
+
def has_key?(key)
|
52
|
+
@data.has_key?(key)
|
53
|
+
-- end
|
54
|
+
--
|
55
|
+
-- end
|
56
|
+
-- end
|
57
|
+
|
58
|
+
================================================================================
|
59
|
+
./lib/metric_fu/metrics/hotspots/analysis/table.rb
|
60
|
+
================================================================================
|
61
|
+
%w(record).each do |path|
|
62
|
+
MetricFu.metrics_require { "hotspots/analysis/#{path}" }
|
63
|
+
-- end
|
64
|
+
--
|
65
|
+
module MetricFu
|
66
|
+
class Table
|
67
|
+
include Enumerable
|
68
|
+
--
|
69
|
+
def initialize(opts = {})
|
70
|
+
@rows = []
|
71
|
+
@columns = opts.fetch(:column_names)
|
72
|
+
--
|
73
|
+
@make_index = opts.fetch(:make_index) {true}
|
74
|
+
@metric_index = {}
|
75
|
+
-- end
|
76
|
+
--
|
77
|
+
def <<(row)
|
78
|
+
record = nil
|
79
|
+
if row.is_a?(MetricFu::Record)
|
80
|
+
record = row
|
81
|
+
-- else
|
82
|
+
record = MetricFu::Record.new(row, @columns)
|
83
|
+
-- end
|
84
|
+
@rows << record
|
85
|
+
updated_key_index(record) if @make_index
|
86
|
+
-- end
|
87
|
+
--
|
88
|
+
def concat(records)
|
89
|
+
!! records.each do |record|
|
90
|
+
!! self << record
|
91
|
+
-- end
|
92
|
+
!! self
|
93
|
+
-- end
|
94
|
+
--
|
95
|
+
def each
|
96
|
+
@rows.each do |row|
|
97
|
+
yield row
|
98
|
+
-- end
|
99
|
+
-- end
|
100
|
+
--
|
101
|
+
def size
|
102
|
+
length
|
103
|
+
-- end
|
104
|
+
--
|
105
|
+
def length
|
106
|
+
@rows.length
|
107
|
+
-- end
|
108
|
+
--
|
109
|
+
def [](index)
|
110
|
+
@rows[index]
|
111
|
+
-- end
|
112
|
+
--
|
113
|
+
def column(column_name)
|
114
|
+
arr = []
|
115
|
+
@rows.each do |row|
|
116
|
+
arr << row[column_name]
|
117
|
+
-- end
|
118
|
+
arr
|
119
|
+
-- end
|
120
|
+
--
|
121
|
+
def group_by_metric
|
122
|
+
@metric_index.to_a
|
123
|
+
-- end
|
124
|
+
--
|
125
|
+
private
|
126
|
+
--
|
127
|
+
def updated_key_index(record)
|
128
|
+
if record.has_key?('metric')
|
129
|
+
@metric_index[record.metric] ||= MetricFu::Table.new(:column_names => @columns, :make_index => false)
|
130
|
+
@metric_index[record.metric] << record
|
131
|
+
-- end
|
132
|
+
-- end
|
133
|
+
--
|
134
|
+
-- end
|
135
|
+
-- end
|
@@ -0,0 +1,10 @@
|
|
1
|
+
-- START --
|
2
|
+
Type:Global Name: Complexity:0 Lines:1
|
3
|
+
-- END --
|
4
|
+
-- START SessionsController --
|
5
|
+
Type:Class Name:SessionsController Complexity:6 Lines:40
|
6
|
+
Type:Def Name:new Complexity:2 Lines:2
|
7
|
+
Type:Def Name:create Complexity:2 Lines:19
|
8
|
+
Type:Def Name:destroy Complexity:1 Lines:4
|
9
|
+
Type:Def Name:note_failed_signin Complexity:1 Lines:3
|
10
|
+
-- END SessionsController --
|
@@ -0,0 +1,16 @@
|
|
1
|
+
-- START UsersController --
|
2
|
+
Type:Class Name:UsersController Complexity:25 Lines:111
|
3
|
+
Type:Def Name:signup Complexity:1 Lines:3
|
4
|
+
Type:Def Name:new Complexity:1 Lines:2
|
5
|
+
Type:Def Name:edit Complexity:1 Lines:3
|
6
|
+
Type:Def Name:update Complexity:2 Lines:8
|
7
|
+
Type:Def Name:index Complexity:1 Lines:2
|
8
|
+
Type:Def Name:create Complexity:4 Lines:15
|
9
|
+
Type:Def Name:thank_you Complexity:2 Lines:10
|
10
|
+
Type:Def Name:destroy Complexity:1 Lines:3
|
11
|
+
Type:Def Name:add_primary_site Complexity:1 Lines:4
|
12
|
+
Type:Def Name:users_have_changed Complexity:3 Lines:8
|
13
|
+
Type:Def Name:after_create_page Complexity:2 Lines:6
|
14
|
+
Type:Def Name:sanitize_params Complexity:3 Lines:3
|
15
|
+
Type:Def Name:authorize_user Complexity:3 Lines:5
|
16
|
+
-- END UsersController --
|