diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69e37560..130538db 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,8 @@ name: CI -on: [push, pull_request] +on: + pull_request: + branches: [ 'master' ] jobs: test: @@ -54,7 +56,7 @@ jobs: run: bin/bundler-audit --update - name: Security audit application code - run: bin/brakeman -q -w3 + run: bin/brakeman - name: Lint Ruby files - run: bundle exec rubocop --parallel + run: bin/rubocop diff --git a/.rubocop.yml b/.rubocop.yml index 6004acc2..25f5ca57 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,5 @@ -require: rubocop-rails -Style/FrozenStringLiteralComment: - Enabled: false -Style/Documentation: - Enabled: false -Layout/LineLength: - Max: 140 -EnforcedShorthandSyntax: never +# Omakase Ruby styling for Rails +inherit_gem: + rubocop-rails-omakase: rubocop.yml + +# Your own specialized rules go here diff --git a/Gemfile b/Gemfile index 6532d0f6..8e7641e2 100644 --- a/Gemfile +++ b/Gemfile @@ -67,3 +67,4 @@ end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] +gem "rubocop-rails-omakase", require: false, group: [ :development ] diff --git a/Gemfile.lock b/Gemfile.lock index fdb0f0b4..cd8fcbcf 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -230,11 +230,22 @@ GEM unicode-display_width (>= 2.4.0, < 3.0) rubocop-ast (1.30.0) parser (>= 3.2.1.0) + rubocop-minitest (0.34.5) + rubocop (>= 1.39, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) + rubocop-performance (1.20.2) + rubocop (>= 1.48.1, < 2.0) + rubocop-ast (>= 1.30.0, < 2.0) rubocop-rails (2.23.1) activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 1.33.0, < 2.0) rubocop-ast (>= 1.30.0, < 2.0) + rubocop-rails-omakase (1.0.0) + rubocop + rubocop-minitest + rubocop-performance + rubocop-rails ruby-progressbar (1.13.0) ruby-vips (2.2.0) ffi (~> 1.12) @@ -280,6 +291,7 @@ DEPENDENCIES rails-i18n rubocop rubocop-rails + rubocop-rails-omakase tzinfo-data RUBY VERSION