rubycritic 4.8.0 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -4
- data/README.md +36 -32
- data/ROADMAP.md +16 -16
- data/Rakefile +1 -1
- data/lib/rubycritic/analysers/coverage.rb +4 -5
- data/lib/rubycritic/analysers/helpers/ast_node.rb +2 -2
- data/lib/rubycritic/analysers/helpers/modules_locator.rb +1 -1
- data/lib/rubycritic/cli/options/argv.rb +5 -1
- data/lib/rubycritic/cli/options/file.rb +7 -1
- data/lib/rubycritic/commands/compare.rb +6 -2
- data/lib/rubycritic/commands/status_reporter.rb +1 -0
- data/lib/rubycritic/commands/version.rb +1 -0
- data/lib/rubycritic/configuration.rb +9 -3
- data/lib/rubycritic/core/analysed_module.rb +1 -1
- data/lib/rubycritic/core/analysed_modules_collection.rb +2 -2
- data/lib/rubycritic/core/rating.rb +2 -1
- data/lib/rubycritic/core/smell.rb +1 -1
- data/lib/rubycritic/generators/html/assets/javascripts/application.js +8 -2
- data/lib/rubycritic/generators/html/line.rb +1 -1
- data/lib/rubycritic/generators/html/templates/simple_cov_index.html.erb +16 -13
- data/lib/rubycritic/generators/html/templates/smells_index.html.erb +1 -1
- data/lib/rubycritic/generators/html/view_helpers.rb +4 -1
- data/lib/rubycritic/generators/html_report.rb +1 -3
- data/lib/rubycritic/generators/json_report.rb +1 -3
- data/lib/rubycritic/generators/lint_report.rb +1 -3
- data/lib/rubycritic/source_control_systems/base.rb +3 -3
- data/lib/rubycritic/source_control_systems/git/churn.rb +34 -9
- data/lib/rubycritic/source_control_systems/git.rb +4 -4
- data/lib/rubycritic/source_control_systems/perforce.rb +1 -1
- data/lib/rubycritic/version.rb +1 -1
- metadata +117 -80
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9bea0ead82dce8ce7d27a1421044b70841199150f37e2293c41046ed4f96e50a
|
4
|
+
data.tar.gz: ef72c2062593c9c8cccea0c01e3f06904051c48de42ee55b3f0a2b672bf1186e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57279fe99d97710ee3e5371adf8b001f8d4f272a69b9e1cb4ef06083404d8e3d5ce4c10671f59a8e2a3f5728d46b3f12fa7a77a41510a9d9618caee2745b338e
|
7
|
+
data.tar.gz: b1e216cf37893fcc573ece5d68e137f47797b490da322efed18e8ef060ef9935ba38be5a68fd293f516840ee942b25426f97487d4c97155f962f23f138498469
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,31 @@
|
|
1
|
-
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.
|
1
|
+
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.9.1...main)
|
2
|
+
|
3
|
+
# v4.9.1 / 2024-04-14 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.9.0...v4.9.1)
|
4
|
+
|
5
|
+
* [CHANGE] Bump cucumber, minitest, parser, rake, reek, rubocop, and ruby_parser dependencies (by [@faisal][])
|
6
|
+
* [CHANGE] Fix some typos (by [@jbampton][])
|
7
|
+
* [FEATURE] Add coverage_path configuration option (by [@exoego][])
|
8
|
+
|
9
|
+
# v4.9.0 / 2023-10-18 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.8.1...v4.9.0)
|
10
|
+
|
11
|
+
* [CHANGE] Bump aruba, cucumber, fakefs, flog, mdl, minitest, and rubocop dependencies (by [@faisal][])
|
12
|
+
* [CHANGE] Fix test warning related to `cucumber_opts` declaration (by [@faisal][])
|
13
|
+
* [BUGFIX] Stop using long-deprecated MiniTest module name, removed in 5.19.0 (by [@faisal][])
|
14
|
+
* [CHANGE] Disable VERBOSE warnings in test stubs (by [@fbuys][])
|
15
|
+
* [CHANGE] Add rexml dependency for Ruby 3.0.0+ support (by [@fbuys][])
|
16
|
+
* [BUGFIX] Raise error when the same branches are compared (by [@rishijain][])
|
17
|
+
* [BUGFIX] Churn score was always 0 when rubycritic was executed from a sub-directory (by [@rishijain][])
|
18
|
+
* [BUGFIX] Use overview.html as the fallback path when files does not exist during compare option (by [@rishijain][])
|
19
|
+
* [BUGFIX] Use name from the file path instead of fetching name from the parser (by [@rishijain][])
|
20
|
+
|
21
|
+
# v4.8.1 / 2023-05-17 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.8.0...v4.8.1)
|
22
|
+
|
23
|
+
* [CHANGE] Update runtime dependencies to current versions of analysis gems (by [@faisal][])
|
24
|
+
* [CHANGE] Update the mdl development_dependency from 0.5 to 0.12 (by [@faisal][])
|
25
|
+
* [CHANGE] Update rubocop to use current version (~1.51.0) and relevant plugins (by [@faisal][]])
|
26
|
+
* [CHANGE] Update testing gems to current versions (by [@faisal][])
|
27
|
+
* [BUGFIX] Fix sort and filters on the coverage page (by [@kcamcam][])
|
28
|
+
* [CHANGE] Scope churn calculation to provided paths (by [@Fito][])
|
2
29
|
|
3
30
|
# v4.8.0 / 2023-05-12 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.7.0...v4.8.0)
|
4
31
|
|
@@ -82,7 +109,7 @@
|
|
82
109
|
|
83
110
|
# v4.3.0 / 2019-12-26 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.2.2...v4.3.0)
|
84
111
|
|
85
|
-
* [FEATURE] Show which files are
|
112
|
+
* [FEATURE] Show which files are uncommitted in git (by [@GeoffTidey][])
|
86
113
|
* [BUGFIX] Fixes TypeError when `.resultset.json` is not found (by [@etagwerker][])
|
87
114
|
|
88
115
|
# v4.2.2 / 2019-11-12 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.2.1...v4.2.2)
|
@@ -320,7 +347,7 @@
|
|
320
347
|
|
321
348
|
* [FEATURE] Add CI mode that only analyses the last commit
|
322
349
|
* [FEATURE] Add partial support for Mercurial
|
323
|
-
* [FEATURE] Allow using RubyCritic
|
350
|
+
* [FEATURE] Allow using RubyCritic programmatically
|
324
351
|
* [CHANGE] Update to Reek 1.6.0 (from 1.3.8)
|
325
352
|
* [BUGFIX] Fix issue #18 - Prevent encoding issues when using Git
|
326
353
|
|
@@ -418,4 +445,7 @@
|
|
418
445
|
[@marcgrimme]: https://github.com/marcgrimme
|
419
446
|
[@katafrakt]: https://github.com/katafrakt
|
420
447
|
[@faisal]: https://github.com/faisal
|
421
|
-
[@96RadhikaJadhav]: https://github.com/
|
448
|
+
[@96RadhikaJadhav]: https://github.com/96RadhikaJadhav
|
449
|
+
[@Fito]: https://github.com/Fito
|
450
|
+
[@fbuys]: https://github.com/fbuys
|
451
|
+
[@exoego]: https://github.com/exoego
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/rubycritic)
|
4
4
|
[](https://github.com/whitesmith/rubycritic/actions/workflows/main.yml)
|
5
|
-
[](https://travis-ci.org/whitesmith/rubycritic)
|
6
5
|
[](https://codeclimate.com/github/whitesmith/rubycritic)
|
7
6
|
|
8
7
|
<img src="https://github.com/whitesmith/rubycritic/raw/main/images/logo.png" alt="RubyCritic Icon" align="right">
|
@@ -11,17 +10,19 @@ RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [F
|
|
11
10
|
|
12
11
|
## Table of Contents
|
13
12
|
|
14
|
-
- [
|
15
|
-
- [
|
16
|
-
- [
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- [
|
21
|
-
- [
|
22
|
-
- [
|
23
|
-
- [
|
24
|
-
- [
|
13
|
+
- [RubyCritic](#rubycritic)
|
14
|
+
- [Table of Contents](#table-of-contents)
|
15
|
+
- [Overview](#overview)
|
16
|
+
- [Getting Started](#getting-started)
|
17
|
+
- [Usage](#usage)
|
18
|
+
- [Analyzer Configuration](#analyzer-configuration)
|
19
|
+
- [Alternative Usage Methods](#alternative-usage-methods)
|
20
|
+
- [Rake Task](#rake-task)
|
21
|
+
- [Formatters](#formatters)
|
22
|
+
- [Compatibility](#compatibility)
|
23
|
+
- [Improving RubyCritic](#improving-rubycritic)
|
24
|
+
- [Contributors](#contributors)
|
25
|
+
- [Credits](#credits)
|
25
26
|
|
26
27
|
## Overview
|
27
28
|
|
@@ -95,7 +96,8 @@ current directory:
|
|
95
96
|
$ rubycritic
|
96
97
|
```
|
97
98
|
|
98
|
-
Alternatively you can pass `rubycritic` a list of files and directories
|
99
|
+
Alternatively you can pass `rubycritic` a list of files and directories.
|
100
|
+
The analysis will be scoped to the provided files and directories:
|
99
101
|
|
100
102
|
```bash
|
101
103
|
$ rubycritic app lib/foo.rb
|
@@ -107,19 +109,20 @@ For a full list of the command-line options run:
|
|
107
109
|
$ rubycritic --help
|
108
110
|
```
|
109
111
|
|
110
|
-
| Command flag
|
111
|
-
|
112
|
-
| `-v` / `--version`
|
113
|
-
| `-p` / `--path`
|
114
|
-
|
|
115
|
-
| `--
|
116
|
-
|
|
117
|
-
| `-
|
118
|
-
| `-
|
119
|
-
| `-
|
120
|
-
| `--
|
121
|
-
| `--
|
122
|
-
| `--
|
112
|
+
| Command flag | Description |
|
113
|
+
|----------------------------------|-----------------------------------------------------------------|
|
114
|
+
| `-v` / `--version` | Displays the current version and exits |
|
115
|
+
| `-p` / `--path` | Set path where report will be saved (tmp/rubycritic by default) |
|
116
|
+
| `--coverage-path` | Set path where SimpleCov will be saved (./coverage by default) |
|
117
|
+
| `-f` / `--format` | Report smells in the given format(s)<sup>1</sup> |
|
118
|
+
| `--custom-format path:classname` | Load and instantiate custom formatter(s)<sup>2</sup> |
|
119
|
+
| `-s` / `--minimum-score` | Set a minimum score (FLOAT: ex: 96.28), default: 0 |
|
120
|
+
| `-m` / `--mode-ci` | Use CI mode<sup>3</sup> |
|
121
|
+
| `-b` / `--branch` | Set branch to compare |
|
122
|
+
| `-t` / `--maximum-decrease` | Threshold for score difference between two branches<sup>4</sup> |
|
123
|
+
| `--deduplicate-symlinks` | De-duplicate symlinks based on their final target |
|
124
|
+
| `--suppress-ratings` | Suppress letter ratings |
|
125
|
+
| `--no-browser` | Do not open html report with browser |
|
123
126
|
|
124
127
|
1. Available output formats:
|
125
128
|
- `html` (default; will open in a browser)
|
@@ -140,6 +143,7 @@ mode_ci:
|
|
140
143
|
branch: 'production' # default is main
|
141
144
|
branch: 'production' # default is main
|
142
145
|
path: '/tmp/mycustompath' # Set path where report will be saved (tmp/rubycritic by default)
|
146
|
+
coverage_path: '/tmp/coverage' # Set path where SimpleCov coverage will be saved (./coverage by default)
|
143
147
|
threshold_score: 10 # default is 0
|
144
148
|
deduplicate_symlinks: true # default is false
|
145
149
|
suppress_ratings: true # default is false
|
@@ -147,7 +151,7 @@ no_browser: true # default is false
|
|
147
151
|
formats: # Available values are: html, json, console, lint. Default value is html.
|
148
152
|
- console
|
149
153
|
minimum_score: 95 # default is 0
|
150
|
-
paths: # Files to analyse.
|
154
|
+
paths: # Files to analyse. Churn calculation is scoped to these files when using Git SCM.
|
151
155
|
- 'app/controllers/'
|
152
156
|
- 'app/models/'
|
153
157
|
```
|
@@ -159,9 +163,9 @@ paths: # Files to analyse.
|
|
159
163
|
project root and `RubyCritic` will respect this configuration.
|
160
164
|
* [`flay`](https://github.com/seattlerb/flay): We use `flay`'s default configuration.
|
161
165
|
* [`flog`](https://github.com/seattlerb/flog): We use `flog`'s default configuration with a couple of [smaller tweaks](https://github.com/whitesmith/rubycritic/blob/main/lib/rubycritic/analysers/helpers/flog.rb#L5):
|
162
|
-
|
163
|
-
|
164
|
-
|
166
|
+
* `all`: Forces `flog` to report scores on all classes and methods. Without this option `flog` will only give results up to a certain threshold.
|
167
|
+
* `continue`: Makes it so that `flog` does not abort when a ruby file cannot be parsed.
|
168
|
+
* `methods`: Configures `flog` to skip code outside of methods. It prevents `flog` from reporting on the "methods" `private` and `protected`. It also prevents `flog` from reporting on Rails methods like `before_action` and `has_many`.
|
165
169
|
|
166
170
|
### Alternative Usage Methods
|
167
171
|
|
@@ -235,11 +239,11 @@ See [formatters](docs/formatters.md)
|
|
235
239
|
RubyCritic is supporting Ruby versions:
|
236
240
|
|
237
241
|
| Ruby version | Latest RubyCritic version |
|
238
|
-
|
|
242
|
+
| --- | --- |
|
239
243
|
| 2.4 | [v4.7.0](https://github.com/whitesmith/rubycritic/tree/v4.7.0) |
|
240
244
|
| 2.5 | [v4.7.0](https://github.com/whitesmith/rubycritic/tree/v4.7.0) |
|
241
245
|
| 2.6 | [v4.7.0](https://github.com/whitesmith/rubycritic/tree/v4.7.0) |
|
242
|
-
| 2.7 |
|
246
|
+
| 2.7 | [v4.9.x](https://github.com/whitesmith/rubycritic/tree/v4.9.1) |
|
243
247
|
| 3.0 | latest |
|
244
248
|
| 3.1 | latest |
|
245
249
|
|
data/ROADMAP.md
CHANGED
@@ -6,9 +6,9 @@ These are more nice-to-haves than promises. We can always dream. But this is wha
|
|
6
6
|
|
7
7
|
- [ ] Improve how modules are graded. Each module is awarded a score, depending on:
|
8
8
|
|
9
|
-
|
9
|
+
* Its complexity, based off of this [post by Jake Scruggs](http://jakescruggs.blogspot.pt/2008/08/whats-good-flog-score.html), creator of the MetricFu gem. For every 25 points of complexity (as calculated by Flog), the score increases by 1.
|
10
10
|
|
11
|
-
|
11
|
+
* Its duplication mass, based off of observations of a few Code Climate repos. For every 25 points of mass (as calculated by Flay), the score increases by 1.
|
12
12
|
|
13
13
|
Finally, this score is translated to a grade like [this](https://github.com/whitesmith/rubycritic/blob/43005e7b76dd0c648c7715133e42afdd6ea9a065/lib/rubycritic/core/rating.rb), based off of a [Code Climate blog post](http://blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-fat-activerecord-models/#value-objects).
|
14
14
|
|
@@ -21,36 +21,36 @@ These are more nice-to-haves than promises. We can always dream. But this is wha
|
|
21
21
|
- [ ] Make the gem configurable using a dotfile like .rubycritic.yml. #30
|
22
22
|
Here are some possible settings:
|
23
23
|
|
24
|
-
|
24
|
+
- [ ] Quiet mode. As of right now, any Ruby code that is unparsable will be reported three times (one time by Flog, another by Flay and another by Reek). Only Flog implements a quiet option, which means we have to implement that quiet option on Flay and on Reek before we can add it to RubyCritic. Or we could just do `$stderr = StringIO.new`... I wonder if that's really really smart or really really stupid.
|
25
25
|
|
26
|
-
|
26
|
+
- [ ] Verbose mode. #61
|
27
27
|
|
28
|
-
|
28
|
+
- [ ] Ignoring/excluding files. #11
|
29
29
|
|
30
|
-
|
30
|
+
- [ ] Allow configuring date range of Churn calculation. #37 Right now, they are limited to the last year. #39
|
31
31
|
|
32
32
|
- [ ] Highlight blocks of duplicated code instead of just the start of the block. This will probably require rewriting Flay with [parser](https://github.com/whitequark/parser) instead of ruby_parser.
|
33
33
|
|
34
34
|
- [ ] Integrate other gems, like:
|
35
35
|
|
36
|
-
|
36
|
+
- [x] [Simplecov](https://github.com/colszowka/simplecov) to provide code coverage. #319
|
37
37
|
|
38
|
-
|
38
|
+
- [ ] [Rubocop](https://github.com/bbatsov/rubocop/) to provide style issues
|
39
39
|
|
40
|
-
|
40
|
+
- [ ] [Brakeman](https://github.com/presidentbeef/brakeman) to provide security issues (Rails-only feature)
|
41
41
|
|
42
|
-
|
42
|
+
- [ ] [Rails Best Practices](https://github.com/railsbp/rails_best_practices) to provide Rails smells (Rails-only feature) #14
|
43
43
|
|
44
|
-
|
44
|
+
- [ ] [SandiMeter](https://github.com/makaroni4/sandi_meter) #15
|
45
45
|
|
46
46
|
- [ ] Improve UI.
|
47
47
|
|
48
|
-
|
48
|
+
- [ ] Make it beautiful.
|
49
49
|
|
50
|
-
|
50
|
+
- [ ] Figure out where the "suggestions to fix code smells" should be presented.
|
51
51
|
|
52
|
-
|
52
|
+
- [ ] Create some kind of toggle option between various types of issues. Just like we can toggle between "Smells" and "Coverage" in Code Climate:
|
53
53
|
|
54
|
-
|
54
|
+

|
55
55
|
|
56
|
-
|
56
|
+
Having an option to toggle between "Smells", "Security" (Brakeman) and "Style" (Rubocop) would be great. But that's already assuming we can integrate those gems into RubyCritic.
|
data/Rakefile
CHANGED
@@ -48,6 +48,9 @@ module RubyCritic
|
|
48
48
|
|
49
49
|
# The path to the cache file
|
50
50
|
def resultset_path
|
51
|
+
if (cp = Config.coverage_path)
|
52
|
+
SimpleCov.coverage_dir(cp)
|
53
|
+
end
|
51
54
|
File.join(SimpleCov.coverage_path, RESULTSET_FILENAME)
|
52
55
|
end
|
53
56
|
|
@@ -112,11 +115,7 @@ module RubyCritic
|
|
112
115
|
if Gem.loaded_specs['simplecov'].version >= Gem::Version.new('0.19')
|
113
116
|
::SimpleCov::Result.from_hash(resultset)
|
114
117
|
else
|
115
|
-
|
116
|
-
resultset.each do |command_name, data|
|
117
|
-
array << ::SimpleCov::Result.from_hash(command_name => data)
|
118
|
-
end
|
119
|
-
array
|
118
|
+
resultset.map { |command_name, data| ::SimpleCov::Result.from_hash(command_name => data) }
|
120
119
|
end
|
121
120
|
end
|
122
121
|
end
|
@@ -13,12 +13,12 @@ module Parser
|
|
13
13
|
count
|
14
14
|
end
|
15
15
|
|
16
|
-
def recursive_children
|
16
|
+
def recursive_children(&block)
|
17
17
|
children.each do |child|
|
18
18
|
next unless child.is_a?(Parser::AST::Node)
|
19
19
|
|
20
20
|
yield child
|
21
|
-
child.recursive_children
|
21
|
+
child.recursive_children(&block)
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
@@ -95,6 +95,10 @@ module RubyCritic
|
|
95
95
|
self.no_browser = true
|
96
96
|
end
|
97
97
|
|
98
|
+
opts.on('--coverage-path [PATH]', 'SimpleCov coverage will be saved (./coverage by default)') do |path|
|
99
|
+
@coverage_path = path
|
100
|
+
end
|
101
|
+
|
98
102
|
opts.on_tail('-v', '--version', "Show gem's version") do
|
99
103
|
self.mode = :version
|
100
104
|
end
|
@@ -129,7 +133,7 @@ module RubyCritic
|
|
129
133
|
|
130
134
|
attr_accessor :mode, :root, :formats, :formatters, :deduplicate_symlinks,
|
131
135
|
:suppress_ratings, :minimum_score, :churn_after, :no_browser,
|
132
|
-
:parser, :base_branch, :feature_branch, :threshold_score
|
136
|
+
:parser, :base_branch, :feature_branch, :threshold_score, :coverage_path
|
133
137
|
|
134
138
|
def paths
|
135
139
|
@argv unless @argv.empty?
|
@@ -22,6 +22,7 @@ module RubyCritic
|
|
22
22
|
{
|
23
23
|
mode: mode,
|
24
24
|
root: root,
|
25
|
+
coverage_path: coverage_path,
|
25
26
|
formats: formats,
|
26
27
|
deduplicate_symlinks: deduplicate_symlinks,
|
27
28
|
paths: paths,
|
@@ -59,6 +60,10 @@ module RubyCritic
|
|
59
60
|
options['path']
|
60
61
|
end
|
61
62
|
|
63
|
+
def coverage_path
|
64
|
+
options['coverage_path']
|
65
|
+
end
|
66
|
+
|
62
67
|
def threshold_score
|
63
68
|
options['threshold_score']
|
64
69
|
end
|
@@ -77,8 +82,9 @@ module RubyCritic
|
|
77
82
|
|
78
83
|
def formats
|
79
84
|
formats = Array(options['formats'])
|
85
|
+
formats_to_check = %w[html json console lint]
|
80
86
|
formats.select do |format|
|
81
|
-
|
87
|
+
formats_to_check.include?(format)
|
82
88
|
end.map(&:to_sym)
|
83
89
|
end
|
84
90
|
|
@@ -18,6 +18,10 @@ module RubyCritic
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def execute
|
21
|
+
if Config.send(:base_branch) == Config.send(:feature_branch)
|
22
|
+
raise('The branch you are on and are comparing with are the same.
|
23
|
+
Please switch to a different branch or choose a different branch to compare.')
|
24
|
+
end
|
21
25
|
compare_branches
|
22
26
|
status_reporter.score = Config.feature_branch_score
|
23
27
|
status_reporter
|
@@ -91,9 +95,9 @@ module RubyCritic
|
|
91
95
|
|
92
96
|
# create a txt file with the branch score details
|
93
97
|
def build_details
|
94
|
-
details = "Base branch (#{Config.base_branch}) score: #{Config.base_branch_score} \n"\
|
98
|
+
details = "Base branch (#{Config.base_branch}) score: #{Config.base_branch_score} \n" \
|
95
99
|
"Feature branch (#{Config.feature_branch}) score: #{Config.feature_branch_score} \n"
|
96
|
-
File.
|
100
|
+
File.write("#{Config.compare_root_directory}/build_details.txt", details)
|
97
101
|
end
|
98
102
|
|
99
103
|
# store the analysed moduled collection based on the branch
|
@@ -6,11 +6,11 @@ module RubyCritic
|
|
6
6
|
class Configuration
|
7
7
|
attr_reader :root
|
8
8
|
attr_accessor :source_control_system, :mode, :formats, :formatters, :deduplicate_symlinks,
|
9
|
-
:suppress_ratings, :open_with, :no_browser, :base_branch,
|
9
|
+
:suppress_ratings, :open_with, :no_browser, :base_branch, :coverage_path,
|
10
10
|
:feature_branch, :base_branch_score, :feature_branch_score,
|
11
11
|
:base_root_directory, :feature_root_directory,
|
12
12
|
:compare_root_directory, :threshold_score, :base_branch_collection,
|
13
|
-
:feature_branch_collection, :churn_after, :ruby_extensions
|
13
|
+
:feature_branch_collection, :churn_after, :ruby_extensions, :paths
|
14
14
|
|
15
15
|
def set(options)
|
16
16
|
self.mode = options[:mode] || :default
|
@@ -19,12 +19,18 @@ module RubyCritic
|
|
19
19
|
self.suppress_ratings = options[:suppress_ratings]
|
20
20
|
self.open_with = options[:open_with]
|
21
21
|
self.no_browser = options[:no_browser]
|
22
|
+
self.coverage_path = options[:coverage_path]
|
22
23
|
self.threshold_score = options[:threshold_score].to_i
|
23
|
-
|
24
|
+
setup_analysis_targets(options)
|
24
25
|
setup_version_control(options)
|
25
26
|
setup_formats(options)
|
26
27
|
end
|
27
28
|
|
29
|
+
def setup_analysis_targets(options)
|
30
|
+
self.paths = options[:paths] || ['.']
|
31
|
+
self.ruby_extensions = options[:ruby_extensions] || %w[.rb .rake .thor]
|
32
|
+
end
|
33
|
+
|
28
34
|
def setup_version_control(options)
|
29
35
|
self.base_branch = options[:base_branch]
|
30
36
|
self.feature_branch = options[:feature_branch]
|
@@ -46,7 +46,7 @@ module RubyCritic
|
|
46
46
|
|
47
47
|
def score
|
48
48
|
if @modules.any?
|
49
|
-
(MAX_SCORE - average_limited_cost * COST_MULTIPLIER).round(2)
|
49
|
+
(MAX_SCORE - (average_limited_cost * COST_MULTIPLIER)).round(2)
|
50
50
|
else
|
51
51
|
0.0
|
52
52
|
end
|
@@ -69,7 +69,7 @@ module RubyCritic
|
|
69
69
|
def average_cost
|
70
70
|
num_modules = @modules.size
|
71
71
|
if num_modules.positive?
|
72
|
-
|
72
|
+
sum { |mod| limited_cost_for(mod) } / num_modules.to_f
|
73
73
|
else
|
74
74
|
0.0
|
75
75
|
end
|
@@ -239,11 +239,16 @@ $("#codeTable")
|
|
239
239
|
sortList: [[0,1]]
|
240
240
|
});
|
241
241
|
|
242
|
-
$("#
|
242
|
+
$("#smellsTable")
|
243
243
|
.tablesorter({ // Sort the table
|
244
244
|
sortList: [[0,0]]
|
245
245
|
});
|
246
246
|
|
247
|
+
$("#coverageTable")
|
248
|
+
.tablesorter({ // Sort the table
|
249
|
+
sortList: [[0,1]]
|
250
|
+
});
|
251
|
+
|
247
252
|
$(".js-timeago").timeago();
|
248
253
|
|
249
254
|
$(function(){
|
@@ -277,5 +282,6 @@ $(document).ready(function(){
|
|
277
282
|
|
278
283
|
var initTableFilters = function() {
|
279
284
|
$("#codeTable").filterTable({ignoreColumns: [2], placeholder: 'Filter by Name'});
|
280
|
-
$("#
|
285
|
+
$("#smellsTable").filterTable({ignoreColumns: [2, 3, 4, 5], placeholder: 'Filter by Smell or Location', inputSelector: 'form-control'});
|
286
|
+
$("#coverageTable").filterTable({ignoreColumns: [0], placeholder: 'Filter by Smell or Location', inputSelector: 'form-control'});
|
281
287
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
<!--End Page Title -->
|
10
10
|
<div class="Content_Wrapper">
|
11
|
-
<table id="
|
11
|
+
<table id="coverageTable" class="table index-table sortable-table tablesorter">
|
12
12
|
<thead>
|
13
13
|
<tr>
|
14
14
|
<% unless Config.suppress_ratings %>
|
@@ -20,20 +20,23 @@
|
|
20
20
|
</thead>
|
21
21
|
<% @analysed_modules.each do |analysed_module| %>
|
22
22
|
<tr>
|
23
|
-
|
24
|
-
<% unless Config.suppress_ratings %>
|
25
|
-
<td>
|
26
|
-
<div class="rating <%= analysed_module.coverage_rating.to_s.downcase %>"><%= analysed_module.coverage_rating %></div>
|
27
|
-
</td>
|
28
|
-
<% end %>
|
23
|
+
<% unless Config.suppress_ratings %>
|
29
24
|
<td>
|
30
|
-
<
|
31
|
-
|
32
|
-
|
33
|
-
</li>
|
34
|
-
</ul>
|
25
|
+
<div class="rating <%= analysed_module.coverage_rating.to_s.downcase %>">
|
26
|
+
<%= analysed_module.coverage_rating %>
|
27
|
+
</div>
|
35
28
|
</td>
|
36
|
-
|
29
|
+
<% end %>
|
30
|
+
<td>
|
31
|
+
<ul class="nav nav-pills">
|
32
|
+
<li role="presentation" >
|
33
|
+
<a href="<%= file_path(analysed_module.pathname.sub_ext('.html')) %>">
|
34
|
+
<%= analysed_module.name %>
|
35
|
+
</a>
|
36
|
+
</li>
|
37
|
+
</ul>
|
38
|
+
</td>
|
39
|
+
<td><%= '%.2f' % analysed_module.coverage %>%</td>
|
37
40
|
</tr>
|
38
41
|
<% end %>
|
39
42
|
</table>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
</div>
|
9
9
|
<!--End Page Title -->
|
10
10
|
<div class="Content_Wrapper">
|
11
|
-
<table id="
|
11
|
+
<table id="smellsTable" class="table smells-index-table index-table sortable-table">
|
12
12
|
<thead>
|
13
13
|
<tr>
|
14
14
|
<th width="30%" class="table-header">Smell<span class="sort-type"></span></th>
|
@@ -24,7 +24,10 @@ module RubyCritic
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def code_index_path(root_directory, file_name)
|
27
|
-
|
27
|
+
root_directory_path = File.expand_path(root_directory)
|
28
|
+
index_path = "#{root_directory_path}/#{file_name}"
|
29
|
+
index_path = "#{root_directory_path}/overview.html" unless File.exist?(index_path)
|
30
|
+
file_path(index_path)
|
28
31
|
end
|
29
32
|
|
30
33
|
private
|
@@ -33,9 +33,7 @@ module RubyCritic
|
|
33
33
|
def create_directories_and_files
|
34
34
|
Array(generators).each do |generator|
|
35
35
|
FileUtils.mkdir_p(generator.file_directory)
|
36
|
-
File.
|
37
|
-
file.write(generator.render)
|
38
|
-
end
|
36
|
+
File.write(generator.file_pathname, generator.render)
|
39
37
|
end
|
40
38
|
end
|
41
39
|
|
@@ -11,9 +11,7 @@ module RubyCritic
|
|
11
11
|
|
12
12
|
def generate_report
|
13
13
|
FileUtils.mkdir_p(generator.file_directory)
|
14
|
-
File.
|
15
|
-
file.write(generator.render)
|
16
|
-
end
|
14
|
+
File.write(generator.file_pathname, generator.render)
|
17
15
|
end
|
18
16
|
|
19
17
|
private
|
@@ -11,9 +11,7 @@ module RubyCritic
|
|
11
11
|
|
12
12
|
def generate_report
|
13
13
|
FileUtils.mkdir_p(generator.file_directory)
|
14
|
-
File.
|
15
|
-
file.write(reports.join("\n"))
|
16
|
-
end
|
14
|
+
File.write(generator.file_pathname, reports.join("\n"))
|
17
15
|
end
|
18
16
|
|
19
17
|
def generator
|
@@ -21,9 +21,9 @@ module RubyCritic
|
|
21
21
|
if supported_system
|
22
22
|
supported_system.new
|
23
23
|
else
|
24
|
-
puts 'RubyCritic can provide more feedback if you use '\
|
25
|
-
|
26
|
-
|
24
|
+
puts 'RubyCritic can provide more feedback if you use ' \
|
25
|
+
"a #{connected_system_names} repository. " \
|
26
|
+
'Churn will not be calculated.'
|
27
27
|
Double.new
|
28
28
|
end
|
29
29
|
end
|
@@ -21,11 +21,11 @@ module RubyCritic
|
|
21
21
|
end
|
22
22
|
|
23
23
|
class Churn
|
24
|
-
def initialize(churn_after: nil)
|
25
|
-
@
|
24
|
+
def initialize(churn_after: nil, paths: ['.'])
|
25
|
+
@churn_after = churn_after
|
26
|
+
@paths = Array(paths)
|
26
27
|
@date = nil
|
27
28
|
@stats = {}
|
28
|
-
@churn_after = churn_after
|
29
29
|
|
30
30
|
call
|
31
31
|
end
|
@@ -41,16 +41,27 @@ module RubyCritic
|
|
41
41
|
private
|
42
42
|
|
43
43
|
def call
|
44
|
+
git_log_commands.each { |log_command| exec_git_command(log_command) }
|
45
|
+
end
|
46
|
+
|
47
|
+
def exec_git_command(command)
|
44
48
|
Git
|
45
|
-
.git(
|
49
|
+
.git(command)
|
46
50
|
.split("\n")
|
47
51
|
.reject(&:empty?)
|
48
52
|
.each { |line| process_line(line) }
|
49
53
|
end
|
50
54
|
|
51
|
-
def
|
52
|
-
|
53
|
-
|
55
|
+
def git_log_commands
|
56
|
+
@paths.map { |path| git_log_command(path) }
|
57
|
+
end
|
58
|
+
|
59
|
+
def git_log_command(path)
|
60
|
+
"log --all --date=iso --follow --format='format:date:%x09%ad' --name-status #{after_clause}#{path}"
|
61
|
+
end
|
62
|
+
|
63
|
+
def after_clause
|
64
|
+
@churn_after ? "--after='#{@churn_after}' " : ''
|
54
65
|
end
|
55
66
|
|
56
67
|
def process_line(line)
|
@@ -62,6 +73,7 @@ module RubyCritic
|
|
62
73
|
when /^[RC]/
|
63
74
|
process_rename(*rest)
|
64
75
|
else
|
76
|
+
rest = filename_for_subdirectory(rest[0])
|
65
77
|
process_file(*rest)
|
66
78
|
end
|
67
79
|
end
|
@@ -71,12 +83,21 @@ module RubyCritic
|
|
71
83
|
end
|
72
84
|
|
73
85
|
def process_rename(from, to)
|
74
|
-
|
86
|
+
renames.renamed(from, to)
|
75
87
|
process_file(to)
|
76
88
|
end
|
77
89
|
|
90
|
+
def filename_for_subdirectory(filename)
|
91
|
+
git_path = Git.git('rev-parse --show-toplevel')
|
92
|
+
cd_path = Dir.pwd
|
93
|
+
if cd_path.length > git_path.length
|
94
|
+
filename = filename.sub(/^#{Regexp.escape("#{File.basename(cd_path)}/")}/, '')
|
95
|
+
end
|
96
|
+
[filename]
|
97
|
+
end
|
98
|
+
|
78
99
|
def process_file(filename)
|
79
|
-
record_commit(
|
100
|
+
record_commit(renames.current(filename), @date)
|
80
101
|
end
|
81
102
|
|
82
103
|
def record_commit(filename, date)
|
@@ -84,6 +105,10 @@ module RubyCritic
|
|
84
105
|
stats.count += 1
|
85
106
|
end
|
86
107
|
|
108
|
+
def renames
|
109
|
+
@renames ||= Renames.new
|
110
|
+
end
|
111
|
+
|
87
112
|
def stats(path)
|
88
113
|
@stats.fetch(path, Stats.new(0))
|
89
114
|
end
|
@@ -30,7 +30,7 @@ module RubyCritic
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def churn
|
33
|
-
@churn ||= Churn.new(churn_after: Config.churn_after)
|
33
|
+
@churn ||= Churn.new(churn_after: Config.churn_after, paths: Config.paths)
|
34
34
|
end
|
35
35
|
|
36
36
|
def revisions_count(path)
|
@@ -71,18 +71,18 @@ module RubyCritic
|
|
71
71
|
|
72
72
|
def self.modified_files
|
73
73
|
modified_files = `git diff --name-status #{Config.base_branch} #{Config.feature_branch}`
|
74
|
-
modified_files.split("\n").
|
74
|
+
modified_files.split("\n").filter_map do |line|
|
75
75
|
next if line.start_with?('D')
|
76
76
|
|
77
77
|
file_name = line.split("\t")[1]
|
78
78
|
file_name
|
79
|
-
end
|
79
|
+
end
|
80
80
|
end
|
81
81
|
|
82
82
|
def self.current_branch
|
83
83
|
branch_list = `git branch`
|
84
84
|
branch = branch_list.match(/\*.*$/)[0].gsub('* ', '')
|
85
|
-
branch = branch.gsub(/\(HEAD detached at (.*)\)$/, '\1') if
|
85
|
+
branch = branch.gsub(/\(HEAD detached at (.*)\)$/, '\1') if /\(HEAD detached at (.*)\)$/.match?(branch)
|
86
86
|
branch
|
87
87
|
end
|
88
88
|
|
@@ -88,7 +88,7 @@ module RubyCritic
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def self.compute_cache_lines(lines)
|
91
|
-
perforce_lines = Hash[*lines.map { |line| line.split[1
|
91
|
+
perforce_lines = Hash[*lines.map { |line| line.split[1..] }.flatten]
|
92
92
|
PerforceStats.new(
|
93
93
|
Perforce.normalized_file_path(perforce_lines['clientFile']),
|
94
94
|
perforce_lines['headRev'],
|
data/lib/rubycritic/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubycritic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guilherme Simoes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: flay
|
@@ -16,70 +16,70 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '2.
|
19
|
+
version: '2.13'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '2.
|
26
|
+
version: '2.13'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: flog
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4.
|
33
|
+
version: '4.7'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '4.
|
40
|
+
version: '4.7'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: launchy
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.5.2
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.5.2
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: parser
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 2.
|
61
|
+
version: 3.2.2.4
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 2.
|
68
|
+
version: 3.2.2.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rainbow
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.1.1
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.1.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: reek
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,7 +89,7 @@ dependencies:
|
|
89
89
|
version: '6.0'
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: '
|
92
|
+
version: '6.2'
|
93
93
|
type: :runtime
|
94
94
|
prerelease: false
|
95
95
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -99,104 +99,95 @@ dependencies:
|
|
99
99
|
version: '6.0'
|
100
100
|
- - "<"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '6.2'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rexml
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :runtime
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: ruby_parser
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
106
120
|
requirements:
|
107
121
|
- - "~>"
|
108
122
|
- !ruby/object:Gem::Version
|
109
|
-
version: '3.
|
123
|
+
version: '3.21'
|
110
124
|
type: :runtime
|
111
125
|
prerelease: false
|
112
126
|
version_requirements: !ruby/object:Gem::Requirement
|
113
127
|
requirements:
|
114
128
|
- - "~>"
|
115
129
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
130
|
+
version: '3.21'
|
117
131
|
- !ruby/object:Gem::Dependency
|
118
132
|
name: simplecov
|
119
133
|
requirement: !ruby/object:Gem::Requirement
|
120
134
|
requirements:
|
121
135
|
- - ">="
|
122
136
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.
|
137
|
+
version: 0.22.0
|
124
138
|
type: :runtime
|
125
139
|
prerelease: false
|
126
140
|
version_requirements: !ruby/object:Gem::Requirement
|
127
141
|
requirements:
|
128
142
|
- - ">="
|
129
143
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.
|
144
|
+
version: 0.22.0
|
131
145
|
- !ruby/object:Gem::Dependency
|
132
146
|
name: tty-which
|
133
147
|
requirement: !ruby/object:Gem::Requirement
|
134
148
|
requirements:
|
135
149
|
- - "~>"
|
136
150
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.
|
151
|
+
version: 0.5.0
|
138
152
|
type: :runtime
|
139
153
|
prerelease: false
|
140
154
|
version_requirements: !ruby/object:Gem::Requirement
|
141
155
|
requirements:
|
142
156
|
- - "~>"
|
143
157
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.
|
158
|
+
version: 0.5.0
|
145
159
|
- !ruby/object:Gem::Dependency
|
146
160
|
name: virtus
|
147
161
|
requirement: !ruby/object:Gem::Requirement
|
148
162
|
requirements:
|
149
163
|
- - "~>"
|
150
164
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
165
|
+
version: '2.0'
|
152
166
|
type: :runtime
|
153
167
|
prerelease: false
|
154
168
|
version_requirements: !ruby/object:Gem::Requirement
|
155
169
|
requirements:
|
156
170
|
- - "~>"
|
157
171
|
- !ruby/object:Gem::Version
|
158
|
-
version: '
|
159
|
-
- !ruby/object:Gem::Dependency
|
160
|
-
name: appraisal
|
161
|
-
requirement: !ruby/object:Gem::Requirement
|
162
|
-
requirements:
|
163
|
-
- - ">="
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
version: '0'
|
166
|
-
type: :development
|
167
|
-
prerelease: false
|
168
|
-
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
requirements:
|
170
|
-
- - ">="
|
171
|
-
- !ruby/object:Gem::Version
|
172
|
-
version: '0'
|
172
|
+
version: '2.0'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
174
|
name: aruba
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - "~>"
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
180
|
-
- - ">="
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: 0.12.0
|
179
|
+
version: 2.2.0
|
183
180
|
type: :development
|
184
181
|
prerelease: false
|
185
182
|
version_requirements: !ruby/object:Gem::Requirement
|
186
183
|
requirements:
|
187
184
|
- - "~>"
|
188
185
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: 0.12.0
|
186
|
+
version: 2.2.0
|
193
187
|
- !ruby/object:Gem::Dependency
|
194
188
|
name: bundler
|
195
189
|
requirement: !ruby/object:Gem::Requirement
|
196
190
|
requirements:
|
197
|
-
- - "~>"
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '2.0'
|
200
191
|
- - ">="
|
201
192
|
- !ruby/object:Gem::Version
|
202
193
|
version: 2.0.0
|
@@ -204,9 +195,6 @@ dependencies:
|
|
204
195
|
prerelease: false
|
205
196
|
version_requirements: !ruby/object:Gem::Requirement
|
206
197
|
requirements:
|
207
|
-
- - "~>"
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
version: '2.0'
|
210
198
|
- - ">="
|
211
199
|
- !ruby/object:Gem::Version
|
212
200
|
version: 2.0.0
|
@@ -236,20 +224,20 @@ dependencies:
|
|
236
224
|
requirements:
|
237
225
|
- - "~>"
|
238
226
|
- !ruby/object:Gem::Version
|
239
|
-
version:
|
240
|
-
- - "
|
227
|
+
version: 9.2.0
|
228
|
+
- - "!="
|
241
229
|
- !ruby/object:Gem::Version
|
242
|
-
version:
|
230
|
+
version: 9.0.0
|
243
231
|
type: :development
|
244
232
|
prerelease: false
|
245
233
|
version_requirements: !ruby/object:Gem::Requirement
|
246
234
|
requirements:
|
247
235
|
- - "~>"
|
248
236
|
- !ruby/object:Gem::Version
|
249
|
-
version:
|
250
|
-
- - "
|
237
|
+
version: 9.2.0
|
238
|
+
- - "!="
|
251
239
|
- !ruby/object:Gem::Version
|
252
|
-
version:
|
240
|
+
version: 9.0.0
|
253
241
|
- !ruby/object:Gem::Dependency
|
254
242
|
name: diff-lcs
|
255
243
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,38 +258,41 @@ dependencies:
|
|
270
258
|
requirements:
|
271
259
|
- - "~>"
|
272
260
|
- !ruby/object:Gem::Version
|
273
|
-
version:
|
274
|
-
- - "<"
|
275
|
-
- !ruby/object:Gem::Version
|
276
|
-
version: 2.0.0
|
261
|
+
version: 2.5.0
|
277
262
|
type: :development
|
278
263
|
prerelease: false
|
279
264
|
version_requirements: !ruby/object:Gem::Requirement
|
280
265
|
requirements:
|
281
266
|
- - "~>"
|
282
267
|
- !ruby/object:Gem::Version
|
283
|
-
version:
|
284
|
-
- - "<"
|
285
|
-
- !ruby/object:Gem::Version
|
286
|
-
version: 2.0.0
|
268
|
+
version: 2.5.0
|
287
269
|
- !ruby/object:Gem::Dependency
|
288
270
|
name: mdl
|
289
271
|
requirement: !ruby/object:Gem::Requirement
|
290
272
|
requirements:
|
291
273
|
- - "~>"
|
292
274
|
- !ruby/object:Gem::Version
|
293
|
-
version: 0.
|
275
|
+
version: 0.13.0
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 0.12.0
|
294
279
|
type: :development
|
295
280
|
prerelease: false
|
296
281
|
version_requirements: !ruby/object:Gem::Requirement
|
297
282
|
requirements:
|
298
283
|
- - "~>"
|
299
284
|
- !ruby/object:Gem::Version
|
300
|
-
version: 0.
|
285
|
+
version: 0.13.0
|
286
|
+
- - ">="
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
version: 0.12.0
|
301
289
|
- !ruby/object:Gem::Dependency
|
302
290
|
name: minitest
|
303
291
|
requirement: !ruby/object:Gem::Requirement
|
304
292
|
requirements:
|
293
|
+
- - "~>"
|
294
|
+
- !ruby/object:Gem::Version
|
295
|
+
version: 5.22.2
|
305
296
|
- - ">="
|
306
297
|
- !ruby/object:Gem::Version
|
307
298
|
version: 5.3.0
|
@@ -309,6 +300,9 @@ dependencies:
|
|
309
300
|
prerelease: false
|
310
301
|
version_requirements: !ruby/object:Gem::Requirement
|
311
302
|
requirements:
|
303
|
+
- - "~>"
|
304
|
+
- !ruby/object:Gem::Version
|
305
|
+
version: 5.22.2
|
312
306
|
- - ">="
|
313
307
|
- !ruby/object:Gem::Version
|
314
308
|
version: 5.3.0
|
@@ -338,27 +332,21 @@ dependencies:
|
|
338
332
|
requirements:
|
339
333
|
- - "~>"
|
340
334
|
- !ruby/object:Gem::Version
|
341
|
-
version:
|
342
|
-
- - ">="
|
343
|
-
- !ruby/object:Gem::Version
|
344
|
-
version: 1.1.0
|
335
|
+
version: 2.2.0
|
345
336
|
type: :development
|
346
337
|
prerelease: false
|
347
338
|
version_requirements: !ruby/object:Gem::Requirement
|
348
339
|
requirements:
|
349
340
|
- - "~>"
|
350
341
|
- !ruby/object:Gem::Version
|
351
|
-
version:
|
352
|
-
- - ">="
|
353
|
-
- !ruby/object:Gem::Version
|
354
|
-
version: 1.1.0
|
342
|
+
version: 2.2.0
|
355
343
|
- !ruby/object:Gem::Dependency
|
356
344
|
name: rake
|
357
345
|
requirement: !ruby/object:Gem::Requirement
|
358
346
|
requirements:
|
359
347
|
- - "~>"
|
360
348
|
- !ruby/object:Gem::Version
|
361
|
-
version:
|
349
|
+
version: 13.2.0
|
362
350
|
- - ">="
|
363
351
|
- !ruby/object:Gem::Version
|
364
352
|
version: 11.0.0
|
@@ -368,7 +356,7 @@ dependencies:
|
|
368
356
|
requirements:
|
369
357
|
- - "~>"
|
370
358
|
- !ruby/object:Gem::Version
|
371
|
-
version:
|
359
|
+
version: 13.2.0
|
372
360
|
- - ">="
|
373
361
|
- !ruby/object:Gem::Version
|
374
362
|
version: 11.0.0
|
@@ -392,14 +380,62 @@ dependencies:
|
|
392
380
|
requirements:
|
393
381
|
- - "~>"
|
394
382
|
- !ruby/object:Gem::Version
|
395
|
-
version:
|
383
|
+
version: 1.59.0
|
384
|
+
- - ">="
|
385
|
+
- !ruby/object:Gem::Version
|
386
|
+
version: 1.54.0
|
396
387
|
type: :development
|
397
388
|
prerelease: false
|
398
389
|
version_requirements: !ruby/object:Gem::Requirement
|
399
390
|
requirements:
|
400
391
|
- - "~>"
|
401
392
|
- !ruby/object:Gem::Version
|
402
|
-
version:
|
393
|
+
version: 1.59.0
|
394
|
+
- - ">="
|
395
|
+
- !ruby/object:Gem::Version
|
396
|
+
version: 1.54.0
|
397
|
+
- !ruby/object:Gem::Dependency
|
398
|
+
name: rubocop-minitest
|
399
|
+
requirement: !ruby/object:Gem::Requirement
|
400
|
+
requirements:
|
401
|
+
- - ">="
|
402
|
+
- !ruby/object:Gem::Version
|
403
|
+
version: '0'
|
404
|
+
type: :development
|
405
|
+
prerelease: false
|
406
|
+
version_requirements: !ruby/object:Gem::Requirement
|
407
|
+
requirements:
|
408
|
+
- - ">="
|
409
|
+
- !ruby/object:Gem::Version
|
410
|
+
version: '0'
|
411
|
+
- !ruby/object:Gem::Dependency
|
412
|
+
name: rubocop-performance
|
413
|
+
requirement: !ruby/object:Gem::Requirement
|
414
|
+
requirements:
|
415
|
+
- - ">="
|
416
|
+
- !ruby/object:Gem::Version
|
417
|
+
version: '0'
|
418
|
+
type: :development
|
419
|
+
prerelease: false
|
420
|
+
version_requirements: !ruby/object:Gem::Requirement
|
421
|
+
requirements:
|
422
|
+
- - ">="
|
423
|
+
- !ruby/object:Gem::Version
|
424
|
+
version: '0'
|
425
|
+
- !ruby/object:Gem::Dependency
|
426
|
+
name: rubocop-rake
|
427
|
+
requirement: !ruby/object:Gem::Requirement
|
428
|
+
requirements:
|
429
|
+
- - ">="
|
430
|
+
- !ruby/object:Gem::Version
|
431
|
+
version: '0'
|
432
|
+
type: :development
|
433
|
+
prerelease: false
|
434
|
+
version_requirements: !ruby/object:Gem::Requirement
|
435
|
+
requirements:
|
436
|
+
- - ">="
|
437
|
+
- !ruby/object:Gem::Version
|
438
|
+
version: '0'
|
403
439
|
description: RubyCritic is a tool that wraps around various static analysis gems to
|
404
440
|
provide a quality report of your Ruby code.
|
405
441
|
email:
|
@@ -526,7 +562,8 @@ files:
|
|
526
562
|
homepage: https://github.com/whitesmith/rubycritic
|
527
563
|
licenses:
|
528
564
|
- MIT
|
529
|
-
metadata:
|
565
|
+
metadata:
|
566
|
+
rubygems_mfa_required: 'true'
|
530
567
|
post_install_message:
|
531
568
|
rdoc_options: []
|
532
569
|
require_paths:
|
@@ -542,7 +579,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
542
579
|
- !ruby/object:Gem::Version
|
543
580
|
version: '0'
|
544
581
|
requirements: []
|
545
|
-
rubygems_version: 3.
|
582
|
+
rubygems_version: 3.4.19
|
546
583
|
signing_key:
|
547
584
|
specification_version: 4
|
548
585
|
summary: RubyCritic is a Ruby code quality reporter
|