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

Enabling new Rubocop checks #42

Open
skalee opened this issue Apr 7, 2021 · 0 comments · May be fixed by #70
Open

Enabling new Rubocop checks #42

skalee opened this issue Apr 7, 2021 · 0 comments · May be fixed by #70

Comments

@skalee
Copy link
Contributor

skalee commented Apr 7, 2021

Plenty of new code style checks have been added to Rubocop:

A detailed list
Lint/DuplicateBranch: # (new in 1.3)
  Enabled: true
Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1)
  Enabled: true
Lint/EmptyBlock: # (new in 1.1)
  Enabled: true
Lint/EmptyClass: # (new in 1.3)
  Enabled: true
Lint/NoReturnInBeginEndBlocks: # (new in 1.2)
  Enabled: true
Lint/ToEnumArguments: # (new in 1.1)
  Enabled: true
Lint/UnexpectedBlockArity: # (new in 1.5)
  Enabled: true
Lint/UnmodifiedReduceAccumulator: # (new in 1.1)
  Enabled: true
Style/ArgumentsForwarding: # (new in 1.1)
  Enabled: true
Style/CollectionCompact: # (new in 1.2)
  Enabled: true
Style/DocumentDynamicEvalDefinition: # (new in 1.1)
  Enabled: true
Style/NegatedIfElseCondition: # (new in 1.2)
  Enabled: true
Style/NilLambda: # (new in 1.3)
  Enabled: true
Style/RedundantArgument: # (new in 1.4)
  Enabled: true
Style/SwapValues: # (new in 1.1)
  Enabled: true
Performance/AncestorsInclude: # (new in 1.7)
  Enabled: true
Performance/BigDecimalWithNumericArgument: # (new in 1.7)
  Enabled: true
Performance/BlockGivenWithExplicitBlock: # (new in 1.9)
  Enabled: true
Performance/CollectionLiteralInLoop: # (new in 1.8)
  Enabled: true
Performance/ConstantRegexp: # (new in 1.9)
  Enabled: true
Performance/MethodObjectAsBlock: # (new in 1.9)
  Enabled: true
Performance/RedundantEqualityComparisonBlock: # (new in 1.10)
  Enabled: true
Performance/RedundantSortBlock: # (new in 1.7)
  Enabled: true
Performance/RedundantSplitRegexpArgument: # (new in 1.10)
  Enabled: true
Performance/RedundantStringChars: # (new in 1.7)
  Enabled: true
Performance/ReverseFirst: # (new in 1.7)
  Enabled: true
Performance/SortReverse: # (new in 1.7)
  Enabled: true
Performance/Squeeze: # (new in 1.7)
  Enabled: true
Performance/StringInclude: # (new in 1.7)
  Enabled: true
Performance/Sum: # (new in 1.8)
  Enabled: true

I want to enable checks at least from the Lint department, as they are typically very good in detecting code smells. Regarding other new checks, I can either enable all of them or some of them or just silence warnings about these new checks.

More details: https://docs.rubocop.org/rubocop/versioning.html.

ribose-jeffreylau added a commit that referenced this issue Nov 9, 2023
ribose-jeffreylau added a commit that referenced this issue Nov 9, 2023
ribose-jeffreylau added a commit that referenced this issue Nov 9, 2023
@ribose-jeffreylau ribose-jeffreylau linked a pull request Nov 9, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant