reviewer 0.1.4 → 1.0.0

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.
Files changed (93) hide show
  1. checksums.yaml +4 -4
  2. data/.alexignore +1 -0
  3. data/.github/FUNDING.yml +3 -0
  4. data/.github/workflows/main.yml +81 -11
  5. data/.github/workflows/release.yml +98 -0
  6. data/.gitignore +1 -1
  7. data/.inch.yml +3 -1
  8. data/.reek.yml +175 -0
  9. data/.reviewer.example.yml +27 -12
  10. data/.reviewer.future.yml +221 -0
  11. data/.reviewer.yml +191 -28
  12. data/.reviewer_stdout +0 -0
  13. data/.rubocop.yml +34 -1
  14. data/CHANGELOG.md +42 -2
  15. data/Gemfile +39 -1
  16. data/Gemfile.lock +294 -72
  17. data/README.md +315 -7
  18. data/RELEASING.md +190 -0
  19. data/Rakefile +117 -0
  20. data/dependency_decisions.yml +61 -0
  21. data/exe/fmt +1 -1
  22. data/exe/rvw +1 -1
  23. data/lib/reviewer/arguments/files.rb +60 -27
  24. data/lib/reviewer/arguments/keywords.rb +39 -43
  25. data/lib/reviewer/arguments/tags.rb +21 -14
  26. data/lib/reviewer/arguments.rb +107 -29
  27. data/lib/reviewer/batch/formatter.rb +87 -0
  28. data/lib/reviewer/batch.rb +46 -35
  29. data/lib/reviewer/capabilities.rb +81 -0
  30. data/lib/reviewer/command/string/env.rb +16 -6
  31. data/lib/reviewer/command/string/flags.rb +14 -5
  32. data/lib/reviewer/command/string.rb +53 -24
  33. data/lib/reviewer/command.rb +69 -39
  34. data/lib/reviewer/configuration/loader.rb +70 -0
  35. data/lib/reviewer/configuration.rb +14 -4
  36. data/lib/reviewer/context.rb +15 -0
  37. data/lib/reviewer/doctor/config_check.rb +46 -0
  38. data/lib/reviewer/doctor/environment_check.rb +58 -0
  39. data/lib/reviewer/doctor/formatter.rb +75 -0
  40. data/lib/reviewer/doctor/keyword_check.rb +85 -0
  41. data/lib/reviewer/doctor/opportunity_check.rb +88 -0
  42. data/lib/reviewer/doctor/report.rb +63 -0
  43. data/lib/reviewer/doctor/tool_inventory.rb +41 -0
  44. data/lib/reviewer/doctor.rb +28 -0
  45. data/lib/reviewer/history.rb +36 -12
  46. data/lib/reviewer/output/formatting.rb +40 -0
  47. data/lib/reviewer/output/printer.rb +105 -0
  48. data/lib/reviewer/output.rb +54 -65
  49. data/lib/reviewer/prompt.rb +38 -0
  50. data/lib/reviewer/report/formatter.rb +124 -0
  51. data/lib/reviewer/report.rb +100 -0
  52. data/lib/reviewer/runner/failed_files.rb +66 -0
  53. data/lib/reviewer/runner/formatter.rb +103 -0
  54. data/lib/reviewer/runner/guidance.rb +79 -0
  55. data/lib/reviewer/runner/result.rb +150 -0
  56. data/lib/reviewer/runner/strategies/captured.rb +232 -0
  57. data/lib/reviewer/runner/strategies/{verbose.rb → passthrough.rb} +15 -24
  58. data/lib/reviewer/runner.rb +179 -35
  59. data/lib/reviewer/session/formatter.rb +87 -0
  60. data/lib/reviewer/session.rb +208 -0
  61. data/lib/reviewer/setup/catalog.rb +233 -0
  62. data/lib/reviewer/setup/detector.rb +61 -0
  63. data/lib/reviewer/setup/formatter.rb +94 -0
  64. data/lib/reviewer/setup/gemfile_lock.rb +55 -0
  65. data/lib/reviewer/setup/generator.rb +54 -0
  66. data/lib/reviewer/setup/tool_block.rb +112 -0
  67. data/lib/reviewer/setup.rb +41 -0
  68. data/lib/reviewer/shell/result.rb +25 -11
  69. data/lib/reviewer/shell/timer.rb +47 -27
  70. data/lib/reviewer/shell.rb +46 -21
  71. data/lib/reviewer/tool/conversions.rb +20 -0
  72. data/lib/reviewer/tool/file_resolver.rb +54 -0
  73. data/lib/reviewer/tool/settings.rb +107 -56
  74. data/lib/reviewer/tool/test_file_mapper.rb +73 -0
  75. data/lib/reviewer/tool/timing.rb +78 -0
  76. data/lib/reviewer/tool.rb +88 -47
  77. data/lib/reviewer/tools.rb +47 -33
  78. data/lib/reviewer/version.rb +1 -1
  79. data/lib/reviewer.rb +114 -54
  80. data/reviewer.gemspec +21 -20
  81. data/structure.svg +1 -0
  82. metadata +113 -148
  83. data/.ruby-version +0 -1
  84. data/lib/reviewer/command/string/verbosity.rb +0 -51
  85. data/lib/reviewer/command/verbosity.rb +0 -65
  86. data/lib/reviewer/conversions.rb +0 -27
  87. data/lib/reviewer/guidance.rb +0 -73
  88. data/lib/reviewer/keywords/git/staged.rb +0 -48
  89. data/lib/reviewer/keywords/git.rb +0 -14
  90. data/lib/reviewer/keywords.rb +0 -9
  91. data/lib/reviewer/loader.rb +0 -59
  92. data/lib/reviewer/printer.rb +0 -25
  93. data/lib/reviewer/runner/strategies/quiet.rb +0 -90
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9223e406b7f957249c7d39ba4c56e3fbdabe323e52b270af076de0a530b51b9f
4
- data.tar.gz: afb2714ed785bd91b2fe3d3d7b6f75fa8826f9387609ba6eb21ed21960883e10
3
+ metadata.gz: 91c7ece2434c770297548056ba752092b0cc16427e0b94c35f58acb29efd304b
4
+ data.tar.gz: b303dd4164e6181f9bb8c583a6eb55836018c17e5361fadecdcd95efab09f3aa
5
5
  SHA512:
