Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates #17

Merged
merged 7 commits into from
Apr 13, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
367 changes: 367 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,367 @@
require:
- rubocop-disable_syntax

plugins:
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.1
NewCops: enable

# We use standard as a linter and formatter instead Rubocop.
# Also, we are explicitly disable all rubocop rules what
# already enabled in standard. And standard-performance.

# Standard rules. Style:

# Enforced by standard. Disable.
Style/StringLiterals:
Enabled: false

# Enforced by standard. Disable.
Style/HashSyntax:
Enabled: false

# Enforced by standard. Disable.
Style/NestedParenthesizedCalls:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantRegexpArgument:
Enabled: false

# Enforced by standard. Disable.
Style/PercentLiteralDelimiters:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantBegin:
Enabled: false

# Enforced by standard. Disable.
Style/SuperWithArgsParentheses:
Enabled: false

# Enforced by standard. Disable.
Style/Encoding:
Enabled: false

# Enforced by standard. Disable.
Style/NumericLiteralPrefix:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantParentheses:
Enabled: false

# Enforced by standard. Disable.
Style/EmptyMethod:
Enabled: false

# Enforced by standard. Disable.
Style/SingleLineMethods:
Enabled: false

# Enforced by standard. Disable.
Style/SafeNavigation:
Enabled: false

# Enforced by standard. Disable.
Style/RescueStandardError:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantSelf:
Enabled: false

# Enforced by standard. Disable.
Style/TernaryParentheses:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantLineContinuation:
Enabled: false

# Enforced by standard. Disable.
Style/SlicingWithRange:
Enabled: false

# Enforced by standard. Disable.
Style/MultilineIfModifier:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantCondition:
Enabled: false

# Enforced by standard. Disable.
Style/RedundantInterpolation:
Enabled: false

# Enforced by standard. Disable.
Style/OrAssignment:
Enabled: false

# Enforced by standard. Disable.
Style/ConditionalAssignment:
Enabled: false

# Enforced by standard. Disable.
Style/ItAssignment:
Enabled: false

# Enforced by standard. Disable.
Style/EachWithObject:
Enabled: false

# Enforced by standard. Disable.
Style/GlobalStdStream:
Enabled: false

# Enforced by standard. Disable.
Style/StringLiteralsInInterpolation:
Enabled: false

# Disabled as in standard.
Style/HashAsLastArrayItem:
Enabled: false

# Enforced by standard. Disable.
Style/Alias:
Enabled: false

# Standard rules. Layout:

# Enforced by standard. Disable.
Layout/HashAlignment:
Enabled: false

# Enforced by standard. Disable.
Layout/FirstArrayElementIndentation:
Enabled: false

# Enforced by standard. Disable.
Layout/SpaceInsideHashLiteralBraces:
Enabled: false

# Enforced by standard. Disable.
Layout/SpaceInsideStringInterpolation:
Enabled: false

# Enforced by standard. Disable.
Layout/DotPosition:
Enabled: false

# Enforced by standard. Disable.
Layout/ExtraSpacing:
Enabled: false

# Enforced by standard. Disable.
Layout/ArgumentAlignment:
Enabled: false

# Enforced by standard. Disable.
Layout/MultilineMethodCallBraceLayout:
Enabled: false

# Enforced by standard. Disable.
Layout/AccessModifierIndentation:
Enabled: false

# Enforced by standard. Disable.
Layout/FirstHashElementIndentation:
Enabled: false

# Enforced by standard. Disable.
Layout/IndentationWidth:
Enabled: false

# Enforced by standard. Disable.
Layout/ElseAlignment:
Enabled: false

# Enforced by standard. Disable.
Layout/EndAlignment:
Enabled: false

# Enforced by standard. Disable.
Layout/MultilineHashBraceLayout:
Enabled: false

# Enforced by standard. Disable.
Layout/EmptyLineBetweenDefs:
Enabled: false

# Enforced by standard. Disable.
Layout/MultilineArrayBraceLayout:
Enabled: false

