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

Update .rubocop.yml, and disable OnSendWithoutOnCSend #2026

Merged
merged 2 commits into from
Feb 5, 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
6 changes: 4 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ jobs:
with:
ruby-version: "3.4"
bundler-cache: true
- run: bundle exec rubocop -V
- name: Show RuboCop version
run: grep '^ rubocop' Gemfile.lock | sort
- run: NO_COVERAGE=true bundle exec rake ${{ matrix.task }}

oldest-rubocop:
Expand All @@ -97,7 +98,8 @@ jobs:
with:
ruby-version: "3.4"
bundler-cache: true
- run: bundle exec rubocop -V
- name: Show RuboCop version
run: grep '^ rubocop' Gemfile.lock | sort
- run: NO_COVERAGE=true bundle exec rake ${{ matrix.task }}

rspec4:
Expand Down
79 changes: 59 additions & 20 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ AllCops:
- 'tmp/**/*'
- 'spec/smoke_tests/**/*.rb'


# Enable when we require rubocop >= 1.71.1 or rubocop-ast >= 1.38.0
InternalAffairs/NodePatternGroups:
Enabled: false

# Enable when we require rubocop >= 1.71.1 or rubocop-ast >= 1.38.0
InternalAffairs/NodeTypeMultiplePredicates:
Enabled: false

InternalAffairs/OnSendWithoutOnCSend:
Enabled: false

Layout/HashAlignment:
EnforcedHashRocketStyle:
- key
Expand Down Expand Up @@ -129,8 +141,9 @@ Style/NumberedParameters:
Style/RequireOrder:
Enabled: true

# Enable RuboCop's pending cops up to v1.63
# Enable RuboCop's pending cops up to v1.71

