Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup rubocop #99

Merged
merged 1 commit into from
Nov 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ on:
env:
RSPEC_CI: true
jobs:
rubocop:
name: Rubocop
runs-on: 'ubuntu-20.04'
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
- run: script/update_rubygems_and_install_bundler
- run: bundle install
- run: bundle exec rubocop -c .rubocop.yml

test:
name: Ruby ${{ matrix.ruby }} ${{ matrix.name_extra || '' }}
runs-on: ${{ matrix.os || 'ubuntu-20.04' }}
Expand Down Expand Up @@ -51,5 +63,6 @@ jobs:
bundler: ${{ matrix.bundler || 2 }}
ruby-version: ${{ matrix.ruby }}
- run: script/update_rubygems_and_install_bundler
- run: bundle install --binstubs --standalone
- run: bundle install --standalone
- run: bundle binstubs --all
- run: script/test_all
46 changes: 46 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
AllCops:
NewCops: enable
SuggestExtensions: false

Metrics/BlockLength:
Enabled: true
Exclude:
- spec/**/*_spec.rb

Layout/LineLength:
Max: 120

Lint/NestedMethodDefinition:
Exclude:
- lib/rspec/its.rb

Lint/SendWithMixinArgument:
Exclude:
- lib/rspec/its.rb

Metrics/AbcSize:
Exclude:
- lib/rspec/its.rb

Metrics/MethodLength:
Max: 25

Naming/PredicateName:
Exclude:
- lib/rspec/its.rb

Style/CaseEquality:
Exclude:
- lib/rspec/its/subject.rb

Style/SignalException:
Exclude:
- features/**/*.rb

Style/SpecialGlobalVars:
Exclude:
- rspec-its.gemspec

# We don't care about single vs double quotes.
Style/StringLiterals:
Enabled: false
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ gem 'cucumber', '>= 1.3.8'
gem 'ffi', '~> 1.17.0'
gem 'matrix', '~> 0.4.2'
gem 'rake', '~> 13.2.0'
gem 'rubocop', '~> 1.68.0'
Loading