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

[ELITERT-1198] Add action to run Ruby linters #3

Merged
merged 1 commit into from
Nov 4, 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
41 changes: 41 additions & 0 deletions .github/workflows/ruby-linters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This workflow runs Rubocop on the Pull Requests to make sure no linter warnings slip by.

name: Ruby Linters

on:
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
lint:

runs-on: ubuntu-latest

env:
BUNDLE_ONLY: linting

steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.7'
- name: Install Gems
run: |
bundler install
- name: Run Rubocop
continue-on-error: true
uses: reviewdog/action-rubocop@v2.19.1
with:
skip_install: true
rubocop_version: gemfile
rubocop_extensions: rubocop-rspec:gemfile
use_bundler: true
- name: reek
continue-on-error: true
uses: reviewdog/action-reek@v1
with:
reek_version: gemfile
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
AllCops:
Exclude:
- vendor/**/*
- spec/spec_helper.rb
Metrics/BlockLength:
Exclude:
Expand Down
9 changes: 6 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ gemspec

gem 'pry', '~>0'
gem 'rake', '~> 12.0'
gem 'reek', '~> 6'
gem 'rspec', '~> 3.0'
gem 'rubocop', '~> 1'
gem 'rubocop-rspec', '2'
gem 'simplecov', '~> 0.17.0'
gem 'yard', '~> 0'

group :linting do
gem 'reek', '~> 6'
gem 'rubocop', '~> 1'
gem 'rubocop-rspec', '~> 3'
end
Loading