Skip to content

Commit 486a239

Browse files
committed
add rubocop-rspec plugin
1 parent 2b480ce commit 486a239

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
### 2.4.0 (Next)
22
- Fix `rubocop-performance` inclusion warning.
3-
- Improve recognition of Ruby support files.
3+
- Improve recognition of Ruby support files during filesystem parsing.
44
- Fix `file` task for no settings override usage.
55
- Minimum Ruby version increased to 3.0.
6+
- Add `rubocop-rspec` plugin to Ruby checks.
67

78
### 2.3.1
89
- No input target paths now defaults to current working directory instead of error.

lib/puppet-check/ruby_parser.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def self.ruby(files, style, rc_args)
2525
# check ruby style
2626
if style
2727
# check RuboCop and parse warnings' JSON output
28-
rubocop_warnings = Utils.capture_stdout { rubocop_cli.run(rc_args + ['--enable-pending-cops', '--plugin', 'rubocop-performance', '--format', 'json', file]) }
28+
rubocop_warnings = Utils.capture_stdout { rubocop_cli.run(rc_args + ['--enable-pending-cops', '--plugin', 'rubocop-performance', '--plugin', 'rubocop-rspec', '--format', 'json', file]) }
2929
rubocop_offenses = JSON.parse(rubocop_warnings)['files'][0]['offenses'].map { |warning| "#{warning['location']['line']}:#{warning['location']['column']} #{warning['message']}" }
3030

3131
# check Reek and parse warnings' JSON output

puppet-check.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ Gem::Specification.new do |spec|
1717
spec.add_dependency 'reek', '~> 6.0'
1818
spec.add_dependency 'rubocop', '~> 1.72'
1919
spec.add_dependency 'rubocop-performance', '~> 1.0'
20+
spec.add_dependency 'rubocop-rspec', '~> 3.0'
2021
# spec.add_development_dependency 'octocatalog-diff', '~> 2.0'
2122
spec.add_development_dependency 'rake', '~> 13.0'
2223
spec.add_development_dependency 'rspec', '~> 3.0'

0 commit comments

Comments
 (0)