Skip to content

Commit e20c6bc

Browse files
authored
Enable all new cops (#13)
The list of not enabled cops printed when running "bundle e rake rubocop" was so long. Fixes - Gemspec/RequireMFA: metadata['rubygems_mfa_required'] must be set to 'true'. - Gemspec/AddRuntimeDependency: Use add_dependency instead of add_runtime_dependency. - Style/RedundantHeredocDelimiterQuotes: Remove the redundant heredoc delimiter quotes, use <<-RUBY instead.
1 parent 025572d commit e20c6bc

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ plugins:
33
- rubocop-rake
44

55
AllCops:
6+
NewCops: enable
67
Exclude:
78
- 'lib/rubocop/cop/gitlab_security/*.rb'
89
- 'spec/rubocop/cop/gitlab_security/*.rb'

rubocop-eightyfourcodes.gemspec

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Gem::Specification.new do |spec|
1616
spec.license = 'MIT'
1717
spec.required_ruby_version = '>= 2.6.0'
1818

19+
spec.metadata = {
20+
'rubygems_mfa_required' => 'true'
21+
}
22+
1923
# Specify which files should be added to the gem when it is released.
2024
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
2125
spec.files = Dir.chdir(__dir__) do
@@ -25,6 +29,6 @@ Gem::Specification.new do |spec|
2529
end
2630

2731
spec.require_paths = ['lib']
28-
spec.add_runtime_dependency 'rubocop'
32+
spec.add_dependency 'rubocop'
2933
spec.extra_rdoc_files = ['LICENSE.md', 'README.md']
3034
end

spec/rubocop/cop/eighty_four_codes/command_literal_injection_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
end
3636

3737
it 'allows %x without arguments' do
38-
expect_no_offenses(<<-'RUBY')
38+
expect_no_offenses(<<-RUBY)
3939
%x(cat /var/log/syslog)
4040
RUBY
4141
end
@@ -75,7 +75,7 @@
7575
end
7676

7777
it 'allows %x without arguments' do
78-
expect_no_offenses(<<-'RUBY')
78+
expect_no_offenses(<<-RUBY)
7979
`cat /var/log/syslog`
8080
RUBY
8181
end

0 commit comments

Comments
 (0)