Skip to content

Commit ee50226

Browse files
jawshooahsds
authored andcommitted
Include template hook in RuboCop check
1 parent 0d79818 commit ee50226

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.overcommit.yml

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ PreCommit:
88
RuboCop:
99
enabled: true
1010
command: ['bundle', 'exec', 'rubocop']
11+
include:
12+
- '**/*.gemspec'
13+
- '**/*.rb'
14+
- '**/Gemfile'
15+
- template-dir/hooks/overcommit-hook
1116

1217
TravisLint:
1318
enabled: true

template-dir/hooks/overcommit-hook

+2
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ end
2727

2828
# Check if Overcommit should invoke a Bundler context for loading gems
2929
require 'yaml'
30+
# rubocop:disable Style/RescueModifier
3031
if gemfile = YAML.load_file('.overcommit.yml')['gemfile'] rescue nil
3132
ENV['BUNDLE_GEMFILE'] = gemfile
3233
require 'bundler/setup'
3334
end
35+
# rubocop:enable Style/RescueModifier
3436

3537
begin
3638
require 'overcommit'

0 commit comments

Comments
 (0)