reviewer 0.1.5 → 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 (87) hide show
  1. checksums.yaml +4 -4
  2. data/.github/FUNDING.yml +3 -0
  3. data/.github/workflows/main.yml +79 -11
  4. data/.github/workflows/release.yml +98 -0
  5. data/.gitignore +1 -1
  6. data/.inch.yml +3 -1
  7. data/.reek.yml +175 -0
  8. data/.reviewer.example.yml +7 -2
  9. data/.reviewer.yml +166 -40
  10. data/.rubocop.yml +34 -2
  11. data/CHANGELOG.md +42 -2
  12. data/Gemfile +39 -1
  13. data/Gemfile.lock +291 -70
  14. data/LICENSE.txt +20 -4
  15. data/README.md +310 -21
  16. data/RELEASING.md +190 -0
  17. data/Rakefile +117 -0
  18. data/dependency_decisions.yml +61 -0
  19. data/exe/fmt +1 -1
  20. data/exe/rvw +1 -1
  21. data/lib/reviewer/arguments/files.rb +47 -20
  22. data/lib/reviewer/arguments/keywords.rb +34 -41
  23. data/lib/reviewer/arguments/tags.rb +11 -11
  24. data/lib/reviewer/arguments.rb +100 -29
  25. data/lib/reviewer/batch/formatter.rb +87 -0
  26. data/lib/reviewer/batch.rb +32 -48
  27. data/lib/reviewer/capabilities.rb +81 -0
  28. data/lib/reviewer/command/string/env.rb +12 -6
  29. data/lib/reviewer/command/string/flags.rb +2 -4
  30. data/lib/reviewer/command/string.rb +47 -12
  31. data/lib/reviewer/command.rb +65 -10
  32. data/lib/reviewer/configuration/loader.rb +70 -0
  33. data/lib/reviewer/configuration.rb +6 -3
  34. data/lib/reviewer/context.rb +15 -0
  35. data/lib/reviewer/doctor/config_check.rb +46 -0
  36. data/lib/reviewer/doctor/environment_check.rb +58 -0
  37. data/lib/reviewer/doctor/formatter.rb +75 -0
  38. data/lib/reviewer/doctor/keyword_check.rb +85 -0
  39. data/lib/reviewer/doctor/opportunity_check.rb +88 -0
  40. data/lib/reviewer/doctor/report.rb +63 -0
  41. data/lib/reviewer/doctor/tool_inventory.rb +41 -0
  42. data/lib/reviewer/doctor.rb +28 -0
  43. data/lib/reviewer/history.rb +10 -17
  44. data/lib/reviewer/output/formatting.rb +40 -0
  45. data/lib/reviewer/output/printer.rb +70 -9
  46. data/lib/reviewer/output.rb +37 -78
  47. data/lib/reviewer/prompt.rb +38 -0
  48. data/lib/reviewer/report/formatter.rb +124 -0
  49. data/lib/reviewer/report.rb +100 -0
  50. data/lib/reviewer/runner/failed_files.rb +66 -0
  51. data/lib/reviewer/runner/formatter.rb +103 -0
  52. data/lib/reviewer/runner/guidance.rb +79 -0
  53. data/lib/reviewer/runner/result.rb +150 -0
  54. data/lib/reviewer/runner/strategies/captured.rb +98 -23
  55. data/lib/reviewer/runner/strategies/passthrough.rb +2 -11
  56. data/lib/reviewer/runner.rb +126 -40
  57. data/lib/reviewer/session/formatter.rb +87 -0
  58. data/lib/reviewer/session.rb +208 -0
  59. data/lib/reviewer/setup/catalog.rb +233 -0
  60. data/lib/reviewer/setup/detector.rb +61 -0
  61. data/lib/reviewer/setup/formatter.rb +94 -0
  62. data/lib/reviewer/setup/gemfile_lock.rb +55 -0
  63. data/lib/reviewer/setup/generator.rb +54 -0
  64. data/lib/reviewer/setup/tool_block.rb +112 -0
  65. data/lib/reviewer/setup.rb +41 -0
  66. data/lib/reviewer/shell/result.rb +14 -15
  67. data/lib/reviewer/shell/timer.rb +40 -35
  68. data/lib/reviewer/shell.rb +41 -12
  69. data/lib/reviewer/tool/conversions.rb +20 -0
  70. data/lib/reviewer/tool/file_resolver.rb +54 -0
  71. data/lib/reviewer/tool/settings.rb +88 -44
  72. data/lib/reviewer/tool/test_file_mapper.rb +73 -0
  73. data/lib/reviewer/tool/timing.rb +78 -0
  74. data/lib/reviewer/tool.rb +88 -69
  75. data/lib/reviewer/tools.rb +47 -33
  76. data/lib/reviewer/version.rb +1 -1
  77. data/lib/reviewer.rb +109 -50
  78. data/reviewer.gemspec +16 -19
  79. metadata +101 -142
  80. data/lib/reviewer/conversions.rb +0 -16
  81. data/lib/reviewer/guidance.rb +0 -77
  82. data/lib/reviewer/keywords/git/staged.rb +0 -64
  83. data/lib/reviewer/keywords/git.rb +0 -14
  84. data/lib/reviewer/keywords.rb +0 -9
  85. data/lib/reviewer/loader.rb +0 -59
  86. data/lib/reviewer/output/scrubber.rb +0 -48
  87. data/lib/reviewer/output/token.rb +0 -85
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4269dc4784c9a22232bd47db41cff0bf7d57b023ee50dc5fc455a650fb138b2a
4
- data.tar.gz: 73d9261188abd69db6aa23aa7db6f76a59696b1dac3e35eb1a5615e013b40354
3
+ metadata.gz: 91c7ece2434c770297548056ba752092b0cc16427e0b94c35f58acb29efd304b
4
+ data.tar.gz: b303dd4164e6181f9bb8c583a6eb55836018c17e5361fadecdcd95efab09f3aa
5
5
  SHA512:
