Skip to content

Commit 5c8afe9

Browse files
committed
Switch to rubocop rake task
1 parent 11b32c2 commit 5c8afe9

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/checks.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ jobs:
2626
with:
2727
ruby-version: '2.7'
2828
bundler-cache: true
29-
- run: bundle exec rubocop --parallel
29+
- run: bundle exec rake rubocop
3030
- run: gem build --strict --verbose *.gemspec

Rakefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,16 @@ end
7777

7878
desc 'Prepare for a release'
7979
task 'release:prepare' => [:changelog]
80+
81+
begin
82+
require 'rubocop/rake_task'
83+
rescue LoadError
84+
# Do nothing if no required gem installed
85+
else
86+
RuboCop::RakeTask.new(:rubocop) do |task|
87+
# These make the rubocop experience maybe slightly less terrible
88+
task.options = ['--display-cop-names', '--display-style-guide', '--extra-details']
89+
# Use Rubocop's Github Actions formatter if possible
90+
task.formatters << 'github' if ENV['GITHUB_ACTIONS'] == 'true'
91+
end
92+
end

spec/facter/util/windows/network_utils_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
Ps = Struct.new(:PhysicalAddress, :PhysicalAddressLength)
3+
Ps = Struct.new(:PhysicalAddress, :PhysicalAddressLength) # rubocop:disable Naming/MethodName
44

55
describe NetworkUtils do
66
describe '#address_to_string' do

0 commit comments

Comments
 (0)