Skip to content

Commit

Permalink
Update Rubocop config for current Rubocop
Browse files Browse the repository at this point in the history
Running Rubocop printed out a huge number of new warnings and errors. For the most part, I just silenced them since this gem has been pretty stable and I assume you don't want to modify things just to match newer recommendations. I did add `required_ruby_version` to the gemspec, though, since that just seems like a good idea. It's set to 2.3.0, based on the GitHub Actions CI job.
  • Loading branch information
Mr0grog committed Jun 26, 2024
1 parent 131eaee commit 4644653
Show file tree
Hide file tree
Showing 2 changed files with 379 additions and 0 deletions.
378 changes: 378 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
require:
- rubocop-performance

AllCops:
TargetRubyVersion: 2.3

Layout/SpaceAroundEqualsInParameterDefault:
EnforcedStyle: no_space

Expand All @@ -12,3 +15,378 @@ Style/SafeNavigation:

Style/NegatedIf:
Enabled: false

Metrics/MethodLength:
Max: 20

Style/OptionalBooleanParameter:
Enabled: false

Style/SpecialGlobalVars:
Enabled: false

Gemspec/DeprecatedAttributeAssignment: # new in 1.30
Enabled: false

Gemspec/DevelopmentDependencies: # new in 1.44
Enabled: false

Gemspec/RequireMFA: # new in 1.23
Enabled: false

Layout/LineContinuationLeadingSpace: # new in 1.31
Enabled: false

Layout/LineContinuationSpacing: # new in 1.31
Enabled: false

Layout/LineEndStringConcatenationIndentation: # new in 1.18
Enabled: false

Layout/SpaceBeforeBrackets: # new in 1.7
Enabled: false

Lint/AmbiguousAssignment: # new in 1.7
Enabled: false

Lint/AmbiguousOperatorPrecedence: # new in 1.21
Enabled: false

Lint/AmbiguousRange: # new in 1.19
Enabled: false

Lint/ConstantOverwrittenInRescue: # new in 1.31
Enabled: false

Lint/DeprecatedConstants: # new in 1.8
Enabled: false

Lint/DuplicateBranch: # new in 1.3
Enabled: false

Lint/DuplicateMagicComment: # new in 1.37
Enabled: false

Lint/DuplicateMatchPattern: # new in 1.50
Enabled: false

Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
Enabled: false

Lint/EmptyBlock: # new in 1.1
Enabled: false

Lint/EmptyClass: # new in 1.3
Enabled: false

Lint/EmptyInPattern: # new in 1.16
Enabled: false

Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
Enabled: false

Lint/ItWithoutArgumentsInBlock: # new in 1.59
Enabled: false

Lint/LambdaWithoutLiteralBlock: # new in 1.8
Enabled: false

Lint/LiteralAssignmentInCondition: # new in 1.58
Enabled: false

Lint/MixedCaseRange: # new in 1.53
Enabled: false

Lint/NoReturnInBeginEndBlocks: # new in 1.2
Enabled: false

Lint/NonAtomicFileOperation: # new in 1.31
Enabled: false

Lint/NumberedParameterAssignment: # new in 1.9
Enabled: false

Lint/OrAssignmentToConstant: # new in 1.9
Enabled: false

Lint/RedundantDirGlobSort: # new in 1.8
Enabled: false

Lint/RedundantRegexpQuantifiers: # new in 1.53
Enabled: false

Lint/RefinementImportMethods: # new in 1.27
Enabled: false

Lint/RequireRangeParentheses: # new in 1.32
Enabled: false

Lint/RequireRelativeSelfPath: # new in 1.22
Enabled: false

Lint/SymbolConversion: # new in 1.9
Enabled: false

Lint/ToEnumArguments: # new in 1.1
Enabled: false

Lint/TripleQuotes: # new in 1.9
Enabled: false

Lint/UnexpectedBlockArity: # new in 1.5
Enabled: false

Lint/UnmodifiedReduceAccumulator: # new in 1.1
Enabled: false

Lint/UselessRescue: # new in 1.43
Enabled: false

Lint/UselessRuby2Keywords: # new in 1.23
Enabled: false

Metrics/CollectionLiteralLength: # new in 1.47
Enabled: false

Naming/BlockForwarding: # new in 1.24
Enabled: false

Security/CompoundHash: # new in 1.28
Enabled: false

Security/IoMethods: # new in 1.22
Enabled: false

Style/ArgumentsForwarding: # new in 1.1
Enabled: false

Style/ArrayIntersect: # new in 1.40
Enabled: false

Style/CollectionCompact: # new in 1.2
Enabled: false

Style/ComparableClamp: # new in 1.44
Enabled: false

Style/ConcatArrayLiterals: # new in 1.41
Enabled: false

Style/DataInheritance: # new in 1.49
Enabled: false

Style/DirEmpty: # new in 1.48
Enabled: false

Style/DocumentDynamicEvalDefinition: # new in 1.1
Enabled: false

Style/EmptyHeredoc: # new in 1.32
Enabled: false

Style/EndlessMethod: # new in 1.8
Enabled: false

Style/EnvHome: # new in 1.29
Enabled: false