6
- metadata.gz: 66894ea63a67d4964e93a5ab83ce92b95e0757d38af05a1587e136d0cc2d61fcf146d2c30534ce3f58aa4f08ed406e328ecad1293a617df73b2d1167c6146782
7
- data.tar.gz: 0614f40cbd184e0e20aad58a8f4c320af3a5db358078cecdfac236047a0c85060b15b7dccbade7c599c4ebc030ea0eb4348d239fbbf3f25a48079f6f3a0464f7
6
+ metadata.gz: 47aa07e5a1e72001bcaa3f3b95319c0ca8c110ce894e99b731300f948e38139f8d807235a0be17e894763031e87c3a0a1459e91713cb31c9388b5494df200b25
7
+ data.tar.gz: dcddd952084467bcfcd6ad1d09edd9b8eea87352bc8ef5aae6e0655c77349cc99f6def176c65f7bfe1936f2371251e8a183e345e85a45d6dc95764415efea2a1
@@ -0,0 +1,3 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: garrettdimon
@@ -1,26 +1,94 @@
1
- name: Review
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:
4
9
 
5
10
  env:
6
11
  CI: true
7
12
 
8
13
  jobs:
9
- 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 }})
10
31
  strategy:
32
+ fail-fast: false
11
33
  matrix:
12
- ruby: [2.5.9, 2.6.9, 2.7.5, 3.0.3]
34
+ ruby: ['3.2', '3.3', '3.4', '4.0']
13
35
  runs-on: ubuntu-latest
14
36
  steps:
15
- - uses: actions/checkout@v2
37
+ - uses: actions/checkout@v4
16
38
  - name: Set up Ruby
17
39
  uses: ruby/setup-ruby@v1
18
40
  with:
19
41
  ruby-version: ${{ matrix.ruby }}
20
42
  bundler-cache: true
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
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")
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,7 +2,8 @@
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.
@@ -23,6 +24,8 @@
23
24
  # files:
24
25
  # flag: // Optional, defaults to '' (empty string). The name of the flag used to pass subsets of files to the command.
25
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).
26
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.
27
30
  # example_one: value // - The names will automatically be capitalized, so you can freely use lower-case here.
28
31
  # example_one: value // - Reviewer is smart enough to handle string values with spaces and automatically quote them.
@@ -36,7 +39,7 @@
36
39
 
37
40
  # In practice, a configuration block would look something like the block below.
38
41
  tool-name-key:
39
- disabled: true
42
+ skip_in_batch: true
40
43
  name: Tool
41
44
  description: A tool that finds issues and fixes code.
42
45
  tags: [syntax, security]
@@ -54,6 +57,8 @@ tool-name-key:
54
57
  files:
55
58
  flag: 'files'
56
59
  separator: ','
60
+ pattern: '*.rb'
61
+ map_to_tests: minitest
57
62
  env:
58
63
  report: false
59
64
  flags: