rubycritic 4.7.0 → 4.8.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +58 -6
- data/CONTRIBUTING.md +3 -3
- data/README.md +28 -25
- data/ROADMAP.md +16 -16
- data/lib/rubycritic/analysers/helpers/ast_node.rb +2 -2
- data/lib/rubycritic/cli/options/argv.rb +4 -3
- data/lib/rubycritic/cli/options/file.rb +3 -2
- data/lib/rubycritic/commands/compare.rb +2 -2
- data/lib/rubycritic/commands/status_reporter.rb +1 -0
- data/lib/rubycritic/commands/version.rb +1 -0
- data/lib/rubycritic/configuration.rb +7 -1
- 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 +2 -2
- 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 +2 -2
- 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/generators/text/lint.rb +1 -1
- data/lib/rubycritic/generators/text/list.rb +1 -1
- data/lib/rubycritic/source_control_systems/base.rb +3 -3
- data/lib/rubycritic/source_control_systems/git/churn.rb +24 -9
- data/lib/rubycritic/source_control_systems/git.rb +6 -4
- data/lib/rubycritic/source_control_systems/perforce.rb +1 -1
- data/lib/rubycritic/source_locator.rb +6 -1
- data/lib/rubycritic/version.rb +1 -1
- metadata +80 -81
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3947b3bda3c1df0be0e1dd53c54c12444dbb783cf1af0943f1eba708a17a810f
|
4
|
+
data.tar.gz: 93e1f9a59ffa8418c73fe731984d784af87327d8c371497a89af243eb47c5c87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f33ccecd5a6333af4542fc5f2e5b946d83953b1c8833493523f9f3c6a05fcac6c7547eafda74b5e9d8d3cd6926a86c3350add816076520c35ae781b83160e70e
|
7
|
+
data.tar.gz: '0589b2472473c73982aa9742738c25ddfb9de3692a43ba200ed0a973a59e87ebead86f07d771562f4d8d8ee729efd0c56421dee62879fa4904830f5c335b492e'
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,36 @@
|
|
1
|
-
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.
|
1
|
+
# main [(unreleased)](https://github.com/whitesmith/rubycritic/compare/v4.8.1...main)
|
2
|
+
|
3
|
+
# v4.8.1 / 2023-05-17 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.8.0...v4.8.1)
|
4
|
+
|
5
|
+
* [CHANGE] Update runtime dependencies to current versions of analysis gems (by [@faisal][])
|
6
|
+
* [CHANGE] Update the mdl development_dependency from 0.5 to 0.12 (by [@faisal][])
|
7
|
+
* [CHANGE] Update rubocop to use current version (~1.51.0) and relevant plugins (by [@faisal][]])
|
8
|
+
* [CHANGE] Update testing gems to current versions (by [@faisal][])
|
9
|
+
* [BUGFIX] Fix sort and filters on the coverage page (by [@kcamcam][])
|
10
|
+
* [CHANGE] Scope churn calculation to provided paths (by [@Fito][])
|
11
|
+
|
12
|
+
# v4.8.0 / 2023-05-12 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.7.0...v4.8.0)
|
13
|
+
|
14
|
+
* [CHORE] Fix syntax of contributor references in this file
|
15
|
+
* [CHANGE] Updated branch references from master to main (by [@96RadhikaJadhav][] and [@faisal][])
|
16
|
+
* [CHORE] Test gem with Ruby 3.2 (by [@etagwerker][])
|
17
|
+
* [CHORE] Test gem with Ruby 3.1 (by [@etagwerker][])
|
18
|
+
* [CHANGE] Drop support for JRuby 9.3.x (by [@faisal][])
|
19
|
+
* [CHANGE] Drop support for Ruby 2.6.x (by [@faisal][])
|
20
|
+
* [CHANGE] Drop support for Ruby 2.5.x (by [@cleicar][])
|
21
|
+
* [CHANGE] Drop support for Ruby 2.4.x (by [@rishijain][])
|
22
|
+
* [FEATURE] Add ruby_extensions configuration option (by [@stufro][])
|
23
|
+
* [CHANGE] Include files which have a ruby shebang (by [@stufro][])
|
24
|
+
* [CHANGE] Fix some typos (by [@ydah][])
|
25
|
+
* [CHANGE] Remove wrong Rubocop reference in contributing file (by [@itsmeurbi][])
|
26
|
+
* [BUGFIX] Restore missing smell status label (by [@itsmeurbi][])
|
27
|
+
* [BUGFIX] Fix changelog @user links and update README (by [@kcamcam][])
|
28
|
+
* [BUGFIX] Fix CI rubocop using ruby-head (by [@juanvqz][])
|
29
|
+
* [BUGFIX] Fix CI Update FakeFs to use ruby-head (by [@juanvqz][])
|
30
|
+
* [BUGFIX] Fix CI, test didn't include the ruby_extensions (by [@aisayo][] and [@juanvqz][])
|
31
|
+
* [FEATURE] Support a branch in 'detached HEAD' state (by [@h-r-k-matsumoto][])
|
32
|
+
* [BUGFIX] Fix CI, tests did not work with JRuby (by [@etagwerker][] and [@h-r-k-matsumoto][])
|
33
|
+
* [CHANGE] Add continuous integration status badge to README (by [@kcamcam][])
|
2
34
|
|
3
35
|
# v4.7.0 / 2022-05-06 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.6.1...v4.7.0)
|
4
36
|
|
@@ -20,8 +52,7 @@
|
|
20
52
|
* [CHANGE] Make Github Linguist ignore vendored files (by [@sl4vr][])
|
21
53
|
* [BUGFIX] Fix directory structure of reports when comparing branches (by [@denny][])
|
22
54
|
* [BUGFIX] Restrict simplecov to versions before data format changed (by [@denny][])
|
23
|
-
|
24
|
-
* [BUGFIX] Handle missing comparison file in html template (by @lauratpa)
|
55
|
+
* [BUGFIX] Handle missing comparison file in html template (by [@lauratpa][])
|
25
56
|
|
26
57
|
# v4.5.2 / 2020-08-20 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.5.1...v4.5.2)
|
27
58
|
|
@@ -30,7 +61,6 @@
|
|
30
61
|
# v4.5.1 / 2020-06-29 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.5.0...v4.5.1)
|
31
62
|
|
32
63
|
* [BUGFIX] Handle git --name-status Copied (C) operation (by [@rizalmuthi][])
|
33
|
-
|
34
64
|
* [FEATURE] Add --churn-after (only supports git) to limit churn analysis to recent history (by [@jackcasey][])
|
35
65
|
|
36
66
|
# v4.5.0 / 2020-05-14 [(commits)](https://github.com/whitesmith/rubycritic/compare/v4.4.1...v4.5.0)
|
@@ -99,8 +129,8 @@
|
|
99
129
|
|
100
130
|
# 4.0.0 / 2019-02-27 [(commits)](https://github.com/whitesmith/rubycritic/compare/v3.5.1...v4.0.0)
|
101
131
|
|
102
|
-
* [FEATURE] Allow generating reports in multiple formats in one run (by [@katafrakt])
|
103
|
-
* [FEATURE] Allow to accept a config file (by [@mfbmina])
|
132
|
+
* [FEATURE] Allow generating reports in multiple formats in one run (by [@katafrakt][])
|
133
|
+
* [FEATURE] Allow to accept a config file (by [@mfbmina][])
|
104
134
|
* [CHANGE] Update `reek` to 5.3 (by [@taitran19][] and [@onumis][])
|
105
135
|
* [CHANGE] Update `parser` to 2.6.0 (by [@onumis][])
|
106
136
|
* [CHANGE] Update `tty-which` to 0.4.0 (by [@onumis][])
|
@@ -377,3 +407,25 @@
|
|
377
407
|
[@sl4vr]: https://github.com/sl4vr
|
378
408
|
[@denny]: https://github.com/denny
|
379
409
|
[@RyanSnodgrass]: https://github.com/RyanSnodgrass
|
410
|
+
[@ydah]: https://github.com/ydah
|
411
|
+
[@stufro]: https://github.com/stufro
|
412
|
+
[@rishijain]: https://github.com/rishijain
|
413
|
+
[@cleicar]: https://github.com/cleicar
|
414
|
+
[@anicholson]: https://github.com/anicholson
|
415
|
+
[@borisrorsvort]: https://github.com/borisrorsvort
|
416
|
+
[@lauratpa]: https://github.com/lauratpa
|
417
|
+
[@MZiserman]: https://github.com/MZiserman
|
418
|
+
[@rizalmuthi]: https://github.com/rizalmuthi
|
419
|
+
[@jsantos]: https://github.com/jsantos
|
420
|
+
[@teohm]: https://github.com/teohm
|
421
|
+
[@itsmeurbi]: https://github.com/itsmeurbi
|
422
|
+
[@kcamcam]: https://github.com/kcamcam
|
423
|
+
[@aisayo]: https://github.com/aisayo
|
424
|
+
[@h-r-k-matsumoto]: https://github.com/h-r-k-matsumoto
|
425
|
+
[@juanvqz]: https://github.com/juanvqz
|
426
|
+
[@eitoball]: https://github.com/eitoball
|
427
|
+
[@marcgrimme]: https://github.com/marcgrimme
|
428
|
+
[@katafrakt]: https://github.com/katafrakt
|
429
|
+
[@faisal]: https://github.com/faisal
|
430
|
+
[@96RadhikaJadhav]: https://github.com/96RadhikaJadhav
|
431
|
+
[@Fito]: https://github.com/Fito
|
data/CONTRIBUTING.md
CHANGED
@@ -32,7 +32,7 @@ Each commit should do one thing and one thing only. For example, all whitespace
|
|
32
32
|
|
33
33
|
9. Push the branch to GitHub (`git push origin my-new-feature`).
|
34
34
|
|
35
|
-
10. [Create a Pull Request] and send it to be merged with the
|
35
|
+
10. [Create a Pull Request] and send it to be merged with the main branch.
|
36
36
|
|
37
37
|
11. After your code is reviewed, [hide the sausage making]. We follow the "one commit per pull request" [principle](http://ndlib.github.io/practices/one-commit-per-pull-request/) since this allows for a clean git history, easy handling of features and convenient rollbacks when things go wrong. Or in one sentence: You can have as many commits as you want in your pull request, but after the final review and before the merge you need to squash all of those in one single commit.
|
38
38
|
For a more in-depth look at interactive rebasing, be sure to check [how to rewrite history] as well.
|
@@ -85,9 +85,9 @@ Here are a few examples:
|
|
85
85
|
```
|
86
86
|
|
87
87
|
* Mark it up in [Markdown syntax](http://daringfireball.net/projects/markdown/syntax).
|
88
|
-
* Add your entry in the `
|
88
|
+
* Add your entry in the `main (unreleased)` section.
|
89
89
|
* The entry line should start with `* ` (an asterisk and a space).
|
90
90
|
* Start with the change type BUGFIX / CHANGE / FEATURE.
|
91
91
|
* Describe the brief of the change.
|
92
92
|
* At the end of the entry, add an implicit link to your GitHub user page as `([@username][])`.
|
93
|
-
* If this is your first contribution to
|
93
|
+
* If this is your first contribution to RubyCritic project, add a link definition for the implicit link to the bottom of the changelog as `[@username]: https://github.com/username`.
|
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
# RubyCritic
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/rubycritic.svg)](http://badge.fury.io/rb/rubycritic)
|
4
|
+
[![Continuous Integration](https://github.com/whitesmith/rubycritic/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/whitesmith/rubycritic/actions/workflows/main.yml)
|
4
5
|
[![Build Status](https://travis-ci.org/whitesmith/rubycritic.svg?branch=master)](https://travis-ci.org/whitesmith/rubycritic)
|
5
6
|
[![Code Climate](https://codeclimate.com/github/whitesmith/rubycritic/badges/gpa.svg)](https://codeclimate.com/github/whitesmith/rubycritic)
|
6
7
|
|
@@ -13,9 +14,10 @@ RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [F
|
|
13
14
|
- [Overview](#overview)
|
14
15
|
- [Getting Started](#getting-started)
|
15
16
|
- [Usage](#usage)
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
+ [Analyzer Configuration](#analyzer-configuration)
|
18
|
+
+ [Alternative Usage Methods](#alternative-usage-methods)
|
19
|
+
+ [Rake Task](#rake-task)
|
20
|
+
- [Formatters](#formatters)
|
19
21
|
- [Compatibility](#compatibility)
|
20
22
|
- [Improving RubyCritic](#improving-rubyCritic)
|
21
23
|
- [Contributors](#contributors)
|
@@ -26,15 +28,12 @@ RubyCritic is a gem that wraps around static analysis gems such as [Reek][1], [F
|
|
26
28
|
This gem provides features such as:
|
27
29
|
|
28
30
|
1. An overview of your project:
|
29
|
-
|
30
31
|
![RubyCritic overview screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/overview.png)
|
31
32
|
|
32
33
|
2. An index of the project files with their respective number of smells:
|
33
|
-
|
34
34
|
![RubyCritic code index screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/code.png)
|
35
35
|
|
36
36
|
3. An index of the smells detected:
|
37
|
-
|
38
37
|
![RubyCritic smells index screenshot](https://github.com/whitesmith/rubycritic/raw/main/images/smells.png)
|
39
38
|
|
40
39
|
4. When analysing code like the following:
|
@@ -61,10 +60,10 @@ This gem provides features such as:
|
|
61
60
|
are currently supported) to compare your currently uncommitted
|
62
61
|
changes with your last commit.
|
63
62
|
|
64
|
-
|
65
|
-
|
63
|
+
**Warning**: If your code is not as you expect it to be after running
|
64
|
+
RubyCritic, please check your source control system stash.
|
66
65
|
|
67
|
-
Checkout the `/docs` if you want to read more about our [core metrics](https://github.com/whitesmith/rubycritic/blob/
|
66
|
+
Checkout the `/docs` if you want to read more about our [core metrics](https://github.com/whitesmith/rubycritic/blob/main/docs/core-metrics.md).
|
68
67
|
|
69
68
|
## Getting Started
|
70
69
|
|
@@ -96,7 +95,8 @@ current directory:
|
|
96
95
|
$ rubycritic
|
97
96
|
```
|
98
97
|
|
99
|
-
Alternatively you can pass `rubycritic` a list of files and directories
|
98
|
+
Alternatively you can pass `rubycritic` a list of files and directories.
|
99
|
+
The analysis will be scoped to the provided files and directories:
|
100
100
|
|
101
101
|
```bash
|
102
102
|
$ rubycritic app lib/foo.rb
|
@@ -128,7 +128,7 @@ $ rubycritic --help
|
|
128
128
|
- `console`
|
129
129
|
- `lint`
|
130
130
|
2. See [custom formatters docs](/docs/formatters.md)
|
131
|
-
3. Faster, analyses diffs w.r.t base_branch (default:
|
131
|
+
3. Faster, analyses diffs w.r.t base_branch (default: main), see `-b`
|
132
132
|
4. Works only with `-b`, default: 0
|
133
133
|
|
134
134
|
You also can use a config file. Just create a `.rubycritic.yml` on your project root path.
|
@@ -138,8 +138,8 @@ Here are one example:
|
|
138
138
|
```yml
|
139
139
|
mode_ci:
|
140
140
|
enabled: true # default is false
|
141
|
-
branch: 'production' # default is
|
142
|
-
branch: 'production' # default is
|
141
|
+
branch: 'production' # default is main
|
142
|
+
branch: 'production' # default is main
|
143
143
|
path: '/tmp/mycustompath' # Set path where report will be saved (tmp/rubycritic by default)
|
144
144
|
threshold_score: 10 # default is 0
|
145
145
|
deduplicate_symlinks: true # default is false
|
@@ -148,7 +148,7 @@ no_browser: true # default is false
|
|
148
148
|
formats: # Available values are: html, json, console, lint. Default value is html.
|
149
149
|
- console
|
150
150
|
minimum_score: 95 # default is 0
|
151
|
-
paths: # Files to analyse.
|
151
|
+
paths: # Files to analyse. Churn calculation is scoped to these files when using Git SCM.
|
152
152
|
- 'app/controllers/'
|
153
153
|
- 'app/models/'
|
154
154
|
```
|
@@ -159,10 +159,10 @@ paths: # Files to analyse.
|
|
159
159
|
This means that if you have an existing `Reek` configuration file, you can just put this into your
|
160
160
|
project root and `RubyCritic` will respect this configuration.
|
161
161
|
* [`flay`](https://github.com/seattlerb/flay): We use `flay`'s default configuration.
|
162
|
-
* [`flog`](https://github.com/seattlerb/flog): We use `flog`'s default configuration with a couple of [smaller tweaks](https://github.com/whitesmith/rubycritic/blob/
|
163
|
-
|
164
|
-
|
165
|
-
|
162
|
+
* [`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):
|
163
|
+
* `all`: Forces `flog` to report scores on all classes and methods. Without this option `flog` will only give results up to a certain threshold.
|
164
|
+
* `continue`: Makes it so that `flog` does not abort when a ruby file cannot be parsed.
|
165
|
+
* `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`.
|
166
166
|
|
167
167
|
### Alternative Usage Methods
|
168
168
|
|
@@ -235,11 +235,14 @@ See [formatters](docs/formatters.md)
|
|
235
235
|
|
236
236
|
RubyCritic is supporting Ruby versions:
|
237
237
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
238
|
+
| Ruby version | Latest RubyCritic version |
|
239
|
+
| - | - |
|
240
|
+
| 2.4 | [v4.7.0](https://github.com/whitesmith/rubycritic/tree/v4.7.0) |
|
241
|
+
| 2.5 | [v4.7.0](https://github.com/whitesmith/rubycritic/tree/v4.7.0) |
|
242
|
+
| 2.6 | [v4.7.0](https://github.com/whitesmith/rubycritic/tree/v4.7.0) |
|
243
|
+
| 2.7 | latest |
|
244
|
+
| 3.0 | latest |
|
245
|
+
| 3.1 | latest |
|
243
246
|
|
244
247
|
## Improving RubyCritic
|
245
248
|
|
@@ -249,7 +252,7 @@ Arguably, the [better_errors gem][7] only got popular after receiving a [(pretty
|
|
249
252
|
|
250
253
|
Similarly, Pull Requests that improve the look and feel of the gem, that tweak the calculation of ratings or that fix existing issues will be most welcome. Just commenting on an issue and giving some insight into how something should work will be appreciated. No contribution is too small.
|
251
254
|
|
252
|
-
See RubyCritic's [contributing guidelines](https://github.com/whitesmith/rubycritic/blob/
|
255
|
+
See RubyCritic's [contributing guidelines](https://github.com/whitesmith/rubycritic/blob/main/CONTRIBUTING.md) about how to proceed.
|
253
256
|
|
254
257
|
## Contributors
|
255
258
|
|
@@ -272,7 +275,7 @@ RubyCritic is maintained and funded by [Whitesmith][9]. Tweet your questions or
|
|
272
275
|
[3]: https://github.com/seattlerb/flog
|
273
276
|
[4]: https://github.com/whitesmith/guard-rubycritic
|
274
277
|
[5]: http://jenkins-ci.org/
|
275
|
-
[6]: https://github.com/whitesmith/rubycritic/blob/
|
278
|
+
[6]: https://github.com/whitesmith/rubycritic/blob/main/docs/building-own-code-climate.md
|
276
279
|
[7]: https://github.com/charliesome/better_errors
|
277
280
|
[8]: https://github.com/charliesome/better_errors/pull/22
|
278
281
|
[9]: http://www.whitesmith.co/
|
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
|
+
![Code Climate Toggle Option](https://camo.githubusercontent.com/d97fc62dae6ebef1f35bda91942d4a6bacc445b2/687474703a2f2f626c6f672e636f6465636c696d6174652e636f6d2f696d616765732f706f7374732f74657374696e672e676966)
|
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.
|
@@ -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
|
|
@@ -57,7 +57,7 @@ module RubyCritic
|
|
57
57
|
'Instantiate a given class as formatter and call report for reporting.',
|
58
58
|
'Two ways are possible to load the formatter.',
|
59
59
|
'If the class is not autorequired the REQUIREPATH can be given together',
|
60
|
-
'with the CLASSNAME to be loaded
|
60
|
+
'with the CLASSNAME to be loaded separated by a :.',
|
61
61
|
'Example: rubycritic/markdown/reporter.rb:RubyCritic::MarkDown::Reporter',
|
62
62
|
'or if the file is already required the CLASSNAME is enough',
|
63
63
|
'Example: RubyCritic::MarkDown::Reporter',
|
@@ -77,8 +77,8 @@ module RubyCritic
|
|
77
77
|
end
|
78
78
|
|
79
79
|
opts.on('-m', '--mode-ci [BASE_BRANCH]',
|
80
|
-
'Use CI mode (faster, analyses diffs w.r.t base_branch (default:
|
81
|
-
self.base_branch = branch || '
|
80
|
+
'Use CI mode (faster, analyses diffs w.r.t base_branch (default: main))') do |branch|
|
81
|
+
self.base_branch = branch || 'main'
|
82
82
|
set_current_branch
|
83
83
|
self.mode = :ci
|
84
84
|
end
|
@@ -130,6 +130,7 @@ module RubyCritic
|
|
130
130
|
attr_accessor :mode, :root, :formats, :formatters, :deduplicate_symlinks,
|
131
131
|
:suppress_ratings, :minimum_score, :churn_after, :no_browser,
|
132
132
|
:parser, :base_branch, :feature_branch, :threshold_score
|
133
|
+
|
133
134
|
def paths
|
134
135
|
@argv unless @argv.empty?
|
135
136
|
end
|
@@ -38,7 +38,7 @@ module RubyCritic
|
|
38
38
|
private
|
39
39
|
|
40
40
|
def base_branch
|
41
|
-
return options.dig('mode_ci', 'branch') || '
|
41
|
+
return options.dig('mode_ci', 'branch') || 'main' if options.dig('mode_ci', 'enabled').to_s == 'true'
|
42
42
|
|
43
43
|
options['branch']
|
44
44
|
end
|
@@ -77,8 +77,9 @@ module RubyCritic
|
|
77
77
|
|
78
78
|
def formats
|
79
79
|
formats = Array(options['formats'])
|
80
|
+
formats_to_check = %w[html json console lint]
|
80
81
|
formats.select do |format|
|
81
|
-
|
82
|
+
formats_to_check.include?(format)
|
82
83
|
end.map(&:to_sym)
|
83
84
|
end
|
84
85
|
|
@@ -91,9 +91,9 @@ module RubyCritic
|
|
91
91
|
|
92
92
|
# create a txt file with the branch score details
|
93
93
|
def build_details
|
94
|
-
details = "Base branch (#{Config.base_branch}) score: #{Config.base_branch_score} \n"\
|
94
|
+
details = "Base branch (#{Config.base_branch}) score: #{Config.base_branch_score} \n" \
|
95
95
|
"Feature branch (#{Config.feature_branch}) score: #{Config.feature_branch_score} \n"
|
96
|
-
File.
|
96
|
+
File.write("#{Config.compare_root_directory}/build_details.txt", details)
|
97
97
|
end
|
98
98
|
|
99
99
|
# store the analysed moduled collection based on the branch
|
@@ -10,7 +10,7 @@ module RubyCritic
|
|
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
|
13
|
+
:feature_branch_collection, :churn_after, :ruby_extensions, :paths
|
14
14
|
|
15
15
|
def set(options)
|
16
16
|
self.mode = options[:mode] || :default
|
@@ -20,10 +20,16 @@ module RubyCritic
|
|
20
20
|
self.open_with = options[:open_with]
|
21
21
|
self.no_browser = options[:no_browser]
|
22
22
|
self.threshold_score = options[:threshold_score].to_i
|
23
|
+
setup_analysis_targets(options)
|
23
24
|
setup_version_control(options)
|
24
25
|
setup_formats(options)
|
25
26
|
end
|
26
27
|
|
28
|
+
def setup_analysis_targets(options)
|
29
|
+
self.paths = options[:paths] || ['.']
|
30
|
+
self.ruby_extensions = options[:ruby_extensions] || %w[.rb .rake .thor]
|
31
|
+
end
|
32
|
+
|
27
33
|
def setup_version_control(options)
|
28
34
|
self.base_branch = options[:base_branch]
|
29
35
|
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
|
@@ -12,7 +12,7 @@ module RubyCritic
|
|
12
12
|
attribute :locations, Array, default: []
|
13
13
|
attribute :message
|
14
14
|
attribute :score
|
15
|
-
attribute :status
|
15
|
+
attribute :status, Symbol, default: :new
|
16
16
|
attribute :type
|
17
17
|
attribute :analyser
|
18
18
|
|
@@ -20,7 +20,7 @@ module RubyCritic
|
|
20
20
|
FLOG_DOCS_URL = 'http://docs.seattlerb.org/flog/'.freeze
|
21
21
|
|
22
22
|
def at_location?(other_location)
|
23
|
-
locations.any?
|
23
|
+
locations.any?(other_location)
|
24
24
|
end
|
25
25
|
|
26
26
|
def multiple_locations?
|
@@ -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>
|
@@ -32,7 +32,7 @@
|
|
32
32
|
<% if @show_status %>
|
33
33
|
<ul class="nav nav-pills">
|
34
34
|
<li role="presentation">
|
35
|
-
<
|
35
|
+
<span class="status-<%= smell.status %> circled-text circle"><%= smell.status %></span>
|
36
36
|
</li>
|
37
37
|
</ul>
|
38
38
|
<% end %>
|
@@ -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
|
@@ -10,7 +10,7 @@ module RubyCritic
|
|
10
10
|
TEMPLATE_PATH = File.expand_path('templates/list.erb', __dir__)
|
11
11
|
|
12
12
|
def erb_template
|
13
|
-
@erb_template ||= ERB.new(File.read(TEMPLATE_PATH),
|
13
|
+
@erb_template ||= ERB.new(File.read(TEMPLATE_PATH), trim_mode: '-')
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -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)
|
@@ -71,12 +82,12 @@ module RubyCritic
|
|
71
82
|
end
|
72
83
|
|
73
84
|
def process_rename(from, to)
|
74
|
-
|
85
|
+
renames.renamed(from, to)
|
75
86
|
process_file(to)
|
76
87
|
end
|
77
88
|
|
78
89
|
def process_file(filename)
|
79
|
-
record_commit(
|
90
|
+
record_commit(renames.current(filename), @date)
|
80
91
|
end
|
81
92
|
|
82
93
|
def record_commit(filename, date)
|
@@ -84,6 +95,10 @@ module RubyCritic
|
|
84
95
|
stats.count += 1
|
85
96
|
end
|
86
97
|
|
98
|
+
def renames
|
99
|
+
@renames ||= Renames.new
|
100
|
+
end
|
101
|
+
|
87
102
|
def stats(path)
|
88
103
|
@stats.fetch(path, Stats.new(0))
|
89
104
|
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,17 +71,19 @@ 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
|
-
branch_list.match(/\*.*$/)[0].gsub('* ', '')
|
84
|
+
branch = branch_list.match(/\*.*$/)[0].gsub('* ', '')
|
85
|
+
branch = branch.gsub(/\(HEAD detached at (.*)\)$/, '\1') if /\(HEAD detached at (.*)\)$/.match?(branch)
|
86
|
+
branch
|
85
87
|
end
|
86
88
|
|
87
89
|
private
|
@@ -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'],
|
@@ -7,6 +7,7 @@ module RubyCritic
|
|
7
7
|
class SourceLocator
|
8
8
|
RUBY_EXTENSION = '.rb'.freeze
|
9
9
|
RUBY_FILES = File.join('**', "*#{RUBY_EXTENSION}")
|
10
|
+
RUBY_SHEBANG = '#!/usr/bin/env ruby'.freeze
|
10
11
|
|
11
12
|
def initialize(paths)
|
12
13
|
@initial_paths = Array(paths)
|
@@ -39,7 +40,7 @@ module RubyCritic
|
|
39
40
|
path_list = @initial_paths.flat_map do |path|
|
40
41
|
if File.directory?(path)
|
41
42
|
Pathname.glob(File.join(path, RUBY_FILES))
|
42
|
-
elsif File.exist?(path) &&
|
43
|
+
elsif File.exist?(path) && ruby_file?(path)
|
43
44
|
Pathname.new(path)
|
44
45
|
end
|
45
46
|
end.compact
|
@@ -48,5 +49,9 @@ module RubyCritic
|
|
48
49
|
|
49
50
|
path_list.map(&:cleanpath)
|
50
51
|
end
|
52
|
+
|
53
|
+
def ruby_file?(path)
|
54
|
+
Config.ruby_extensions.include?(File.extname(path)) || File.open(path, &:gets).to_s.match?(RUBY_SHEBANG)
|
55
|
+
end
|
51
56
|
end
|
52
57
|
end
|
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.8.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: 2023-05-17 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.6'
|
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.6'
|
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.1
|
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.1
|
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
|
@@ -106,97 +106,74 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - "~>"
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: '3.
|
109
|
+
version: '3.20'
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
112
|
version_requirements: !ruby/object:Gem::Requirement
|
113
113
|
requirements:
|
114
114
|
- - "~>"
|
115
115
|
- !ruby/object:Gem::Version
|
116
|
-
version: '3.
|
116
|
+
version: '3.20'
|
117
117
|
- !ruby/object:Gem::Dependency
|
118
118
|
name: simplecov
|
119
119
|
requirement: !ruby/object:Gem::Requirement
|
120
120
|
requirements:
|
121
121
|
- - ">="
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 0.
|
123
|
+
version: 0.22.0
|
124
124
|
type: :runtime
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - ">="
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 0.
|
130
|
+
version: 0.22.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: tty-which
|
133
133
|
requirement: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
135
|
- - "~>"
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.
|
137
|
+
version: 0.5.0
|
138
138
|
type: :runtime
|
139
139
|
prerelease: false
|
140
140
|
version_requirements: !ruby/object:Gem::Requirement
|
141
141
|
requirements:
|
142
142
|
- - "~>"
|
143
143
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.
|
144
|
+
version: 0.5.0
|
145
145
|
- !ruby/object:Gem::Dependency
|
146
146
|
name: virtus
|
147
147
|
requirement: !ruby/object:Gem::Requirement
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: '
|
151
|
+
version: '2.0'
|
152
152
|
type: :runtime
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !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'
|
158
|
+
version: '2.0'
|
173
159
|
- !ruby/object:Gem::Dependency
|
174
160
|
name: aruba
|
175
161
|
requirement: !ruby/object:Gem::Requirement
|
176
162
|
requirements:
|
177
163
|
- - "~>"
|
178
164
|
- !ruby/object:Gem::Version
|
179
|
-
version:
|
180
|
-
- - ">="
|
181
|
-
- !ruby/object:Gem::Version
|
182
|
-
version: 0.12.0
|
165
|
+
version: 2.1.0
|
183
166
|
type: :development
|
184
167
|
prerelease: false
|
185
168
|
version_requirements: !ruby/object:Gem::Requirement
|
186
169
|
requirements:
|
187
170
|
- - "~>"
|
188
171
|
- !ruby/object:Gem::Version
|
189
|
-
version:
|
190
|
-
- - ">="
|
191
|
-
- !ruby/object:Gem::Version
|
192
|
-
version: 0.12.0
|
172
|
+
version: 2.1.0
|
193
173
|
- !ruby/object:Gem::Dependency
|
194
174
|
name: bundler
|
195
175
|
requirement: !ruby/object:Gem::Requirement
|
196
176
|
requirements:
|
197
|
-
- - "~>"
|
198
|
-
- !ruby/object:Gem::Version
|
199
|
-
version: '2.0'
|
200
177
|
- - ">="
|
201
178
|
- !ruby/object:Gem::Version
|
202
179
|
version: 2.0.0
|
@@ -204,9 +181,6 @@ dependencies:
|
|
204
181
|
prerelease: false
|
205
182
|
version_requirements: !ruby/object:Gem::Requirement
|
206
183
|
requirements:
|
207
|
-
- - "~>"
|
208
|
-
- !ruby/object:Gem::Version
|
209
|
-
version: '2.0'
|
210
184
|
- - ">="
|
211
185
|
- !ruby/object:Gem::Version
|
212
186
|
version: 2.0.0
|
@@ -236,20 +210,14 @@ dependencies:
|
|
236
210
|
requirements:
|
237
211
|
- - "~>"
|
238
212
|
- !ruby/object:Gem::Version
|
239
|
-
version:
|
240
|
-
- - ">="
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: 2.2.0
|
213
|
+
version: 8.0.0
|
243
214
|
type: :development
|
244
215
|
prerelease: false
|
245
216
|
version_requirements: !ruby/object:Gem::Requirement
|
246
217
|
requirements:
|
247
218
|
- - "~>"
|
248
219
|
- !ruby/object:Gem::Version
|
249
|
-
version:
|
250
|
-
- - ">="
|
251
|
-
- !ruby/object:Gem::Version
|
252
|
-
version: 2.2.0
|
220
|
+
version: 8.0.0
|
253
221
|
- !ruby/object:Gem::Dependency
|
254
222
|
name: diff-lcs
|
255
223
|
requirement: !ruby/object:Gem::Requirement
|
@@ -270,34 +238,28 @@ dependencies:
|
|
270
238
|
requirements:
|
271
239
|
- - "~>"
|
272
240
|
- !ruby/object:Gem::Version
|
273
|
-
version:
|
274
|
-
- - "<"
|
275
|
-
- !ruby/object:Gem::Version
|
276
|
-
version: 2.0.0
|
241
|
+
version: 2.4.0
|
277
242
|
type: :development
|
278
243
|
prerelease: false
|
279
244
|
version_requirements: !ruby/object:Gem::Requirement
|
280
245
|
requirements:
|
281
246
|
- - "~>"
|
282
247
|
- !ruby/object:Gem::Version
|
283
|
-
version:
|
284
|
-
- - "<"
|
285
|
-
- !ruby/object:Gem::Version
|
286
|
-
version: 2.0.0
|
248
|
+
version: 2.4.0
|
287
249
|
- !ruby/object:Gem::Dependency
|
288
250
|
name: mdl
|
289
251
|
requirement: !ruby/object:Gem::Requirement
|
290
252
|
requirements:
|
291
253
|
- - "~>"
|
292
254
|
- !ruby/object:Gem::Version
|
293
|
-
version: 0.
|
255
|
+
version: 0.12.0
|
294
256
|
type: :development
|
295
257
|
prerelease: false
|
296
258
|
version_requirements: !ruby/object:Gem::Requirement
|
297
259
|
requirements:
|
298
260
|
- - "~>"
|
299
261
|
- !ruby/object:Gem::Version
|
300
|
-
version: 0.
|
262
|
+
version: 0.12.0
|
301
263
|
- !ruby/object:Gem::Dependency
|
302
264
|
name: minitest
|
303
265
|
requirement: !ruby/object:Gem::Requirement
|
@@ -338,27 +300,21 @@ dependencies:
|
|
338
300
|
requirements:
|
339
301
|
- - "~>"
|
340
302
|
- !ruby/object:Gem::Version
|
341
|
-
version:
|
342
|
-
- - ">="
|
343
|
-
- !ruby/object:Gem::Version
|
344
|
-
version: 1.1.0
|
303
|
+
version: 2.0.2
|
345
304
|
type: :development
|
346
305
|
prerelease: false
|
347
306
|
version_requirements: !ruby/object:Gem::Requirement
|
348
307
|
requirements:
|
349
308
|
- - "~>"
|
350
309
|
- !ruby/object:Gem::Version
|
351
|
-
version:
|
352
|
-
- - ">="
|
353
|
-
- !ruby/object:Gem::Version
|
354
|
-
version: 1.1.0
|
310
|
+
version: 2.0.2
|
355
311
|
- !ruby/object:Gem::Dependency
|
356
312
|
name: rake
|
357
313
|
requirement: !ruby/object:Gem::Requirement
|
358
314
|
requirements:
|
359
315
|
- - "~>"
|
360
316
|
- !ruby/object:Gem::Version
|
361
|
-
version:
|
317
|
+
version: 13.0.6
|
362
318
|
- - ">="
|
363
319
|
- !ruby/object:Gem::Version
|
364
320
|
version: 11.0.0
|
@@ -368,7 +324,7 @@ dependencies:
|
|
368
324
|
requirements:
|
369
325
|
- - "~>"
|
370
326
|
- !ruby/object:Gem::Version
|
371
|
-
version:
|
327
|
+
version: 13.0.6
|
372
328
|
- - ">="
|
373
329
|
- !ruby/object:Gem::Version
|
374
330
|
version: 11.0.0
|
@@ -392,14 +348,56 @@ dependencies:
|
|
392
348
|
requirements:
|
393
349
|
- - "~>"
|
394
350
|
- !ruby/object:Gem::Version
|
395
|
-
version:
|
351
|
+
version: 1.51.0
|
396
352
|
type: :development
|
397
353
|
prerelease: false
|
398
354
|
version_requirements: !ruby/object:Gem::Requirement
|
399
355
|
requirements:
|
400
356
|
- - "~>"
|
401
357
|
- !ruby/object:Gem::Version
|
402
|
-
version:
|
358
|
+
version: 1.51.0
|
359
|
+
- !ruby/object:Gem::Dependency
|
360
|
+
name: rubocop-minitest
|
361
|
+
requirement: !ruby/object:Gem::Requirement
|
362
|
+
requirements:
|
363
|
+
- - ">="
|
364
|
+
- !ruby/object:Gem::Version
|
365
|
+
version: '0'
|
366
|
+
type: :development
|
367
|
+
prerelease: false
|
368
|
+
version_requirements: !ruby/object:Gem::Requirement
|
369
|
+
requirements:
|
370
|
+
- - ">="
|
371
|
+
- !ruby/object:Gem::Version
|
372
|
+
version: '0'
|
373
|
+
- !ruby/object:Gem::Dependency
|
374
|
+
name: rubocop-performance
|
375
|
+
requirement: !ruby/object:Gem::Requirement
|
376
|
+
requirements:
|
377
|
+
- - ">="
|
378
|
+
- !ruby/object:Gem::Version
|
379
|
+
version: '0'
|
380
|
+
type: :development
|
381
|
+
prerelease: false
|
382
|
+
version_requirements: !ruby/object:Gem::Requirement
|
383
|
+
requirements:
|
384
|
+
- - ">="
|
385
|
+
- !ruby/object:Gem::Version
|
386
|
+
version: '0'
|
387
|
+
- !ruby/object:Gem::Dependency
|
388
|
+
name: rubocop-rake
|
389
|
+
requirement: !ruby/object:Gem::Requirement
|
390
|
+
requirements:
|
391
|
+
- - ">="
|
392
|
+
- !ruby/object:Gem::Version
|
393
|
+
version: '0'
|
394
|
+
type: :development
|
395
|
+
prerelease: false
|
396
|
+
version_requirements: !ruby/object:Gem::Requirement
|
397
|
+
requirements:
|
398
|
+
- - ">="
|
399
|
+
- !ruby/object:Gem::Version
|
400
|
+
version: '0'
|
403
401
|
description: RubyCritic is a tool that wraps around various static analysis gems to
|
404
402
|
provide a quality report of your Ruby code.
|
405
403
|
email:
|
@@ -526,7 +524,8 @@ files:
|
|
526
524
|
homepage: https://github.com/whitesmith/rubycritic
|
527
525
|
licenses:
|
528
526
|
- MIT
|
529
|
-
metadata:
|
527
|
+
metadata:
|
528
|
+
rubygems_mfa_required: 'true'
|
530
529
|
post_install_message:
|
531
530
|
rdoc_options: []
|
532
531
|
require_paths:
|
@@ -535,14 +534,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
535
534
|
requirements:
|
536
535
|
- - ">="
|
537
536
|
- !ruby/object:Gem::Version
|
538
|
-
version: 2.
|
537
|
+
version: 2.7.0
|
539
538
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
540
539
|
requirements:
|
541
540
|
- - ">="
|
542
541
|
- !ruby/object:Gem::Version
|
543
542
|
version: '0'
|
544
543
|
requirements: []
|
545
|
-
rubygems_version: 3.
|
544
|
+
rubygems_version: 3.1.6
|
546
545
|
signing_key:
|
547
546
|
specification_version: 4
|
548
547
|
summary: RubyCritic is a Ruby code quality reporter
|