Style/ExactRegexpMatch: # new in 1.51
Enabled: false

Style/FetchEnvVar: # new in 1.28
Enabled: false

Style/FileEmpty: # new in 1.48
Enabled: false

Style/FileRead: # new in 1.24
Enabled: false

Style/FileWrite: # new in 1.24
Enabled: false

Style/HashConversion: # new in 1.10
Enabled: false

Style/HashExcept: # new in 1.7
Enabled: false

Style/IfWithBooleanLiteralBranches: # new in 1.9
Enabled: false

Style/InPatternThen: # new in 1.16
Enabled: false

Style/MagicCommentFormat: # new in 1.35
Enabled: false

Style/MapCompactWithConditionalBlock: # new in 1.30
Enabled: false

Style/MapIntoArray: # new in 1.63
Enabled: false

Style/MapToHash: # new in 1.24
Enabled: false

Style/MapToSet: # new in 1.42
Enabled: false

Style/MinMaxComparison: # new in 1.42
Enabled: false

Style/MultilineInPatternThen: # new in 1.16
Enabled: false

Style/NegatedIfElseCondition: # new in 1.2
Enabled: false

Style/NestedFileDirname: # new in 1.26
Enabled: false

Style/NilLambda: # new in 1.3
Enabled: false

Style/NumberedParameters: # new in 1.22
Enabled: false

Style/NumberedParametersLimit: # new in 1.22
Enabled: false

Style/ObjectThen: # new in 1.28
Enabled: false

Style/OpenStructUse: # new in 1.23
Enabled: false

Style/OperatorMethodCall: # new in 1.37
Enabled: false

Style/QuotedSymbols: # new in 1.16
Enabled: false

Style/RedundantArgument: # new in 1.4
Enabled: false

Style/RedundantArrayConstructor: # new in 1.52
Enabled: false

Style/RedundantConstantBase: # new in 1.40
Enabled: false

Style/RedundantCurrentDirectoryInPath: # new in 1.53
Enabled: false

Style/RedundantDoubleSplatHashBraces: # new in 1.41
Enabled: false

Style/RedundantEach: # new in 1.38
Enabled: false

Style/RedundantFilterChain: # new in 1.52
Enabled: false

Style/RedundantHeredocDelimiterQuotes: # new in 1.45
Enabled: false

Style/RedundantInitialize: # new in 1.27
Enabled: false

Style/RedundantLineContinuation: # new in 1.49
Enabled: false

Style/RedundantRegexpArgument: # new in 1.53
Enabled: false

Style/RedundantRegexpConstructor: # new in 1.52
Enabled: false

Style/RedundantSelfAssignmentBranch: # new in 1.19
Enabled: false

Style/RedundantStringEscape: # new in 1.37
Enabled: false

Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
Enabled: false

Style/SelectByRegexp: # new in 1.22
Enabled: false

Style/SendWithLiteralMethodName: # new in 1.64
Enabled: false

Style/SingleLineDoEndBlock: # new in 1.57
Enabled: false

Style/StringChars: # new in 1.12
Enabled: false

Style/SuperArguments: # new in 1.64
Enabled: false

Style/SuperWithArgsParentheses: # new in 1.58
Enabled: false

Style/SwapValues: # new in 1.1
Enabled: false

Style/YAMLFileRead: # new in 1.53
Enabled: false

Performance/AncestorsInclude: # new in 1.7
Enabled: false

Performance/BigDecimalWithNumericArgument: # new in 1.7
Enabled: false

Performance/BlockGivenWithExplicitBlock: # new in 1.9
Enabled: false

Performance/CollectionLiteralInLoop: # new in 1.8
Enabled: false

Performance/ConcurrentMonotonicTime: # new in 1.12
Enabled: false

Performance/ConstantRegexp: # new in 1.9
Enabled: false

Performance/MapCompact: # new in 1.11
Enabled: false

Performance/MapMethodChain: # new in 1.19
Enabled: false

Performance/MethodObjectAsBlock: # new in 1.9
Enabled: false

Performance/RedundantEqualityComparisonBlock: # new in 1.10
Enabled: false

Performance/RedundantSortBlock: # new in 1.7
Enabled: false

Performance/RedundantSplitRegexpArgument: # new in 1.10
Enabled: false

Performance/RedundantStringChars: # new in 1.7
Enabled: false

Performance/ReverseFirst: # new in 1.7
Enabled: false

Performance/SortReverse: # new in 1.7
Enabled: false

Performance/Squeeze: # new in 1.7
Enabled: false

Performance/StringIdentifierArgument: # new in 1.13
Enabled: false

Performance/StringInclude: # new in 1.7
Enabled: false

Performance/Sum: # new in 1.8
Enabled: false
1 change: 1 addition & 0 deletions sd_notify.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Gem::Specification.new do |s|
s.files = ["lib/sd_notify.rb", "LICENSE", "README.md", "CHANGELOG.md"]
s.homepage = "https://github.com/agis/ruby-sdnotify"
s.license = "MIT"
s.required_ruby_version = ">= 2.3.0"

s.add_development_dependency "minitest"
s.add_development_dependency "rubocop"
Expand Down

0 comments on commit 4644653

Please sign in to comment.