Skip to content

Commit

Permalink
Add initial Rubocop config
Browse files Browse the repository at this point in the history
While I'm a big fan of consistent code formatting, and avoiding debates
with team mates about how to lay code out, I'm not generally a big fan
of many of Rubocop's defaults.

I've started out by disabling a large number of "cops". Rubocop still
prints a lot of warnings out, but I've silenced the vast quantity of its
complaints that I didn't feel were based on good ideas/nice style.

Some of them may get re-enabled in future, but with configuration that
tweaks them to suit the Ruby style I'm used to. And more will definitely
be disabled.
  • Loading branch information
gma committed Jan 23, 2025
1 parent cfd1555 commit 1631df7
Showing 1 changed file with 108 additions and 0 deletions.
108 changes: 108 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
AllCops:
Exclude:
- templates/plugins/Rakefile
- templates/plugins/plugin.gemspec
- test/fixtures/nesta-plugin-test/nesta-plugin-test.gemspec
TargetRubyVersion: 3.0

Layout/EmptyLineAfterGuardClause:
Enabled: false

Layout/FirstHashElementIndentation:
Enabled: false

Layout/HeredocIndentation:
Enabled: false

Layout/SpaceAfterNot:
Enabled: false

Lint/AmbiguousRegexpLiteral:
Enabled: false

Lint/SuppressedException:
Enabled: false

Lint/UnusedMethodArgument:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

Naming/FileName:
Enabled: false

Naming/HeredocDelimiterNaming:
Enabled: false

Style/BarePercentLiterals:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Style/Documentation:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/GuardClause:
Enabled: false

Style/HashSyntax:
EnforcedShorthandSyntax: never

Style/IfUnlessModifier:
Enabled: false

Style/MultilineIfModifier:
Enabled: false

Style/MutableConstant:
Enabled: false

Style/NegatedIf:
Enabled: false

Style/Next:
Enabled: false

Style/ParallelAssignment:
Enabled: false

Style/PercentLiteralDelimiters:
Enabled: false

Style/RedundantParentheses:
Enabled: false

Style/RedundantPercentQ:
Enabled: false

Style/RegexpLiteral:
Enabled: false

Style/SignalException:
Enabled: false

Style/StringConcatenation:
Enabled: false

Style/SymbolArray:
Enabled: false

Style/SymbolProc:
Enabled: false

Style/TernaryParentheses:
Enabled: false

Style/TrailingCommaInHashLiteral:
Enabled: false

Style/WordArray:
Enabled: false

0 comments on commit 1631df7

Please sign in to comment.