diff options
-rw-r--r-- | .rubocop.yml | 3 | ||||
-rw-r--r-- | .rubocop_todo.yml | 269 |
2 files changed, 146 insertions, 126 deletions
diff --git a/.rubocop.yml b/.rubocop.yml index 291461a..aa0c0cb 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,6 +4,7 @@ AllCops: - "vendor/**/.*" - "vendor/**/*" NewCops: enable + TargetRubyVersion: 2.5 inherit_from: .rubocop_todo.yml @@ -18,4 +19,4 @@ Layout/LineLength: - 'net-ssh.gemspec' Style/EmptyLiteral: - Enabled: false
\ No newline at end of file + Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 9497937..f0c63ba 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,18 +1,11 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2021-07-01 20:27:30 UTC using RuboCop version 1.17.0. +# on 2021-10-25 13:17:23 UTC using RuboCop version 1.22.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 # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -# Configuration parameters: Include. -# Include: **/*.gemspec -Gemspec/RequiredRubyVersion: - Exclude: - - 'net-ssh.gemspec' - # Offense count: 75 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. @@ -20,6 +13,12 @@ Gemspec/RequiredRubyVersion: Layout/ArgumentAlignment: Enabled: false +# Offense count: 1 +# Cop supports --auto-correct. +Layout/CommentIndentation: + Exclude: + - 'test/common.rb' + # Offense count: 35 # Cop supports --auto-correct. # Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. @@ -33,7 +32,35 @@ Layout/HashAlignment: - 'lib/net/ssh/transport/hmac.rb' - 'lib/net/ssh/transport/kex.rb' -# Offense count: 8 +# Offense count: 33 +# Cop supports --auto-correct. +# Configuration parameters: AllowDoxygenCommentStyle, AllowGemfileRubyComment. +Layout/LeadingCommentSpace: + Exclude: + - 'lib/net/ssh/buffered_io.rb' + - 'lib/net/ssh/connection/channel.rb' + - 'lib/net/ssh/connection/session.rb' + - 'lib/net/ssh/errors.rb' + - 'lib/net/ssh/proxy/https.rb' + - 'lib/net/ssh/service/forward.rb' + - 'lib/net/ssh/test/extensions.rb' + - 'lib/net/ssh/transport/ctr.rb' + - 'lib/net/ssh/transport/kex/abstract.rb' + - 'lib/net/ssh/transport/kex/abstract5656.rb' + - 'lib/net/ssh/transport/kex/curve25519_sha256.rb' + - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb' + - 'lib/net/ssh/transport/kex/ecdh_sha2_nistp256.rb' + - 'lib/net/ssh/transport/session.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/LineEndStringConcatenationIndentation: + Exclude: + - 'lib/net/ssh/transport/algorithms.rb' + +# Offense count: 7 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: aligned, indented @@ -43,9 +70,8 @@ Layout/MultilineOperationIndentation: - 'lib/net/ssh/proxy/https.rb' - 'lib/net/ssh/transport/algorithms.rb' - 'lib/net/ssh/transport/state.rb' - - 'lib/net/ssh/verifiers/always.rb' -# Offense count: 290 +# Offense count: 294 # Cop supports --auto-correct. Layout/SpaceAfterComma: Enabled: false @@ -59,6 +85,18 @@ Layout/SpaceAroundEqualsInParameterDefault: # Offense count: 5 # Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator. +# SupportedStylesForExponentOperator: space, no_space +Layout/SpaceAroundOperators: + Exclude: + - 'lib/net/ssh/key_factory.rb' + - 'lib/net/ssh/known_hosts.rb' + - 'lib/net/ssh/test/extensions.rb' + - 'lib/net/ssh/transport/hmac/abstract.rb' + - 'lib/net/ssh/transport/identity_cipher.rb' + +# Offense count: 5 +# Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space @@ -77,6 +115,19 @@ Layout/SpaceInsideReferenceBrackets: Exclude: - 'lib/net/ssh/transport/algorithms.rb' +# Offense count: 11 +# Cop supports --auto-correct. +Lint/AmbiguousOperatorPrecedence: + Exclude: + - 'lib/net/ssh/authentication/certificate.rb' + - 'lib/net/ssh/config.rb' + - 'lib/net/ssh/loggable.rb' + - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb' + - 'lib/net/ssh/transport/openssl.rb' + - 'lib/net/ssh/transport/state.rb' + - 'lib/net/ssh/version.rb' + - 'test/integration/test_proxy.rb' + # Offense count: 4 # Configuration parameters: AllowSafeAssignment. Lint/AssignmentInCondition: @@ -104,6 +155,13 @@ Lint/DeprecatedOpenSSLConstant: Exclude: - 'lib/net/ssh/transport/openssl.rb' +# Offense count: 2 +# Configuration parameters: AllowComments, AllowEmptyLambdas. +Lint/EmptyBlock: + Exclude: + - 'test/common.rb' + - 'test/start/test_transport.rb' + # Offense count: 1 # Configuration parameters: AllowComments. Lint/EmptyWhen: @@ -116,6 +174,13 @@ Lint/ImplicitStringConcatenation: - 'lib/net/ssh/transport/kex/diffie_hellman_group14_sha1.rb' - 'lib/net/ssh/transport/kex/diffie_hellman_group1_sha1.rb' +# Offense count: 4 +# Cop supports --auto-correct. +Lint/IncompatibleIoSelectWithFiberScheduler: + Exclude: + - 'lib/net/ssh/transport/packet_stream.rb' + - 'lib/net/ssh/transport/server_version.rb' + # Offense count: 2 # Cop supports --auto-correct. Lint/Loop: @@ -135,6 +200,12 @@ Lint/NonLocalExitFromIterator: Exclude: - 'lib/net/ssh/known_hosts.rb' +# Offense count: 2 +# Cop supports --auto-correct. +Lint/OrAssignmentToConstant: + Exclude: + - 'lib/net/ssh/authentication/pageant.rb' + # Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: AllowedImplicitNamespaces. @@ -145,6 +216,12 @@ Lint/RaiseException: - 'lib/net/ssh/buffer.rb' - 'lib/net/ssh/key_factory.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Lint/RedundantCopDisableDirective: + Exclude: + - 'lib/net/ssh/key_factory.rb' + # Offense count: 3 Lint/RescueException: Exclude: @@ -186,7 +263,7 @@ Lint/UnusedBlockArgument: - 'lib/net/ssh/connection/session.rb' - 'lib/net/ssh/service/forward.rb' -# Offense count: 69 +# Offense count: 71 # Cop supports --auto-correct. # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. Lint/UnusedMethodArgument: @@ -215,10 +292,10 @@ Lint/UselessTimes: Exclude: - 'test/integration/test_forward.rb' -# Offense count: 201 +# Offense count: 202 # Configuration parameters: IgnoredMethods, CountRepeatedAttributes. Metrics/AbcSize: - Max: 77 + Max: 74 # Offense count: 16 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. @@ -236,12 +313,12 @@ Metrics/BlockNesting: Metrics/ClassLength: Max: 488 -# Offense count: 36 +# Offense count: 37 # Configuration parameters: IgnoredMethods. Metrics/CyclomaticComplexity: Max: 32 -# Offense count: 224 +# Offense count: 229 # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods. Metrics/MethodLength: Max: 72 @@ -251,13 +328,12 @@ Metrics/MethodLength: Metrics/ModuleLength: Max: 160 -# Offense count: 3 -# Configuration parameters: CountKeywordArgs. +# Offense count: 2 +# Configuration parameters: Max, CountKeywordArgs. Metrics/ParameterLists: - Max: 6 MaxOptionalParameters: 4 -# Offense count: 31 +# Offense count: 32 # Configuration parameters: IgnoredMethods. Metrics/PerceivedComplexity: Max: 32 @@ -363,6 +439,12 @@ Naming/VariableNumber: - 'test/test_known_hosts.rb' - 'test/transport/test_identity_cipher.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Security/IoMethods: + Exclude: + - 'lib/net/ssh/config.rb' + # Offense count: 2 # Configuration parameters: EnforcedStyle, AllowModifiersOnSymbols. # SupportedStyles: inline, group @@ -402,14 +484,6 @@ Style/AndOr: - 'lib/net/ssh/connection/session.rb' - 'lib/net/ssh/service/forward.rb' -# Offense count: 2 -# Configuration parameters: AllowedChars. -# AllowedChars: © -Style/AsciiComments: - Exclude: - - 'lib/net/ssh/authentication/pageant.rb' - - 'lib/net/ssh/buffered_io.rb' - # Offense count: 9 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. @@ -485,7 +559,7 @@ Style/CombinableLoops: # Offense count: 4 # Cop supports --auto-correct. -# Configuration parameters: Keywords. +# Configuration parameters: Keywords, RequireColon. # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE Style/CommentAnnotation: Exclude: @@ -570,6 +644,14 @@ Style/GlobalStdStream: Style/GuardClause: Enabled: false +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowSplatArgument. +Style/HashConversion: + Exclude: + - 'lib/net/ssh/authentication/certificate.rb' + - 'test/test_config.rb' + # Offense count: 1 # Cop supports --auto-correct. # Configuration parameters: AllowIfModifier. @@ -626,6 +708,7 @@ Style/MultilineWhenThen: # Offense count: 5 # Cop supports --auto-correct. +# Configuration parameters: AllowMethodComparison. Style/MultipleComparison: Exclude: - 'lib/net/ssh/authentication/agent.rb' @@ -656,6 +739,13 @@ Style/NegatedIf: - 'test/test_key_factory.rb' - 'test/transport/test_state.rb' +# Offense count: 2 +# Cop supports --auto-correct. +Style/NegatedIfElseCondition: + Exclude: + - 'lib/net/ssh/transport/algorithms.rb' + - 'lib/net/ssh/transport/cipher_factory.rb' + # Offense count: 1 # Cop supports --auto-correct. Style/NegatedWhile: @@ -697,7 +787,7 @@ Style/NumericLiterals: Style/NumericPredicate: Enabled: false -# Offense count: 17 +# Offense count: 16 # Configuration parameters: AllowedMethods. # AllowedMethods: respond_to_missing? Style/OptionalBooleanParameter: @@ -711,7 +801,6 @@ Style/OptionalBooleanParameter: - 'lib/net/ssh/transport/session.rb' - 'lib/net/ssh/transport/state.rb' - 'test/common.rb' - - 'test/integration/common.rb' - 'test/transport/test_server_version.rb' # Offense count: 15 @@ -778,6 +867,14 @@ Style/RaiseArgs: Exclude: - 'lib/net/ssh/authentication/ed25519.rb' +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: Methods. +Style/RedundantArgument: + Exclude: + - 'lib/net/ssh/known_hosts.rb' + - 'test/authentication/test_ed25519.rb' + # Offense count: 5 # Cop supports --auto-correct. Style/RedundantBegin: @@ -861,6 +958,12 @@ Style/SafeNavigation: - 'lib/net/ssh/transport/algorithms.rb' - 'lib/net/ssh/transport/packet_stream.rb' +# Offense count: 3 +# Cop supports --auto-correct. +Style/SelectByRegexp: + Exclude: + - 'test/test_all.rb' + # Offense count: 2 # Cop supports --auto-correct. Style/SelfAssignment: @@ -903,7 +1006,7 @@ Style/SoleNestedConditional: # Offense count: 18 # Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle. +# Configuration parameters: RequireEnglish, EnforcedStyle. # SupportedStyles: use_perl_names, use_english_names Style/SpecialGlobalVars: Exclude: @@ -915,8 +1018,15 @@ Style/SpecialGlobalVars: - 'test/manual/test_pageant.rb' - 'test/test_all.rb' +# Offense count: 1 +# Cop supports --auto-correct. +Style/StringChars: + Exclude: + - 'test/transport/test_server_version.rb' + # Offense count: 27 # Cop supports --auto-correct. +# Configuration parameters: Mode. Style/StringConcatenation: Exclude: - 'lib/net/ssh/authentication/certificate.rb' @@ -931,14 +1041,14 @@ Style/StringConcatenation: - 'test/test_buffer.rb' - 'test/test_key_factory.rb' -# Offense count: 1820 +# Offense count: 1816 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: Enabled: false -# Offense count: 7 +# Offense count: 6 # Cop supports --auto-correct. # Configuration parameters: AllowMethodsWithArguments, IgnoredMethods. # IgnoredMethods: respond_to, define_method @@ -948,7 +1058,6 @@ Style/SymbolProc: - 'lib/net/ssh/buffer.rb' - 'lib/net/ssh/connection/session.rb' - 'lib/net/ssh/test/extensions.rb' - - 'lib/net/ssh/transport/algorithms.rb' # Offense count: 14 # Cop supports --auto-correct. @@ -982,93 +1091,3 @@ Style/ZeroLengthPredicate: Exclude: - 'lib/net/ssh/buffered_io.rb' - 'lib/net/ssh/connection/channel.rb' - -Gemspec/DateAssignment: # (new in 1.10) - Enabled: true - -Layout/SpaceBeforeBrackets: # (new in 1.7) - Enabled: true - -Lint/AmbiguousAssignment: # (new in 1.7) - Enabled: true - -Lint/DeprecatedConstants: # (new in 1.8) - Enabled: true - -Lint/DuplicateBranch: # (new in 1.3) - Enabled: true - -Lint/DuplicateRegexpCharacterClassElement: # (new in 1.1) - Enabled: true - -Lint/EmptyBlock: # (new in 1.1) - Enabled: false - -Lint/EmptyClass: # (new in 1.3) - Enabled: true - -Lint/LambdaWithoutLiteralBlock: # (new in 1.8) - Enabled: true - -Lint/NoReturnInBeginEndBlocks: # (new in 1.2) - Enabled: true - -Lint/NumberedParameterAssignment: # (new in 1.9) - Enabled: true - -Lint/OrAssignmentToConstant: # (new in 1.9) - Enabled: false - -Lint/RedundantDirGlobSort: # (new in 1.8) - Enabled: true - -Lint/SymbolConversion: # (new in 1.9) - Enabled: true - -Lint/ToEnumArguments: # (new in 1.1) - Enabled: true - -Lint/TripleQuotes: # (new in 1.9) - 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/EndlessMethod: # (new in 1.8) - Enabled: true - -Style/HashConversion: # (new in 1.10) - Enabled: false - -Style/HashExcept: # (new in 1.7) - Enabled: true - -Style/IfWithBooleanLiteralBranches: # (new in 1.9) - Enabled: true - -Style/NegatedIfElseCondition: # (new in 1.2) - Enabled: false - -Style/NilLambda: # (new in 1.3) - Enabled: true - -Style/RedundantArgument: # (new in 1.4) - Enabled: false - -Style/StringChars: # (new in 1.12) - Enabled: false - -Style/SwapValues: # (new in 1.1) - Enabled: true
\ No newline at end of file |