6
- metadata.gz: 7f56b586b5bea303b4dab387ba4c66535caf2f1cdbc0d8ff3b2a8e092b54d0a3bc340ae864a0ae90729bb89a2925294c51c8bab9476cb2a34f886b429efb3694
7
- data.tar.gz: 71da282037c2f26c339afe21ddb71ff0713ff7bf652bb0787f74df3b16bf12cd9aea86a7bf7625c0ee43d8d80e6d1e0ca03315e6cf9c1e8eee33cb6082415558
6
+ metadata.gz: 47aa07e5a1e72001bcaa3f3b95319c0ca8c110ce894e99b731300f948e38139f8d807235a0be17e894763031e87c3a0a1459e91713cb31c9388b5494df200b25
7
+ data.tar.gz: dcddd952084467bcfcd6ad1d09edd9b8eea87352bc8ef5aae6e0655c77349cc99f6def176c65f7bfe1936f2371251e8a183e345e85a45d6dc95764415efea2a1
data/.alexignore ADDED
@@ -0,0 +1 @@
1
+ CODE_OF_CONDUCT.md
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: garrettdimon
@@ -1,24 +1,94 @@
1
- name: Ruby
1
+ name: CI
2
2
 
3
- on: [push,pull_request]
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags-ignore:
7
+ - 'v*'
8
+ pull_request:
9
+
10
+ env:
11
+ CI: true
4
12
 
5
13
  jobs:
6
- build:
14
+ security:
15
+ name: Security
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+ - name: Set up Ruby
20
+ uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: '3.4'
23
+ bundler-cache: true
24
+ - name: Update vulnerability database
25
+ run: bundle exec bundle-audit update
26
+ - name: Run security audit
27
+ run: bundle exec bundle-audit check
28
+
29
+ test:
30
+ name: Test (Ruby ${{ matrix.ruby }})
7
31
  strategy:
32
+ fail-fast: false
8
33
  matrix:
