Add RuboCop

This commit is contained in:
Patrick Gansterer 2021-03-01 13:41:50 +01:00
parent 9a7d4bf07d
commit fa63e6e81d
5 changed files with 2503 additions and 0 deletions

17
.github/workflows/rubocop.yml vendored Normal file
View File

@ -0,0 +1,17 @@
name: RuboCop
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop --format github --parallel

12
.rubocop.yml Normal file
View File

@ -0,0 +1,12 @@
inherit_from: .rubocop_todo.yml
require:
- rubocop-rails
- rubocop-rspec
AllCops:
NewCops: enable
Gemspec/OrderedDependencies:
Exclude:
- 'plugins/*/*.gemspec'

2443
.rubocop_todo.yml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -90,6 +90,9 @@ group :development do
end
group :development, :test do
gem 'rubocop', require: false
gem 'rubocop-rails', require: false
gem 'rubocop-rspec', require: false
gem 'ruby-prof', require: false
# allow to use `debugger` https://github.com/conradirwin/pry-rescue

View File

@ -126,6 +126,7 @@ GEM
capybara (~> 3.13, < 4)
websocket-driver (>= 0.6.5)
arel (9.0.0)
ast (2.4.2)
attribute_normalizer (1.2.0)
base32 (0.3.4)
better_errors (2.9.1)
@ -313,6 +314,9 @@ GEM
nokogiri (1.11.1)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
parallel (1.20.1)
parser (3.0.0.0)
ast (~> 2.4.1)
pdf-core (0.9.0)
polyglot (0.3.5)
prawn (2.4.0)
@ -404,6 +408,7 @@ GEM
redis-namespace (~> 1.6)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
rexml (3.2.4)
roo (2.8.3)
nokogiri (~> 1)
rubyzip (>= 1.3.0, < 3.0.0)
@ -434,9 +439,28 @@ GEM
rspec-rerun (1.1.0)
rspec (~> 3.0)
rspec-support (3.10.2)
rubocop (1.11.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.2.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.4.1)
parser (>= 2.7.1.5)
rubocop-rails (2.9.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 0.90.0, < 2.0)
rubocop-rspec (2.2.0)
rubocop (~> 1.0)
rubocop-ast (>= 1.1.0)
ruby-filemagic (0.7.2)
ruby-ole (1.2.12.2)
ruby-prof (1.4.3)
ruby-progressbar (1.11.0)
ruby-units (2.3.2)
ruby2_keywords (0.0.4)
ruby_parser (3.15.1)
@ -515,6 +539,7 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.7)
unicode-display_width (2.0.0)
uniform_notifier (1.13.2)
vegas (0.1.11)
rack (>= 1.0.0)
@ -605,6 +630,9 @@ DEPENDENCIES
rspec-core
rspec-rails
rspec-rerun
rubocop
rubocop-rails
rubocop-rspec
ruby-filemagic
ruby-prof
ruby-units