Gemspec/AddRuntimeDependency: {Enabled: true}
Gemspec/DeprecatedAttributeAssignment: {Enabled: true}
Gemspec/DevelopmentDependencies: {Enabled: true}
Gemspec/RequireMFA: {Enabled: true}
Expand All @@ -141,15 +154,19 @@ Layout/SpaceBeforeBrackets: {Enabled: true}
Lint/AmbiguousAssignment: {Enabled: true}
Lint/AmbiguousOperatorPrecedence: {Enabled: true}
Lint/AmbiguousRange: {Enabled: true}
Lint/ArrayLiteralInRegexp: {Enabled: true}
Lint/ConstantOverwrittenInRescue: {Enabled: true}
Lint/ConstantReassignment: {Enabled: true}
Lint/DeprecatedConstants: {Enabled: true}
Lint/DuplicateBranch: {Enabled: true}
Lint/DuplicateMagicComment: {Enabled: true}
Lint/DuplicateMatchPattern: {Enabled: true}
Lint/DuplicateRegexpCharacterClassElement: {Enabled: true}
Lint/DuplicateSetElement: {Enabled: true}
Lint/EmptyBlock: {Enabled: true}
Lint/EmptyClass: {Enabled: true}
Lint/EmptyInPattern: {Enabled: true}
Lint/HashNewWithKeywordArgumentsAsDefault: {Enabled: true}
Lint/IncompatibleIoSelectWithFiberScheduler: {Enabled: true}
Lint/ItWithoutArgumentsInBlock: {Enabled: true}
Lint/LambdaWithoutLiteralBlock: {Enabled: true}
Expand All @@ -158,48 +175,38 @@ Lint/MixedCaseRange: {Enabled: true}
Lint/NonAtomicFileOperation: {Enabled: true}
Lint/NoReturnInBeginEndBlocks: {Enabled: true}
Lint/NumberedParameterAssignment: {Enabled: true}
Lint/NumericOperationWithConstantResult: {Enabled: true}
Lint/OrAssignmentToConstant: {Enabled: true}
Lint/RedundantDirGlobSort: {Enabled: true}
Lint/RedundantRegexpQuantifiers: {Enabled: true}
Lint/RefinementImportMethods: {Enabled: true}
Lint/RequireRangeParentheses: {Enabled: true}
Lint/RequireRelativeSelfPath: {Enabled: true}
Lint/SharedMutableDefault: {Enabled: true}
Lint/SymbolConversion: {Enabled: true}
Lint/ToEnumArguments: {Enabled: true}
Lint/TripleQuotes: {Enabled: true}
Lint/UnescapedBracketInRegexp: {Enabled: true}
Lint/UnexpectedBlockArity: {Enabled: true}
Lint/UnmodifiedReduceAccumulator: {Enabled: true}
Lint/UselessDefined: {Enabled: true}
Lint/UselessNumericOperation: {Enabled: true}
Lint/UselessRescue: {Enabled: true}
Lint/UselessRuby2Keywords: {Enabled: true}
Metrics/CollectionLiteralLength: {Enabled: true}
Naming/BlockForwarding: {Enabled: true}
Performance/AncestorsInclude: {Enabled: true}
Performance/BigDecimalWithNumericArgument: {Enabled: true}
Performance/BlockGivenWithExplicitBlock: {Enabled: true}
Performance/CollectionLiteralInLoop: {Enabled: true}
Performance/ConcurrentMonotonicTime: {Enabled: true}
Performance/ConstantRegexp: {Enabled: true}
Performance/MapCompact: {Enabled: true}
Performance/MapMethodChain: {Enabled: true}
Performance/MethodObjectAsBlock: {Enabled: true}
Performance/RedundantEqualityComparisonBlock: {Enabled: true}
Performance/RedundantSortBlock: {Enabled: true}
Performance/RedundantSplitRegexpArgument: {Enabled: true}
Performance/RedundantStringChars: {Enabled: true}
Performance/ReverseFirst: {Enabled: true}
Performance/SortReverse: {Enabled: true}
Performance/Squeeze: {Enabled: true}
Performance/StringIdentifierArgument: {Enabled: true}
Performance/StringInclude: {Enabled: true}
Performance/Sum: {Enabled: true}
Security/CompoundHash: {Enabled: true}
Security/IoMethods: {Enabled: true}
Style/AmbiguousEndlessMethodDefinition: {Enabled: true}
Style/ArgumentsForwarding: {Enabled: true}
Style/ArrayIntersect: {Enabled: true}
Style/BitwisePredicate: {Enabled: true}
Style/CollectionCompact: {Enabled: true}
Style/CombinableDefined: {Enabled: true}
Style/ComparableClamp: {Enabled: true}
Style/ConcatArrayLiterals: {Enabled: true}
Style/DataInheritance: {Enabled: true}
Style/DigChain: {Enabled: true}
Style/DirEmpty: {Enabled: true}
Style/DocumentDynamicEvalDefinition: {Enabled: true}
Style/EmptyHeredoc: {Enabled: true}
Expand All @@ -208,12 +215,17 @@ Style/EnvHome: {Enabled: true}
Style/ExactRegexpMatch: {Enabled: true}
Style/FetchEnvVar: {Enabled: true}
Style/FileEmpty: {Enabled: true}
Style/FileNull: {Enabled: true}
Style/FileRead: {Enabled: true}
Style/FileTouch: {Enabled: true}
Style/FileWrite: {Enabled: true}
Style/HashConversion: {Enabled: true}
Style/HashExcept: {Enabled: true}
Style/HashSlice: {Enabled: true}
Style/IfWithBooleanLiteralBranches: {Enabled: true}
Style/InPatternThen: {Enabled: true}
Style/ItAssignment: {Enabled: true}
Style/KeywordArgumentsMerging: {Enabled: true}
Style/MagicCommentFormat: {Enabled: true}
Style/MapCompactWithConditionalBlock: {Enabled: true}
Style/MapIntoArray: {Enabled: true}
Expand All @@ -238,15 +250,42 @@ Style/RedundantEach: {Enabled: true}
Style/RedundantFilterChain: {Enabled: true}
Style/RedundantHeredocDelimiterQuotes: {Enabled: true}
Style/RedundantInitialize: {Enabled: true}
Style/RedundantInterpolationUnfreeze: {Enabled: true}
Style/RedundantLineContinuation: {Enabled: true}
Style/RedundantRegexpArgument: {Enabled: true}
Style/RedundantRegexpConstructor: {Enabled: true}
Style/RedundantSelfAssignmentBranch: {Enabled: true}
Style/RedundantStringEscape: {Enabled: true}
Style/ReturnNilInPredicateMethodDefinition: {Enabled: true}
Style/SafeNavigationChainLength: {Enabled: true}
Style/SelectByRegexp: {Enabled: true}
Style/SendWithLiteralMethodName: {Enabled: true}
Style/SingleLineDoEndBlock: {Enabled: true}
Style/StringChars: {Enabled: true}
Style/SuperArguments: {Enabled: true}
Style/SuperWithArgsParentheses: {Enabled: true}
Style/SwapValues: {Enabled: true}
Style/YAMLFileRead: {Enabled: true}

# Enable RuboCop Performance's pending cops up to v1.23

Performance/AncestorsInclude: {Enabled: true}
Performance/BigDecimalWithNumericArgument: {Enabled: true}
Performance/BlockGivenWithExplicitBlock: {Enabled: true}
Performance/CollectionLiteralInLoop: {Enabled: true}
Performance/ConcurrentMonotonicTime: {Enabled: true}
Performance/ConstantRegexp: {Enabled: true}
Performance/MapCompact: {Enabled: true}
Performance/MapMethodChain: {Enabled: true}
Performance/MethodObjectAsBlock: {Enabled: true}
Performance/RedundantEqualityComparisonBlock: {Enabled: true}
Performance/RedundantSortBlock: {Enabled: true}
Performance/RedundantSplitRegexpArgument: {Enabled: true}
Performance/RedundantStringChars: {Enabled: true}
Performance/ReverseFirst: {Enabled: true}
Performance/SortReverse: {Enabled: true}
Performance/Squeeze: {Enabled: true}
Performance/StringBytesize: {Enabled: true}
Performance/StringIdentifierArgument: {Enabled: true}
Performance/StringInclude: {Enabled: true}
Performance/Sum: {Enabled: true}
2 changes: 1 addition & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.68.0.
# using RuboCop version 1.71.2.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand Down