Skip to content

Commit

Permalink
Merge pull request #77 from dlindahl/feature/rubocopify
Browse files Browse the repository at this point in the history
Add RuboCop
  • Loading branch information
tagliala authored Jan 9, 2024
2 parents 66dd71a + 6d0ec67 commit baf07d9
Show file tree
Hide file tree
Showing 10 changed files with 479 additions and 100 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.rubocop_todo.yml linguist-generated
32 changes: 32 additions & 0 deletions .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Rubocop

on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]

permissions:
contents: read

jobs:
rubocop:
name: Rubocop
runs-on: ${{ matrix.os }}
env:
BUNDLE_JOBS: 4
BUNDLE_RETRY: 3
strategy:
matrix:
os: [ubuntu-latest]
ruby-version: ['3.3']

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Ruby linter
run: bundle exec rubocop
24 changes: 24 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-packaging
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.0
NewCops: enable
DisplayStyleGuide: true
ExtraDetails: true
Exclude:
- 'gemfiles/**/*'
- 'vendor/bundle/**/*'

RSpec/FilePath:
CustomTransform:
OmniAuth: omniauth

RSpec/SpecFilePathFormat:
CustomTransform:
OmniAuth: omniauth
309 changes: 309 additions & 0 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,11 @@ gem 'rspec'
gem 'simplecov'
gem 'webmock'

gem 'rubocop'
gem 'rubocop-packaging'
gem 'rubocop-performance'
gem 'rubocop-rake'
gem 'rubocop-rspec'

# Specify your gem's dependencies in omniauth-cas.gemspec
gemspec
Loading

0 comments on commit baf07d9

Please sign in to comment.