diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 50e78c0..7baa4f8 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -26,3 +26,16 @@ jobs: bundler-cache: true - run: bundle exec rspec + + - uses: actions/checkout@v3 + + lint: + runs-on: ubuntu-latest + steps: + - uses: ruby/setup-ruby@v1 + with: + # Match the minimum supported Ruby version in the gemspec. + ruby-version: '2.7' + bundler-cache: true + + - run: bundle exec rubocop diff --git a/.rubocop.yml b/.rubocop.yml new file mode 100644 index 0000000..dd0cfb5 --- /dev/null +++ b/.rubocop.yml @@ -0,0 +1,15 @@ +require: + - rubocop-rspec + +AllCops: + NewCops: disable + # The target Ruby version must match the one in stytch.gemspec. + TargetRubyVersion: 2.7 + +Layout: { Enabled: false } +Metrics: { Enabled: false } +Style: { Enabled: false } + +RSpec/DescribedClass: { Enabled: false } +RSpec/ExampleLength: { Enabled: false } +RSpec/MultipleExpectations: { Enabled: false } diff --git a/stytch.gemspec b/stytch.gemspec index b3bc21e..48564a1 100644 --- a/stytch.gemspec +++ b/stytch.gemspec @@ -30,4 +30,6 @@ Gem::Specification.new do |spec| spec.add_dependency 'jwt', '>= 2.3.0' spec.add_development_dependency 'rspec', '~> 3.11.0' + spec.add_development_dependency 'rubocop', '1.56.3' + spec.add_development_dependency 'rubocop-rspec', '2.24.0' end