Skip to content

Commit

Permalink
Update rubocop to a slightly less ancient version to allow us to use …
Browse files Browse the repository at this point in the history
…ruby-2.7 syntax (#442)

* Switch to theforeman-rubocop

* bundle exec rubocop --auto-gen-config

* Fix Lint/RedundantCop{Disable,Enable}Directive cops

* Fix Style/MethodDefParentheses cop

* Fix Naming/VariableName cop

* Disable Style/LambdaCall cop

It would make certain algebrick constructs feel clunky.

* Pin bundler to 2.4.22

* Fix Layout/ArgumentAlignment cop

* Fix Layout/EmptyLineAfterMagicComment cop

* Fix Layout/EmptyLinesAroundClassBody cop

* Fix Bundler/OrderedGems cop

* Fix Gemspec/OrderedDependencies cop

* Fix Gemspec/RequiredRubyVersion cop

* Fix Layout/AssignmentIndentation cop

* Fix Layout/ClosingHeredocIndentation cop

* Fix Layout/EmptyLineBetweenDefs cop

* Fix Layout/EmptyLinesAroundAccessModifier cop

* Fix Layout/EmptyLinesAroundBlockBody cop

* Fix Layout/EmptyLinesAroundMethodBody cop

* Fix Layout/EmptyLinesAroundModuleBody cop

* Fix Layout/EndAlignment cop

* Fix Layout/ExtraSpacing cop

* Fix Layout/EmptyLinesAroundExceptionHandlingKeywords cop

* Fix Layout/DotPosition cop

* Fix Layout/HeredocIndentation cop

* Fix Layout/LeadingEmptyLines cop

* Fix Layout/MultilineMethodCallBraceLayout, Layout/MultilineMethodCallIndentation, Layout/ClosingParenthesisIndentation cops

* Fix Layout/SpaceAroundOperators cop

* Fix Layout/SpaceBeforeComma cop

* Fix Layout/SpaceInLambdaLiteral cop

* Fix Layout/SpaceInsideBlockBraces cop

* Fix Layout/SpaceInsideHashLiteralBraces cop

* Fix Layout/SpaceInsideParens cop

* Fix Layout/SpaceInsideStringInterpolation cop

* Fix Layout/TrailingEmptyLines cop

* Fix Lint/AmbiguousBlockAssociation cop

* Fix Lint/AmbiguousOperator cop

* Fix Lint/AmbiguousRegexpLiteral cop

* Fix Lint/DisjunctiveAssignmentInConstructor cop

* Fix Lint/EmptyWhen cop

* Fix Lint/ParenthesesAsGroupedExpression cop

* Fix Lint/RedundantCopDisableDirective cop

* Fix Lint/RedundantRequireStatement cop

* Fix Lint/SendWithMixinArgument cop
  • Loading branch information
adamruzicka authored Jan 31, 2024
1 parent 150a23b commit 74335fb
Show file tree
Hide file tree
Showing 231 changed files with 1,579 additions and 1,186 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
ruby-version: 2.7
- name: Setup
run: |
gem install bundler -v 2.4.22
gem install bundler --version=2.4.22
bundle install --jobs=3 --retry=3
- name: Run rubocop
run: bundle exec rubocop
Expand Down
16 changes: 11 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,35 @@
inherit_from: .rubocop_todo.yml
inherit_gem:
theforeman-rubocop:
- lenient.yml

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.7

# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
Layout/ExtraSpacing:
Enabled: true

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: with_first_parameter, with_fixed_indentation
Style/AlignParameters:
Layout/ParameterAlignment:
Enabled: true

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
Style/MultilineOperationIndentation:
Layout/MultilineOperationIndentation:
Enabled: true

# Cop supports --auto-correct.
Style/EmptyLines:
Layout/EmptyLines:
Enabled: true

Metrics/ModuleLength:
Exclude:
- test/**/*

Style/LambdaCall:
Enabled: false
Loading

0 comments on commit 74335fb

Please sign in to comment.