Skip to content

Commit

Permalink
dev: Add Rubocop for linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-stytch committed Sep 11, 2023
1 parent 987e677 commit 9ee6e52
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -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 }
2 changes: 2 additions & 0 deletions stytch.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9ee6e52

Please sign in to comment.