reviewer 0.1.1 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.alexignore +1 -0
- data/.flayignore +1 -0
- data/.github/workflows/main.yml +14 -4
- data/.gitignore +5 -0
- data/.inch.yml +4 -0
- data/.reviewer.example.yml +63 -0
- data/.reviewer.future.yml +221 -0
- data/.reviewer.yml +140 -0
- data/.reviewer_stdout +0 -0
- data/.rubocop.yml +20 -0
- data/CHANGELOG.md +38 -3
- data/Gemfile +2 -4
- data/Gemfile.lock +103 -20
- data/LICENSE.txt +4 -20
- data/README.md +23 -29
- data/Rakefile +5 -5
- data/bin/console +4 -4
- data/exe/fmt +7 -0
- data/exe/rvw +7 -0
- data/lib/reviewer/arguments/files.rb +94 -0
- data/lib/reviewer/arguments/keywords.rb +133 -0
- data/lib/reviewer/arguments/tags.rb +71 -0
- data/lib/reviewer/arguments.rb +54 -10
- data/lib/reviewer/batch.rb +91 -0
- data/lib/reviewer/command/string/env.rb +44 -0
- data/lib/reviewer/command/string/flags.rb +51 -0
- data/lib/reviewer/command/string.rb +66 -0
- data/lib/reviewer/command.rb +75 -0
- data/lib/reviewer/configuration.rb +32 -7
- data/lib/reviewer/conversions.rb +16 -0
- data/lib/reviewer/guidance.rb +77 -0
- data/lib/reviewer/history.rb +69 -0
- data/lib/reviewer/keywords/git/staged.rb +64 -0
- data/lib/reviewer/keywords/git.rb +14 -0
- data/lib/reviewer/keywords.rb +9 -0
- data/lib/reviewer/loader.rb +36 -9
- data/lib/reviewer/output/printer.rb +44 -0
- data/lib/reviewer/output/scrubber.rb +48 -0
- data/lib/reviewer/output/token.rb +85 -0
- data/lib/reviewer/output.rb +122 -0
- data/lib/reviewer/runner/strategies/captured.rb +157 -0
- data/lib/reviewer/runner/strategies/passthrough.rb +63 -0
- data/lib/reviewer/runner.rb +131 -0
- data/lib/reviewer/shell/result.rb +84 -0
- data/lib/reviewer/shell/timer.rb +72 -0
- data/lib/reviewer/shell.rb +54 -0
- data/lib/reviewer/tool/settings.rb +38 -19
- data/lib/reviewer/tool.rb +137 -23
- data/lib/reviewer/tools.rb +87 -8
- data/lib/reviewer/version.rb +1 -1
- data/lib/reviewer.rb +107 -28
- data/reviewer.gemspec +34 -19
- data/structure.svg +1 -0
- metadata +244 -12
- data/bin/review +0 -5
- data/lib/reviewer/tool/command.rb +0 -78
- data/lib/reviewer/tool/env.rb +0 -39
- data/lib/reviewer/tool/flags.rb +0 -39
- data/lib/reviewer/tool/verbosity.rb +0 -39
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4269dc4784c9a22232bd47db41cff0bf7d57b023ee50dc5fc455a650fb138b2a
|
4
|
+
data.tar.gz: 73d9261188abd69db6aa23aa7db6f76a59696b1dac3e35eb1a5615e013b40354
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 66894ea63a67d4964e93a5ab83ce92b95e0757d38af05a1587e136d0cc2d61fcf146d2c30534ce3f58aa4f08ed406e328ecad1293a617df73b2d1167c6146782
|
7
|
+
data.tar.gz: 0614f40cbd184e0e20aad58a8f4c320af3a5db358078cecdfac236047a0c85060b15b7dccbade7c599c4ebc030ea0eb4348d239fbbf3f25a48079f6f3a0464f7
|
data/.alexignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
CODE_OF_CONDUCT.md
|
data/.flayignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
./test/**/*.rb
|
data/.github/workflows/main.yml
CHANGED
@@ -1,16 +1,26 @@
|
|
1
|
-
name:
|
1
|
+
name: Review
|
2
2
|
|
3
3
|
on: [push,pull_request]
|
4
4
|
|
5
|
+
env:
|
6
|
+
CI: true
|
7
|
+
|
5
8
|
jobs:
|
6
9
|
build:
|
10
|
+
strategy:
|
11
|
+
matrix:
|
12
|
+
ruby: [2.5.9, 2.6.9, 2.7.5, 3.0.3]
|
7
13
|
runs-on: ubuntu-latest
|
8
14
|
steps:
|
9
15
|
- uses: actions/checkout@v2
|
10
16
|
- name: Set up Ruby
|
11
17
|
uses: ruby/setup-ruby@v1
|
12
18
|
with:
|
13
|
-
ruby-version:
|
19
|
+
ruby-version: ${{ matrix.ruby }}
|
14
20
|
bundler-cache: true
|
15
|
-
- name:
|
16
|
-
run: bundle exec
|
21
|
+
- name: Bundle Audit
|
22
|
+
run: bundle exec ./exe/rvw bundle_audit
|
23
|
+
- name: Test Review
|
24
|
+
run: bundle exec ./exe/rvw tests
|
25
|
+
- name: Multiple Command Review
|
26
|
+
run: bundle exec ./exe/rvw bundle_audit tests
|
data/.gitignore
CHANGED
data/.inch.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Quick overview of the options configuration for command-line tools.
|
2
|
+
# It can be handy to leave this section in your configuration file as a convenient reference.
|
3
|
+
#
|
4
|
+
# <command_key>: // ex. 'rubocop', 'bundler-audit', etc.
|
5
|
+
# disabled: true // Optional. Tools are enabled by default
|
6
|
+
# name: // Optional. Will use the `command_key` if name isn't provided.
|
7
|
+
# description: // Optional. Serves as a handy reminder for the purpose of the command.
|
8
|
+
# tags: [ruby, dependencies] // Optional. Lets you run commands tagged with the same word.
|
9
|
+
# links:
|
10
|
+
# home: // Optional. A link to the home page for the tool.
|
11
|
+
# install: // Optional. A link to the installation instructions for the tool.
|
12
|
+
# usage: // Optional. A link to the general usage instructions for the tool.
|
13
|
+
# ignore_syntax: // Optional. A link to the syntax for ignoring some rules for small sections of code.
|
14
|
+
# disable_syntax: // Optional. A link to the syntax for disabling entire rules for a tool.
|
15
|
+
# commands:
|
16
|
+
# install: // Optional. Command to run to install the tool.
|
17
|
+
# prepare: // Optional. Command to run prior to the review phase. ex. 'bundle exec bundle-audit update'
|
18
|
+
# review: // Required. The only truly required field because this is the whole point.
|
19
|
+
# format: // Optional. Command to auto-update rule violations when possible.
|
20
|
+
# serve: // Optional. Command to start a local server with reports generated by the tool.
|
21
|
+
# generate: // Optional. Command to generate artifacts from the tool for viewing separately.
|
22
|
+
# max_exit_status: // Optional, defaults to 0. Some tools like Yarn Audit essentially won't return less than a 3. This specifies the threshold that's still considered passing.
|
23
|
+
# files:
|
24
|
+
# flag: // Optional, defaults to '' (empty string). The name of the flag used to pass subsets of files to the command.
|
25
|
+
# separator: // Optional, defaults to ' ' (single space). The character used to separate lists of files and directories.
|
26
|
+
# env: // Optional. A way to specify necessary environment variables for the tools commands. The key is the variable name, and the value is, well, the value.
|
27
|
+
# example_one: value // - The names will automatically be capitalized, so you can freely use lower-case here.
|
28
|
+
# example_one: value // - Reviewer is smart enough to handle string values with spaces and automatically quote them.
|
29
|
+
# flags: // Optional. A way to specify flags *only for the review command*. The key is the flag name, and the value is, well, the value.
|
30
|
+
# example_one: value // - Reviewer is smart enough to handle single-letter (-f) and multi-letter (--format) flags.
|
31
|
+
# example_two: value // - It's highly-recommended to use the longer-name format for flags when possible to serve as self-documentation.
|
32
|
+
# example_three: // - If the flag doesn't need or have a value, leaving it blank will translate it to a flag without a value.
|
33
|
+
# other: // Optional. A way to specify paramters that don't follow the standard flags conventions.
|
34
|
+
# description: value // - The key (ex. 'description') only serves as documentation and won't be used. Instead, the raw value will be applied
|
35
|
+
|
36
|
+
|
37
|
+
# In practice, a configuration block would look something like the block below.
|
38
|
+
tool-name-key:
|
39
|
+
disabled: true
|
40
|
+
name: Tool
|
41
|
+
description: A tool that finds issues and fixes code.
|
42
|
+
tags: [syntax, security]
|
43
|
+
links:
|
44
|
+
home: https://example.com
|
45
|
+
install: https://example.com/install
|
46
|
+
ignore_syntax: https://example.com/ignore
|
47
|
+
disable_syntax: https://example.com/disable
|
48
|
+
commands:
|
49
|
+
install: 'bundle install tool'
|
50
|
+
prepare: 'bundle exec tool update'
|
51
|
+
review: 'bundle exec tool'
|
52
|
+
format: 'bundle exec tool --format'
|
53
|
+
max_exit_status: 1
|
54
|
+
files:
|
55
|
+
flag: 'files'
|
56
|
+
separator: ','
|
57
|
+
env:
|
58
|
+
report: false
|
59
|
+
flags:
|
60
|
+
format: json
|
61
|
+
verbose:
|
62
|
+
other:
|
63
|
+
example: '--example | other'
|
@@ -0,0 +1,221 @@
|
|
1
|
+
# This represents the long-term vision for reviewer. It's a sort of documentation-driven design, but
|
2
|
+
# it's also heavily based on the initial exploration and iteration to determine what's possible and
|
3
|
+
# what's practical based on testing out a variety of command types and structures.
|
4
|
+
|
5
|
+
# Options for `rvw` command
|
6
|
+
# -c <file>, --config=<file>
|
7
|
+
# -f <file>,<file>..., --files=<file>,<file>...
|
8
|
+
# -t <tag>,<tag>..., --tags=<tag>,<tag>...
|
9
|
+
# -l <tool_key>,<tool_key>..., --tools=<tool_key>,<tool_key>...
|
10
|
+
# -c <command>, --command=<command>
|
11
|
+
# -k, --keywords
|
12
|
+
# -s, --settings
|
13
|
+
# -h, --help
|
14
|
+
# -v, --version
|
15
|
+
# <keyword>
|
16
|
+
|
17
|
+
# Implicit Keywords:
|
18
|
+
# - every <tag>
|
19
|
+
# - every <tool_key>
|
20
|
+
# - <tool_key>:settings
|
21
|
+
# - <tool_key>:links
|
22
|
+
# - every <tool_key>:<link>
|
23
|
+
# - <tool_key>:commands
|
24
|
+
# - every <tool_key>:<command>
|
25
|
+
|
26
|
+
# Reserved Keywords:
|
27
|
+
# - every link type
|
28
|
+
# - every command type
|
29
|
+
# - staged // currently staged git files
|
30
|
+
# - untracked // currently untracked git files
|
31
|
+
# - fresh // untracked files updated in last 5 minutes
|
32
|
+
# - fresh_15 // ... 15 minutes
|
33
|
+
# - fresh_30 // ... 30 minutes
|
34
|
+
# - fresh_60 // ... 60 minutes
|
35
|
+
# - stale // untracked files updated more than 5 minutes ago
|
36
|
+
# - stale_15 // ... 15 minutes
|
37
|
+
# - stale_30 // ... 30 minutes
|
38
|
+
# - stale_60 // ... 60 minutes
|
39
|
+
# - branch|diff // All files created or updated on the current branch
|
40
|
+
# - last_commit // All files created or updated in the last commit
|
41
|
+
# - current // alias for branch or diff?
|
42
|
+
|
43
|
+
# Command Examples:
|
44
|
+
|
45
|
+
# The Basics
|
46
|
+
# - rvw // runs :review command for all enabled tools
|
47
|
+
# - rvw <command> // runs <command> for all enabled tools (not disabled or solo)
|
48
|
+
# - rvw <keyword> // runs :review command for all enabled tools and translates the <keyword>
|
49
|
+
# - rvw <tag> // runs :review command for all enabled tools tagged with <tag>
|
50
|
+
|
51
|
+
# Tools
|
52
|
+
# - rvw <tool_key> // shortcut for `rvw <tool_key>:review`
|
53
|
+
# - rvw <tool_key>:<command> // runs <command> for <tool_key> in passthrough mode
|
54
|
+
# - rvw <tool_key>:<link> // opens the <link> via `open <link>` if present, otherwise, shares that it's not configured
|
55
|
+
# - rvw <tool_key>:settings // displays all settings for <tool_key>
|
56
|
+
# - rvw <tool_key>:commands // displays all configured commands for <tool_key>
|
57
|
+
# - rvw <tool_key>:links // displays all configured links for <tool_key>
|
58
|
+
|
59
|
+
# Combos
|
60
|
+
# - rvw <keyword> <tag> // ex. `rvw staged ruby` -> `rvw review staged ruby`
|
61
|
+
# - rvw <command> <tag> // ex. `rvw format ruby` -> `rvw format ruby`
|
62
|
+
# - rvw <command> <reserved_keyword> // ex. `rvw install ruby`
|
63
|
+
# - rvw <command> <reserved_keyword> <tag> // ex. `rvw format last_commit ruby`
|
64
|
+
# - rvw <command> <reserved_keyword> <tag> <tag> // ex. `rvw format last_commit ruby erb`
|
65
|
+
|
66
|
+
reviewer:
|
67
|
+
# Whether to run tools consecutively or in parallel if available
|
68
|
+
# :linear - It would suck if your first command is `bundle audit` and fails but 6 other tools
|
69
|
+
# are running in parallel but will take time to fail. So :linear with :stop as the behavior
|
70
|
+
# ensures you don't attepmt commands.
|
71
|
+
# :parallel - Reviewer will attempt to run commands on multiple threads/processors for more speed.
|
72
|
+
# Best used when groups of commands are not dependent on each other.
|
73
|
+
default_batch_mode: <:linear|:safe, :parallel|:fast>
|
74
|
+
|
75
|
+
# Fallback failure behavior for all commands where it isn't explicitly defined. Applies to
|
76
|
+
# linear runs independent of each other. So if you have two batches (ex. ruby, javascript), and
|
77
|
+
# one batch fails immediately, the remaining commands willn ot be run. But the other batch will
|
78
|
+
# safely continue independently.
|
79
|
+
# Optional. Defaults to :fast.
|
80
|
+
# :stop - Don't run any additional commands in that batch.
|
81
|
+
# :continue - Keep running the other commands.
|
82
|
+
default_command_failure_behavior_in_batch: <:stop, :continue>
|
83
|
+
|
84
|
+
# Fallback install behavior for all commands where it isn't explicitly defined.
|
85
|
+
# Maybe if the install command is present, `:auto` is implied?
|
86
|
+
# Optional. Defaults to :guidance.
|
87
|
+
# - :guidance shows the installation command and/or link for manual installation.
|
88
|
+
# - :auto attempts to automatically install if the command is missing
|
89
|
+
# - :skip quietly moves on without worrying about it
|
90
|
+
default_install_behavior: <:guidance, :auto, :skip>
|
91
|
+
|
92
|
+
# Fallback behavior for displaying results.
|
93
|
+
# Optional. Defaults to :full
|
94
|
+
# - :full - Re-run the command directly so you see the full output
|
95
|
+
# - :fast - Show the results, but potentially lose colorizing and some formatting
|
96
|
+
default_results_behavior: <:full, :fast, :timer>
|
97
|
+
|
98
|
+
# Fallback definition for determining whether a command is slow.
|
99
|
+
# Only used if :default_results_behavior is :timer
|
100
|
+
# Optional. Defaults to 10 seconds
|
101
|
+
default_slow_window: <integer seconds>
|
102
|
+
|
103
|
+
# Fallback defintion for determining whether a command needs to be prepped again.
|
104
|
+
# Optional. Defaults to 6 hours
|
105
|
+
default_prep_window: <integer hours>
|
106
|
+
|
107
|
+
# Primarily for debugging/improving performance of reviewer. But if low-level performance info is
|
108
|
+
# interesting, it can be enabled.
|
109
|
+
# Optional. Defaults to :min
|
110
|
+
# :min - Shows simply the total time for each command. Breaks out install/prep % if relevant.
|
111
|
+
timer_detail: <:min, :max>
|
112
|
+
|
113
|
+
# Custom-defined keywords for shortcuts
|
114
|
+
keywords:
|
115
|
+
# Compact version
|
116
|
+
mgc: 'format last_commit ruby erb'
|
117
|
+
# Long-form version of `mgc` (a little more self-documenting and explicit)
|
118
|
+
magic: '--command=format --keywords=last_commit --tags=ruby,erb'
|
119
|
+
# Long-form of `mgc` (most self-documentating and explicit)
|
120
|
+
magic:
|
121
|
+
- '--command=format'
|
122
|
+
- '--keywords=last_commit'
|
123
|
+
- '--tags=ruby,erb'
|
124
|
+
|
125
|
+
# The real core of the configuration for each individual tool.
|
126
|
+
tools:
|
127
|
+
<tool_key>: # Required. ex. 'rubocop', 'bundler-audit', etc.
|
128
|
+
status: <:enabled, :disabled, :solo> # Optional. Tools are enabled by default
|
129
|
+
name: # Optional. Defaults to <tool_key> capitalized
|
130
|
+
description: # Optional. Remind folks of the specific task this tool performs.
|
131
|
+
tags: [one, two, three] # Optional. For running groups of commands.
|
132
|
+
batch: # Optional. Only used if run in batch mode. ex. Run ruby commands on one thread and yarn commands on another.
|
133
|
+
install_behavior: <:auto, :guidance> # Optional. Defaults to Reviewer default.
|
134
|
+
failure_behavior: <:continue, :fast, :informative> # Optional
|
135
|
+
links:
|
136
|
+
home:
|
137
|
+
repo:
|
138
|
+
support:
|
139
|
+
install:
|
140
|
+
usage:
|
141
|
+
options:
|
142
|
+
syntax:
|
143
|
+
ignore:
|
144
|
+
disable:
|
145
|
+
files_syntax:
|
146
|
+
flag:
|
147
|
+
separator:
|
148
|
+
quotes:
|
149
|
+
shared_options: # Optional. Used for all commands.
|
150
|
+
prefix: 'bundle exec'
|
151
|
+
stale: <hours>
|
152
|
+
base: '<command>'
|
153
|
+
quiet: '--quiet'
|
154
|
+
max_exit_status:
|
155
|
+
flags:
|
156
|
+
<flag>: '<value>'
|
157
|
+
env:
|
158
|
+
<env_var>: '<value>'
|
159
|
+
raw:
|
160
|
+
- '<value>'
|
161
|
+
commands:
|
162
|
+
install:
|
163
|
+
desc:
|
164
|
+
stale:
|
165
|
+
prefix:
|
166
|
+
base:
|
167
|
+
quiet:
|
168
|
+
max_exit_status:
|
169
|
+
flags:
|
170
|
+
env:
|
171
|
+
raw:
|
172
|
+
prepare:
|
173
|
+
desc:
|
174
|
+
stale:
|
175
|
+
prefix:
|
176
|
+
base:
|
177
|
+
quiet:
|
178
|
+
max_exit_status:
|
179
|
+
flags:
|
180
|
+
env:
|
181
|
+
raw:
|
182
|
+
review:
|
183
|
+
desc:
|
184
|
+
stale:
|
185
|
+
prefix:
|
186
|
+
base:
|
187
|
+
quiet:
|
188
|
+
max_exit_status:
|
189
|
+
flags:
|
190
|
+
env:
|
191
|
+
raw:
|
192
|
+
format:
|
193
|
+
desc:
|
194
|
+
stale:
|
195
|
+
prefix:
|
196
|
+
base:
|
197
|
+
quiet:
|
198
|
+
max_exit_status:
|
199
|
+
flags:
|
200
|
+
env:
|
201
|
+
raw:
|
202
|
+
serve:
|
203
|
+
desc:
|
204
|
+
stale:
|
205
|
+
prefix:
|
206
|
+
base:
|
207
|
+
quiet:
|
208
|
+
max_exit_status:
|
209
|
+
flags:
|
210
|
+
env:
|
211
|
+
raw:
|
212
|
+
generate:
|
213
|
+
desc:
|
214
|
+
stale:
|
215
|
+
prefix:
|
216
|
+
base:
|
217
|
+
quiet:
|
218
|
+
max_exit_status:
|
219
|
+
flags:
|
220
|
+
env:
|
221
|
+
raw:
|
data/.reviewer.yml
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
bundle_audit:
|
2
|
+
name: Bundle Audit
|
3
|
+
description: Review Gem Dependencies for Security Issues
|
4
|
+
tags: [critical, dependencies, ruby, dev]
|
5
|
+
links:
|
6
|
+
home: https://github.com/rubysec/bundler-audit
|
7
|
+
install: https://github.com/rubysec/bundler-audit#install
|
8
|
+
commands:
|
9
|
+
install: 'bundle exec gem install bundler-audit'
|
10
|
+
prepare: 'bundle exec bundle-audit update'
|
11
|
+
review: 'bundle exec bundle-audit check --no-update'
|
12
|
+
|
13
|
+
tests:
|
14
|
+
name: Minitest
|
15
|
+
description: Unit Tests & Coverage
|
16
|
+
tags: [ruby, tests, dev]
|
17
|
+
links:
|
18
|
+
home:
|
19
|
+
commands:
|
20
|
+
review: "bundle exec rake"
|
21
|
+
reports:
|
22
|
+
open_on_fail: true
|
23
|
+
local_file: coverage/index.html
|
24
|
+
local_uri: 'file:///Users/garrettdimon/Code/reviewer/coverage/index.html#_AllFiles'
|
25
|
+
env:
|
26
|
+
testopts: --seed=$SEED
|
27
|
+
# coverage: false
|
28
|
+
|
29
|
+
reek:
|
30
|
+
name: Reek
|
31
|
+
description: Examine Ruby Classes for Code Smells
|
32
|
+
tags: [ruby, quality, dev]
|
33
|
+
links:
|
34
|
+
home: https://github.com/troessner/reek
|
35
|
+
install: https://github.com/troessner/reek#quickstart
|
36
|
+
commands:
|
37
|
+
install: 'bundle exec gem install reek'
|
38
|
+
review: 'bundle exec reek'
|
39
|
+
flags:
|
40
|
+
color:
|
41
|
+
documentation:
|
42
|
+
|
43
|
+
flog:
|
44
|
+
disabled: true # Flog provides guidance and is generally run solo
|
45
|
+
name: Flog
|
46
|
+
description: Reports your most tortured ruby code in an easy to read pain report.
|
47
|
+
tags: [ruby, quality, dev]
|
48
|
+
links:
|
49
|
+
home: https://ruby.sadi.st/Flog.html
|
50
|
+
install: https://ruby.sadi.st/Flog.html
|
51
|
+
commands:
|
52
|
+
install: 'bundle exec gem install flog'
|
53
|
+
review: 'bundle exec flog -g lib'
|
54
|
+
flags:
|
55
|
+
threshold: 10 # Percentage. i.e. Show the most concerning 10% of results
|
56
|
+
group:
|
57
|
+
methods-only:
|
58
|
+
|
59
|
+
flay:
|
60
|
+
disabled: true # Flay provides guidance and is generally run solo
|
61
|
+
name: Flay
|
62
|
+
description: Review ruby code for structural similarities and refactoring opportunities.
|
63
|
+
tags: [ruby, quality, dev]
|
64
|
+
links:
|
65
|
+
home: https://ruby.sadi.st/Flay.html
|
66
|
+
install: https://ruby.sadi.st/Flay.html
|
67
|
+
commands:
|
68
|
+
install: 'bundle exec gem install flay'
|
69
|
+
review: 'bundle exec flay ./lib'
|
70
|
+
flags:
|
71
|
+
liberal:
|
72
|
+
summary:
|
73
|
+
|
74
|
+
|
75
|
+
rubocop:
|
76
|
+
name: Rubocop
|
77
|
+
description: Review Ruby Syntax & Formatting for Consistency
|
78
|
+
tags: [ruby, syntax]
|
79
|
+
links:
|
80
|
+
home: https://rubocop.org
|
81
|
+
install: https://docs.rubocop.org/rubocop/1.13/installation.html
|
82
|
+
ignore_syntax: https://docs.rubocop.org/rubocop/configuration.html#ignoredmethods
|
83
|
+
disable_syntax: https://docs.rubocop.org/rubocop/configuration.html#disabling-cops-within-source-code
|
84
|
+
commands:
|
85
|
+
install: 'bundle exec gem install rubocop'
|
86
|
+
review: 'bundle exec rubocop --parallel'
|
87
|
+
format: 'bundle exec rubocop --auto-correct'
|
88
|
+
files:
|
89
|
+
flag: ''
|
90
|
+
separator: ' '
|
91
|
+
flags:
|
92
|
+
color:
|
93
|
+
|
94
|
+
|
95
|
+
# The YARD Parser can also come in handy:
|
96
|
+
# https://yardoc.org/types
|
97
|
+
inch:
|
98
|
+
disabled: true
|
99
|
+
tags: [docs, ruby, dev]
|
100
|
+
name: Inch
|
101
|
+
description: Review Ruby Documentation Quality
|
102
|
+
links:
|
103
|
+
home: https://rrrene.org/inch/
|
104
|
+
usage: https://www.rubydoc.info/gems/yard/file/docs/Tags.md
|
105
|
+
commands:
|
106
|
+
install: 'bundle exec gem install inch'
|
107
|
+
review: 'bundle exec inch'
|
108
|
+
|
109
|
+
|
110
|
+
yard:
|
111
|
+
disabled: true
|
112
|
+
tags: [docs, ruby, dev]
|
113
|
+
name: Yard
|
114
|
+
description: Generates Documentation
|
115
|
+
links:
|
116
|
+
home: https://yardoc.org
|
117
|
+
usage: https://www.rubydoc.info/gems/yard/file/docs/GettingStarted.md#using
|
118
|
+
install: https://github.com/lsegal/yard#installing
|
119
|
+
commands:
|
120
|
+
install: 'bundle exec gem install yard'
|
121
|
+
prepare: "yard doc 'lib/**/*.rb'"
|
122
|
+
review: 'yard stats'
|
123
|
+
serve: 'yard server --reload && open http://0.0.0.0:8808'
|
124
|
+
generate:
|
125
|
+
quiet_flag: '--quiet'
|
126
|
+
|
127
|
+
|
128
|
+
alex:
|
129
|
+
disabled: true
|
130
|
+
tags: [language, docs]
|
131
|
+
name: Yard
|
132
|
+
description: Generates Documentation
|
133
|
+
links:
|
134
|
+
home:
|
135
|
+
usage:
|
136
|
+
install:
|
137
|
+
commands:
|
138
|
+
install: 'yarn global add alex'
|
139
|
+
review: 'alex .'
|
140
|
+
quiet_flag: '--quiet'
|
data/.reviewer_stdout
ADDED
Binary file
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.5
|
3
|
+
NewCops: enable
|
4
|
+
UseCache: true
|
5
|
+
CacheRootDirectory: './'
|
6
|
+
Exclude:
|
7
|
+
- 'bin/**/*'
|
8
|
+
|
9
|
+
# Let's aim for 80, but we don't need to be nagged if we judiciously go over.
|
10
|
+
Layout/LineLength:
|
11
|
+
Enabled: false
|
12
|
+
|
13
|
+
# One case statement in a single method isn't complex.
|
14
|
+
Metrics/CyclomaticComplexity:
|
15
|
+
IgnoredMethods: ['case']
|
16
|
+
|
17
|
+
# 10 is a good goal but a little draconian
|
18
|
+
Metrics/MethodLength:
|
19
|
+
CountAsOne: ['array', 'hash', 'heredoc']
|
20
|
+
Max: 15
|
data/CHANGELOG.md
CHANGED
@@ -1,8 +1,43 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
-
- TODO:
|
4
|
-
- TODO: Add
|
5
|
-
|
3
|
+
- TODO: Improve and streamline installation
|
4
|
+
- TODO: Add support for targeting specific files
|
5
|
+
|
6
|
+
## [0.1.4] - 2021-07-08
|
7
|
+
|
8
|
+
On the surface, this release doesn't change much or provide drastically new functionality, but it begins to lay the foundation for something that could evolve in the long-term.
|
9
|
+
|
10
|
+
- Mostly refactoring to support the long-term vision
|
11
|
+
- Add Reek to dev dependencies
|
12
|
+
- Enable Inch in the default commands
|
13
|
+
- Reduce external dependencies
|
14
|
+
- Broaden official support Ruby 2.5.9, 2.6.8, 2.7.4, and 3.0.2
|
15
|
+
- Add more robust GitHub Actions integration
|
16
|
+
- Add Code Coverage via SimpleCov and set the bar at 100%
|
17
|
+
- Begin to expand documentation coverage
|
18
|
+
- Improve UX of results, timing, output, and error recovery guidance
|
19
|
+
|
20
|
+
## [0.1.3] - 2021-07-07
|
21
|
+
|
22
|
+
The most significant update to how the core commands work and how the command-line arguments are handled. Most of the overall structure is starting to feel stable enough to begin documenting and adding comments.
|
23
|
+
|
24
|
+
- Commands are now `rvw` and `fmt`
|
25
|
+
- Adds command-line arguments support
|
26
|
+
- Adds support for specifying tags via the command-line
|
27
|
+
- Adds support for specifying files via the command-line
|
28
|
+
- Adds support for handling keywords via the command-line
|
29
|
+
- Improved configuration and loading
|
30
|
+
- Adds Tools class for more convenient filtering of tools based on arguments
|
31
|
+
- Begins the process of adding documentation comments
|
32
|
+
|
33
|
+
## [0.1.2] - 2021-05-04
|
34
|
+
|
35
|
+
The bare minimum works now, but it's not quite there for day-to-day use. It works well enough that it's being used to review this project, but there's much more to do.
|
36
|
+
|
37
|
+
- Add Runner to wrap individual commands
|
38
|
+
- Add benchmark/timing to Runner
|
39
|
+
- Extract Logging to a dedicated class
|
40
|
+
- Intelligently handle non-zero exit statuses
|
6
41
|
|
7
42
|
## [0.1.1] - 2021-04-17
|
8
43
|
|
data/Gemfile
CHANGED