File tree Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Expand file tree Collapse file tree 4 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -15,16 +15,19 @@ jobs:
1515 name : Rake Checks
1616 runs-on : ubuntu-24.04
1717 steps :
18+ # needs fetch-depth because the packaging dem reads old git tags
1819 - name : Checkout current PR
1920 uses : actions/checkout@v4
21+ with :
22+ fetch-depth : 0
2023 - name : Install Ruby version 3.3
2124 uses : ruby/setup-ruby@v1
2225 with :
2326 ruby-version : 3.3
2427 bundler-cache : true
2528 - name : Validate code
2629 run : |
27- bundle exec rake rubocop --trace
30+ bundle exec rake rubocop
2831 bundle exec rake -T | grep vox:build
2932 bundle exec rake -T | grep vox:promote
3033 bundle exec rake -T | grep vox:tag
Original file line number Diff line number Diff line change @@ -8,8 +8,12 @@ AllCops:
88 - ' resources/**/*.rb'
99 - ' ext/**/*'
1010 - ' vendor/**/*'
11+ - ' .vendor/**/*'
1112 - ' bundle/**/*'
1213
14+ plugins :
15+ - rubocop-rake
16+
1317Layout/ArgumentAlignment :
1418 Enabled : false
1519
Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ gem 'rake'
1717gem 'json'
1818gem 'octokit'
1919gem 'rubocop' , "~> 1.22"
20+ gem 'rubocop-rake'
2021
2122eval_gemfile ( "#{ __FILE__ } .local" ) if File . exist? ( "#{ __FILE__ } .local" )
Original file line number Diff line number Diff line change @@ -39,12 +39,12 @@ load './ext/release-lead.rake'
3939
4040Pkg ::Util ::RakeUtils . load_packaging_tasks
4141
42- desc 'run static analysis with rubocop'
43- task ( :rubocop ) do
44- require ' rubocop'
45- cli = RuboCop :: CLI . new
46- exit_code = cli . run ( %w( --display-cop-names --format simple ) )
47- raise "RuboCop detected offenses" if exit_code != 0
42+ require ' rubocop/rake_task '
43+ RuboCop :: RakeTask . new ( :rubocop ) do | task |
44+ # These make the rubocop experience maybe slightly less terrible
45+ task . options = [ '--display-cop-names' , '--display-style-guide' , '--extra-details' ]
46+ # Use Rubocop's Github Actions formatter if possible
47+ task . formatters << 'github' if ENV [ 'GITHUB_ACTIONS' ] == 'true'
4848end
4949
5050desc "verify that commit messages match CONTRIBUTING.md requirements"
You can’t perform that action at this time.
0 commit comments