# Enforced by standard. Disable.
Layout/EmptyLineAfterMagicComment:
Enabled: false

# Enforced by standard. Disable.
Layout/SpaceAroundOperators:
Enabled: false

# Enforced by standard. Disable.
Layout/ArrayAlignment:
Enabled: false

# Enforced by standard. Disable.
Layout/AssignmentIndentation:
Enabled: false

# Enforced by standard. Disable.
Layout/ClosingParenthesisIndentation:
Enabled: false

# Enforced by standard. Disable.
Layout/LineLength:
Enabled: false

# Enforced by standard. Disable.
Layout/MultilineMethodCallIndentation:
Enabled: false

# Enforced by standard. Disable.
Layout/CaseIndentation:
Enabled: false

# Standard rules. Lint:

# Enforced by standard. Disable.
Lint/ImplicitStringConcatenation:
Enabled: false

# Enforced by standard. Disable.
Lint/TripleQuotes:
Enabled: false

# Enforced by standard. Disable.
Lint/IneffectiveAccessModifier:
Enabled: false

# Enforced by standard. Disable.
Lint/SymbolConversion:
Enabled: false

# Enforced by rubocop and standard
Lint/CopDirectiveSyntax:
Enabled: true

# Enforced by standard. Disable.
Lint/DuplicateMethods:
Enabled: false

# Enforced by standard. Disable.
Lint/ConstantDefinitionInBlock:
Enabled: false

# Enforced by standard. Disable.
Lint/UselessTimes:
Enabled: false

# Standard-performance rules.

# Enforced by standard-performance. Disable.
Performance/Detect:
Enabled: false

# Enforced by standard-performance. Disable.
Performance/StringIdentifierArgument:
Enabled: false

# Enforced by standard-performance. Disable.
Performance/RegexpMatch:
Enabled: false

# Always enable rubocop Security:

# Enforced by rubocop and standard
Security/JSONLoad:
Enabled: true

# Our rubocop rules

# Bundler rules.

Bundler/OrderedGems:
Enabled: false

# Gemspec rules

Gemspec/OrderedDependencies:
Enabled: false

# Style rules

# Don't allow %i[foo bar baz]
Style/SymbolArray:
Enabled: true
EnforcedStyle: brackets

# Don't allow %w[foo bar baz]
Style/WordArray:
Enabled: true
EnforcedStyle: brackets

# Disable warnings like "Missing top-level documentation comment for"
Style/Documentation:
Enabled: false

# Disable as in standard.
Style/ArgumentsForwarding:
Enabled: false

# RSpec rules

# Prefer eq over be.
RSpec/BeEq:
Enabled: false

# Prefer eq over eql.
RSpec/BeEql:
Enabled: false

# We prefer to use `expect` over `allow`.
RSpec/StubbedMock:
Enabled: false

# We prefer multiple before blocks in tests.
RSpec/ScatteredSetup:
Enabled: false

# We use `expect` in before hooks.
RSpec/ExpectInHook:
Enabled: false

# We use item_1, item_2, etc. Disable.
RSpec/IndexedLet:
Enabled: false

# We don't use named subject's
RSpec/NamedSubject:
Enabled: false

# Naming rules:

# Disable anonymous block forwarding.
Naming/BlockForwarding:
Enabled: true
EnforcedStyle: explicit

# Enable and exclude specific files.
Naming/FileName:
Enabled: true

# Disabled syntax:

# Disable shorthand hash syntax like: ({ x:, y: })
# Disable % style literals
Style/DisableSyntax:
DisableSyntax:
- shorthand_hash_syntax
- percent_literals
7 changes: 6 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,10 @@ gemspec

gem "rake"
gem "rspec"
gem "standard"
gem "simplecov", require: false
gem "standard", require: false
gem "rubocop", require: false
gem "rubocop-disable_syntax", require: false
gem "rubocop-performance", require: false
gem "rubocop-rake", require: false
gem "rubocop-rspec", require: false
Loading