Skip to content

Commit b2153ba

Browse files
tuxmeajay7x
authored andcommitted
add rubocop rake task
1 parent 3c325f9 commit b2153ba

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
bundler-cache: true
2828
- name: Display Ruby environment
2929
run: bundle env
30+
- name: Run rake rubocop
31+
run: bundle exec rake rubocop
3032
- name: Validate code
3133
run: bundle exec rake generate
3234
env:

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ group(:unknown) do
3333
end
3434

3535
group(:development) do
36+
gem 'rubocop-rake', require: false
3637
gem 'voxpupuli-rubocop', '~> 5.1.0'
3738
end
3839

Rakefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ require 'yaml'
77
require 'puppet_docs/config'
88
require 'rake/clean'
99

10+
require 'rubocop/rake_task'
11+
12+
RuboCop::RakeTask.new do |task|
13+
task.plugins << 'rubocop-rake'
14+
end
15+
1016
CLOBBER.include('output')
1117
CLOBBER.include('externalsources')
1218
CLOBBER.include('references_output')
@@ -129,7 +135,7 @@ namespace :externalsources do
129135
local_repo = safe_dirname(info['repo'])
130136
unless File.directory?(workdir)
131137
puts "Making new working directory for #{url}"
132-
system ("\"#{top_dir}/bin/git-new-workdir.sh\" '#{local_repo}' '#{workdir}' '#{info['commit']}'")
138+
system("\"#{top_dir}/bin/git-new-workdir.sh\" '#{local_repo}' '#{workdir}' '#{info['commit']}'")
133139
end
134140
Dir.chdir(workdir) do
135141
puts "Updating #{url}"

0 commit comments

Comments
 (0)