9
- ruby: [2.5.9, 2.6.8, 2.7.4, 3.0.2]
34
+ ruby: ['3.2', '3.3', '3.4', '4.0']
10
35
  runs-on: ubuntu-latest
11
36
  steps:
12
- - uses: actions/checkout@v2
37
+ - uses: actions/checkout@v4
13
38
  - name: Set up Ruby
14
39
  uses: ruby/setup-ruby@v1
15
40
  with:
16
41
  ruby-version: ${{ matrix.ruby }}
17
42
  bundler-cache: true
18
- - name: Bundle Audit
19
- run: bundle exec ./exe/rvw bundle_audit
20
- - name: Test Review
21
- run: bundle exec ./exe/rvw tests
22
- - name: Multiple Command Review
23
- run: bundle exec ./exe/rvw bundle_audit tests
43
+ bundler: '2.7'
44
+ - name: Run tests
45
+ run: bundle exec rake test
46
+
47
+ changelog:
48
+ name: Changelog
49
+ runs-on: ubuntu-latest
50
+ steps:
51
+ - uses: actions/checkout@v4
52
+ - name: Validate changelog format
53
+ run: |
54
+ # Check [Unreleased] section exists
55
+ if ! grep -q '## \[Unreleased\]' CHANGELOG.md; then
56
+ echo "::error::CHANGELOG.md missing [Unreleased] section"
57
+ exit 1
58
+ fi
59
+
60
+ # Check version entries have dates (## [X.Y.Z] - YYYY-MM-DD)
61
+ bad_entries=$(grep -E '## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | grep -v ' - [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}' || true)
62
+ if [ -n "$bad_entries" ]; then
63
+ echo "::error::Version entries must have dates (## [X.Y.Z] - YYYY-MM-DD)"
64
+ echo "$bad_entries"
65
+ exit 1
66
+ fi
67
+
68
+ echo "Changelog format valid"
69
+
70
+ version:
71
+ name: Version
72
+ runs-on: ubuntu-latest
73
+ steps:
74
+ - uses: actions/checkout@v4
75
+ - name: Set up Ruby
76
+ uses: ruby/setup-ruby@v1
77
+ with:
78
+ ruby-version: '3.4'
79
+ bundler-cache: true
80
+ - name: Check version consistency
81
+ run: |
82
+ VERSION=$(ruby -r./lib/reviewer/version -e "puts Reviewer::VERSION")
24
83
 
84
+ # If version has a CHANGELOG entry, it should have a date
85
+ if grep -q "\[${VERSION}\]" CHANGELOG.md; then
86
+ # Verify the version entry includes a date (YYYY-MM-DD)
87
+ if ! grep "\[${VERSION}\]" CHANGELOG.md | grep -q ' - [0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}'; then
88
+ echo "::error::Version ${VERSION} in CHANGELOG is missing release date"
89
+ exit 1
90
+ fi
91
+ echo "Version ${VERSION} has dated changelog entry"
92
+ else
93
+ echo "Version ${VERSION} not yet released (under Unreleased section)"
94
+ fi
@@ -0,0 +1,98 @@
1
+ name: Release
2
+
3
+ on:
4
+ push:
5
+ tags:
6
+ - 'v*'
7
+
8
+ jobs:
9
+ validate:
10
+ name: Validate
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v4
14
+ with:
15
+ fetch-depth: 0
16
+ - name: Verify tag is on main branch
17
+ run: |
18
+ TAG_COMMIT=$(git rev-list -n 1 ${{ github.ref }})
19
+ if ! git merge-base --is-ancestor $TAG_COMMIT origin/main; then
20
+ echo "::error::Release tags must point to a commit on the main branch."
21
+ echo "::error::This ensures the code has passed CI before release."
22
+ exit 1
23
+ fi
24
+ echo "Tag points to commit on main branch"
25
+
26
+ publish:
27
+ name: Publish
28
+ needs: validate
29
+ runs-on: ubuntu-latest
30
+ environment: rubygems
31
+ permissions:
32
+ id-token: write
33
+ contents: read
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ - name: Set up Ruby
37
+ uses: ruby/setup-ruby@v1
38
+ with:
39
+ ruby-version: '3.4'
40
+ bundler-cache: true
41
+ - name: Build gem
42
+ run: gem build reviewer.gemspec
43
+ - name: Push to RubyGems
44
+ uses: rubygems/release-gem@v1
45
+
46
+ github-release:
47
+ name: GitHub Release
48
+ needs: publish
49
+ runs-on: ubuntu-latest
50
+ permissions:
51
+ contents: write
52
+ steps:
53
+ - uses: actions/checkout@v4
54
+ - name: Extract version from tag
55
+ id: version
56
+ run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
57
+ - name: Extract changelog for version
58
+ id: changelog
59
+ run: |
60
+ # Extract the section for this version from CHANGELOG.md
61
+ version="${{ steps.version.outputs.version }}"
62
+ changelog=$(awk -v ver="$version" '
63
+ /^## \[/ {
64
+ if (found) exit
65
+ if ($0 ~ "\\[" ver "\\]") found=1
66
+ next
67
+ }
68
+ found { print }
69
+ ' CHANGELOG.md)
70
+
71
+ # Handle multi-line output
72
+ {
73
+ echo "content<<EOF"
74
+ echo "$changelog"
75
+ echo "EOF"
76
+ } >> $GITHUB_OUTPUT
77
+ - name: Create GitHub Release
78
+ uses: softprops/action-gh-release@v2
79
+ with:
80
+ name: v${{ steps.version.outputs.version }}
81
+ body: |
82
+ ## Changes
83
+
84
+ ${{ steps.changelog.outputs.content }}
85
+
86
+ ## Installation
87
+
88
+ ```bash
89
+ gem install reviewer -v ${{ steps.version.outputs.version }}
90
+ ```
91
+
92
+ Or add to your Gemfile:
93
+
94
+ ```ruby
95
+ gem 'reviewer', '~> ${{ steps.version.outputs.version }}'
96
+ ```
97
+ draft: false
98
+ prerelease: false
data/.gitignore CHANGED
@@ -10,4 +10,4 @@
10
10
  .reviewer_history.yml
11
11
  .reviewer_history_test.yml
12
12
  coverage
13
- Gemfile.lock
13
+ /Gemfile.lock
data/.inch.yml CHANGED
@@ -1,4 +1,6 @@
1
1
  files:
2
- # define files included in the analysis (defaults to ["{app,lib}/**/*.rb"])
3
2
  included:
4
3
  - lib/**/*.rb
4
+ excluded:
5
+ # Data.define classes are not properly recognized by YARD/inch
6
+ - lib/reviewer/runner/result.rb
data/.reek.yml ADDED
@@ -0,0 +1,175 @@
1
+ # Reek configuration for Reviewer gem
2
+ # https://github.com/troessner/reek/blob/master/docs/defaults.reek.yml
3
+ #
4
+ # Policy: every detector enabled. Exclusions are method- or class-level
5
+ # with justification. New code is always checked against defaults.
6
+
7
+ detectors:
8
+
9
+ # --- Targeted exclusions: writable attributes ---
10
+
11
+ # Mutable command type for re-execution and strategy swappable for
12
+ # test injection / rerun_via_passthrough.
13
+ Attribute:
14
+ exclude:
15
+ - 'Reviewer::Arguments::Keywords' # Tools wired post-construction to break circular dependency
16
+ - 'Reviewer::Command' # Mutable command type for re-execution
17
+ - 'Reviewer::Configuration' # Writable for Reviewer.configure block and tests
18
+ - 'Reviewer::Runner' # Strategy swappable for test injection
19
+ - 'Reviewer::Shell::Result' # Shell rescue paths set exit_status when no Process::Status exists
20
+
21
+ # --- Targeted exclusions: control parameters ---
22
+
23
+ # DI fallback patterns (arg || default) and boolean->value mapping.
24
+ ControlParameter:
25
+ exclude:
26
+ - 'Reviewer::Arguments#runner_strategy' # Strategy selection from boolean
27
+ - 'Reviewer::Batch#strategy' # Boolean -> strategy mapping
28
+ - 'Reviewer::Output::Formatting#status_mark' # Boolean -> symbol mapping
29
+ - 'Reviewer::Output::Formatting#status_style' # Boolean -> symbol mapping
30
+ - 'Reviewer::Doctor::OpportunityCheck#catalog_supports?' # Type-based capability query
31
+ - 'Reviewer::Tool::Settings#initialize' # DI: optional config hash
32
+ - 'Reviewer::Runner::Strategies::Captured#finish_progress_bar' # Timed/untimed display
33
+
34
+ # --- Targeted exclusions: repeated conditionals ---
35
+
36
+ # TTY guard checks are inherent to progress bar styling — each method
37
+ # independently decides whether to emit ANSI codes.
38
+ RepeatedConditional:
39
+ exclude:
40
+ - 'Reviewer::Runner::Strategies::Captured' # style_enabled? TTY guard
41
+
42
+ # --- Targeted exclusions: nil checks ---
43
+
44
+ # IO.console genuinely returns nil in non-TTY environments.
45
+ NilCheck:
46
+ exclude:
47
+ - 'Reviewer::Output#console_width' # IO.console returns nil in non-TTY
48
+
49
+ # --- Targeted exclusions: test classes ---
50
+
51
+ # Test classes are self-documenting via test method names.
52
+ IrresponsibleModule:
53
+ exclude:
54
+ - 'Reviewer::Doctor::KeywordCheckTest'
55
+ - 'Reviewer::Session::FormatterTest'
56
+
57
+ # --- Targeted exclusions: utility functions ---
58
+
59
+ # Private helpers that logically belong to their class despite not
60
+ # referencing self. Moving these to separate classes would be
61
+ # over-engineering for one-use helpers.
62
+ UtilityFunction:
63
+ exclude:
64
+ - 'Reviewer::Arguments#configure_input_options' # Slop DSL config block
65
+ - 'Reviewer::Arguments#configure_output_options' # Slop DSL config block
66
+ - 'Reviewer::Capabilities#tool_data' # Tool -> hash transform
67
+ - 'Reviewer::Command::String::Env#needs_quotes?' # String analysis helper
68
+ - 'Reviewer::Command::String::Flags#needs_quotes?' # String analysis helper
69
+ - 'Reviewer::Doctor::OpportunityCheck#catalog_supports?' # Catalog query helper
70
+ - 'Reviewer::Doctor::ToolInventory#command_summary' # Formatting helper
71
+ - 'Reviewer::Output#console_width' # IO.console query
72
+ - 'Reviewer::Output::Formatting#format_duration' # Number formatting
73
+ - 'Reviewer::Output::Formatting#pluralize' # String formatting
74
+ - 'Reviewer::Setup::GemfileLock#process_line' # Lockfile line parser
75
+ - 'Reviewer::Setup::ToolBlock#needs_quoting?' # YAML string analysis
76
+ - 'Reviewer::Runner::Strategies::Captured#update_progress' # Progress bar update
77
+ - 'Reviewer::Shell::Timer#record' # Benchmark.realtime wrapper
78
+
79
+ # --- Targeted exclusions: feature envy and dispatch ---
80
+
81
+ # Methods whose purpose IS to operate on their inputs.
82
+ FeatureEnvy:
83
+ exclude:
84
+ - 'Reviewer::Command::String::Env#env' # Key-value formatting
85
+ - 'Reviewer::Doctor::OpportunityCheck#check_missing_files_config' # Tool property inspection
86
+ - 'Reviewer::Doctor::OpportunityCheck#check_missing_format_command' # Tool property inspection
87
+ - 'Reviewer::Output::Printer#write_raw' # Stream pass-through
88
+ - 'Reviewer::Session#build_suggestions' # each_with_object iteration
89
+ - 'Reviewer::Session#show_missing_tools' # Guard + formatter delegation
90
+ - 'Reviewer::Setup::ToolBlock#apply_js_runner' # String substitution on input
91
+ - 'Reviewer::Setup::ToolBlock#quote' # YAML quoting on input string
92
+ - 'Reviewer::Tool::Timing#average_time' # Array computation
93
+ - 'Reviewer::Runner::Strategies::Captured#finish_progress_bar' # Operates on bar parameter
94
+
95
+
96
+ # Intentional dynamic dispatch via respond_to?/send.
97
+ ManualDispatch:
98
+ exclude:
99
+ - 'Reviewer::Arguments::Files#from_keywords' # Maps keyword strings to git methods
100
+ - 'Reviewer::Output::Printer#initialize' # Defensive sync= guard for non-IO streams
101
+ - 'Reviewer::Prompt#interactive?' # TTY availability check
102
+
103
+ # --- Targeted exclusions: size metrics ---
104
+
105
+ # Printer's (style, content) parameters co-travel by design --
106
+ # "what to display" and "how to display it" are not a missing abstraction.
107
+ DataClump:
108
+ exclude:
109
+ - 'Reviewer::Output::Printer'
110
+
111
+ # DI constructors store each dependency as an ivar.
112
+ TooManyInstanceVariables:
113
+ exclude:
114
+ - 'Reviewer::Batch' # 5: command_type + tools + strategy + context + report
115
+ - 'Reviewer::Command' # 5: tool + type + seed + arguments + history
116
+ - 'Reviewer::Runner' # 6: command + strategy + shell + context + skipped + missing
117
+ - 'Reviewer::Tools' # 5: tags + tool_names + arguments + history + config_file
118
+
119
+ # ANSI escape sequence module -- 6 constants is the natural decomposition.
120
+ TooManyConstants:
121
+ exclude:
122
+ - 'Reviewer::Output::AnsiStyles'
123
+
124
+ # Classes with cohesive accessor/query interfaces that exceed default (15).
125
+ TooManyMethods:
126
+ exclude:
127
+ - 'Reviewer::Output' # 20: delegation hub
128
+ - 'Reviewer::Runner' # 21: execution host + queries
129
+ - 'Reviewer::Session' # 19: lifecycle orchestrator
130
+ - 'Reviewer::Tool' # 18: settings + history + files
131
+ - 'Reviewer::Tool::Settings' # 22: config accessor layer
132
+ - 'Reviewer::Tools' # 16: collection with filters
133
+
134
+ # Orchestration methods that exceed default (5) but are clear and linear.
135
+ TooManyStatements:
136
+ max_statements: 7
137
+ exclude:
138
+ - 'Reviewer::Batch::Formatter#missing_tools' # 8: iterate tools with header/footer
139
+ - 'Reviewer::Doctor::Formatter#print_finding' # 8: extract 3 fields + format 3 lines
140
+ - 'Reviewer::Session#run_json' # 8: early exits + lifecycle steps
141
+ - 'Reviewer::Session#run_text' # 9: lifecycle steps
142
+ - 'Reviewer::Setup' # 9: setup orchestrator
143
+ - 'Reviewer::Shell#direct' # 10: Open3 wrapper + error handling
144
+ - 'Reviewer::Runner::Strategies::Captured#create_progress_bar' # 9: timed/untimed bar with TTY format
145
+
146
+ # Formatter spacing (output.newline 3x).
147
+ DuplicateMethodCall:
148
+ max_calls: 2
149
+ exclude:
150
+ - 'Reviewer::Runner::Strategies::Captured#show_captured_stdout' # runner.output 3x — caching obscures origin
151
+ - 'Reviewer::Setup::Formatter' # output.newline 3x for visual spacing
152
+
153
+ # --- Targeted exclusions: parameter counts ---
154
+
155
+ # DI constructors accept injected dependencies. Default max_params (3)
156
+ # is too low for classes with 5-6 dependencies. Reek has a separate
157
+ # default for initialize (5); override to accommodate DI constructors.
158
+ LongParameterList:
159
+ max_params: 5
160
+ overrides:
161
+ initialize:
162
+ max_params: 7
163
+
164
+ # --- Name exclusions ---
165
+
166
+ # Tool() follows Ruby's kernel conversion convention (Integer(), Array()).
167
+ UncommunicativeMethodName:
168
+ exclude:
169
+ - 'Reviewer::Tool::Conversions'
170
+
171
+ # RuboCop enforces `e` for rescue variables. `_` is a standard discard.
172
+ UncommunicativeVariableName:
173
+ accept:
174
+ - e
175
+ - _
@@ -2,13 +2,15 @@
2
2
  # It can be handy to leave this section in your configuration file as a convenient reference.
3
3
  #
4
4
  # <command_key>: // ex. 'rubocop', 'bundler-audit', etc.
5
- # disabled: true // Optional. Tools are enabled by default
5
+ # skip_in_batch: true // Optional. Tools run in batch by default. Set to true to only run when explicitly named.
6
+ # disabled: true // Deprecated. Use skip_in_batch instead. Still supported as fallback.
6
7
  # name: // Optional. Will use the `command_key` if name isn't provided.
7
8
  # description: // Optional. Serves as a handy reminder for the purpose of the command.
8
9
  # tags: [ruby, dependencies] // Optional. Lets you run commands tagged with the same word.
9
10
  # links:
10
11
  # home: // Optional. A link to the home page for the tool.
11
12
  # install: // Optional. A link to the installation instructions for the tool.
13
+ # usage: // Optional. A link to the general usage instructions for the tool.
12
14
  # ignore_syntax: // Optional. A link to the syntax for ignoring some rules for small sections of code.
13
15
  # disable_syntax: // Optional. A link to the syntax for disabling entire rules for a tool.
14
16
  # commands:
@@ -16,20 +18,28 @@
16
18
  # prepare: // Optional. Command to run prior to the review phase. ex. 'bundle exec bundle-audit update'
17
19
  # review: // Required. The only truly required field because this is the whole point.
18
20
  # format: // Optional. Command to auto-update rule violations when possible.
19
- # quiet_option: // Optional, but strongly suggested. Helps keep output under control when running multiple tools.
21
+ # serve: // Optional. Command to start a local server with reports generated by the tool.
22
+ # generate: // Optional. Command to generate artifacts from the tool for viewing separately.
20
23
  # 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.
21
- # files_flag: // Optional, defaults to '' (empty string). The name of the flag used to pass subsets of files to the command.
22
- # files_separator: // Optional, defaults to ' ' (single space). The character used to separate lists of files and directories.
24
+ # files:
25
+ # flag: // Optional, defaults to '' (empty string). The name of the flag used to pass subsets of files to the command.
26
+ # separator: // Optional, defaults to ' ' (single space). The character used to separate lists of files and directories.
27
+ # pattern: // Optional. Glob pattern to filter files (e.g., '*.rb'). Only files matching this pattern are passed to the tool.
28
+ # map_to_tests: // Optional. Maps source files to test files. Values: 'minitest' (test/*_test.rb) or 'rspec' (spec/*_spec.rb).
23
29
  # 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.
24
30
  # example_one: value // - The names will automatically be capitalized, so you can freely use lower-case here.
25
31
  # example_one: value // - Reviewer is smart enough to handle string values with spaces and automatically quote them.
26
32
  # 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.
27
33
  # example_one: value // - Reviewer is smart enough to handle single-letter (-f) and multi-letter (--format) flags.
28
34
  # example_two: value // - It's highly-recommended to use the longer-name format for flags when possible to serve as self-documentation.
35
+ # example_three: // - If the flag doesn't need or have a value, leaving it blank will translate it to a flag without a value.
36
+ # other: // Optional. A way to specify paramters that don't follow the standard flags conventions.
37
+ # description: value // - The key (ex. 'description') only serves as documentation and won't be used. Instead, the raw value will be applied
38
+
29
39
 
30
40
  # In practice, a configuration block would look something like the block below.
31
41
  tool-name-key:
32
- disabled: true
42
+ skip_in_batch: true
33
43
  name: Tool
34
44
  description: A tool that finds issues and fixes code.
35
45
  tags: [syntax, security]
@@ -43,11 +53,16 @@ tool-name-key:
43
53
  prepare: 'bundle exec tool update'
44
54
  review: 'bundle exec tool'
45
55
  format: 'bundle exec tool --format'
46
- quiet_option: '--quiet'
47
56
  max_exit_status: 1
48
- files_flag: 'files'
49
- files_separator: ','
50
- env:
51
- report: false
52
- flags:
53
- format: json
57
+ files:
58
+ flag: 'files'
59
+ separator: ','
60
+ pattern: '*.rb'
61
+ map_to_tests: minitest
62
+ env:
63
+ report: false
64
+ flags:
65
+ format: json
66
+ verbose:
67
+ other:
68
+ example: '--example | other'