Skip to content

Commit 34cd9da

Browse files
committed
Remove RuboCop control comments from overcommit executable
This is noise that shouldn't be shipped to every machine installing Overcommit. Change our RuboCop configuration to ignore the offense instead.
1 parent 7bf039b commit 34cd9da

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

.rubocop.yml

+4
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,10 @@ Style/PercentLiteralDelimiters:
117117
Style/PredicateName:
118118
Enabled: false
119119

120+
Style/RescueModifier:
121+
Exclude:
122+
- 'bin/overcommit'
123+
120124
Style/SignalException:
121125
Enabled: false
122126

bin/overcommit

-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
# Check if Overcommit should invoke a Bundler context for loading gems
44
require 'yaml'
5-
# rubocop:disable Style/RescueModifier
65
if gemfile = YAML.load_file('.overcommit.yml')['gemfile'] rescue nil
76
ENV['BUNDLE_GEMFILE'] = gemfile
87
require 'bundler'
@@ -30,7 +29,6 @@ if gemfile = YAML.load_file('.overcommit.yml')['gemfile'] rescue nil
3029
exec('bundle', 'exec', $0, *ARGV)
3130
end
3231
end
33-
# rubocop:enable Style/RescueModifier
3432

3533
begin
3634
require 'overcommit/cli'

0 commit comments

Comments
 (0)