Skip to content

Commit

Permalink
Rubocop CI, autocorrect, and new todo
Browse files Browse the repository at this point in the history
  • Loading branch information
mullermp committed Jun 5, 2024
1 parent 88883cf commit 32c506d
Show file tree
Hide file tree
Showing 40 changed files with 1,245 additions and 1,060 deletions.
21 changes: 18 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- master

env:
ruby_version: 3.3

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -23,8 +26,20 @@ jobs:

- uses: actions/checkout@v4

- name: Install gems
run: bundle install

- name: Tests
run: ENV=CI bundle exec rake spec

rubocop:
runs-on: ubuntu-latest

steps:
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ env.ruby_version }}
bundler-cache: true

- uses: actions/checkout@v4

- name: Rubocop
run: ENV=CI bundle exec rubocop
95 changes: 8 additions & 87 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,14 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-rake
- rubocop-rspec

AllCops:
NewCops: enable
TargetRubyVersion: 2.5
DisplayCopNames: true
Exclude:
- 'bin/**'
- 'vendor/**/*'
- '**/huffman_statemachine.rb'

Layout/IndentHeredoc:
Exclude:
- 'lib/tasks/generate_huffman_table.rb'
- 'example/*'

Metrics/LineLength:
Max: 120

Metrics/BlockLength:
Max: 700

Layout/EndAlignment:
EnforcedStyleAlignWith: variable

Layout/CaseIndentation:
EnforcedStyle: end

Layout/IndentHash:
EnforcedStyle: consistent

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: comma

Layout/SpaceAroundOperators:
Enabled: false

Layout/ExtraSpacing:
Enabled: false

Layout/EmptyLinesAroundExceptionHandlingKeywords:
Enabled: false

Naming/UncommunicativeMethodParamName:
Enabled: false

Style/SignalException:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/ParallelAssignment:
Enabled: false

Style/ParenthesesAroundCondition:
Enabled: false

Style/IfInsideElse:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/MultilineIfModifier:
Enabled: false

Lint/EmptyWhen:
Enabled: false

Style/TrailingCommaInArguments:
Enabled: false

Style/TrailingUnderscoreVariable:
Enabled: false

Style/SymbolArray:
Enabled: false

Style/CommentedKeyword:
Enabled: false

Style/PercentLiteralDelimiters:
Enabled: false

Performance/TimesMap:
Enabled: false

Performance/RedundantBlockCall:
Enabled: false
- 'lib/http/2/huffman_statemachine.rb'

Gemspec/RequireMFA:
Enabled: false
Loading

0 comments on commit 32c506d

Please sign in to comment.