diff options
author | Florian Wininger <fw.centrale@gmail.com> | 2022-04-12 10:01:41 +0200 |
---|---|---|
committer | Florian Wininger <fw.centrale@gmail.com> | 2022-04-12 11:30:51 +0200 |
commit | 81f08598cfcbb4fd25af6125304e580b49ce0c23 (patch) | |
tree | 93c0c0b16cc31977e87520dfb73c3c7e7f264c2a | |
parent | 92a245e9e1da23712cecbb3c29a1d75a9602e40a (diff) | |
download | net-ssh-81f08598cfcbb4fd25af6125304e580b49ce0c23.tar.gz |
Configure rubocop for gh actions
-rw-r--r-- | .github/config/rubocop_linter_action.yml | 4 | ||||
-rw-r--r-- | .rubocop_todo.yml | 216 | ||||
-rw-r--r-- | net-ssh.gemspec | 2 |
3 files changed, 128 insertions, 94 deletions
diff --git a/.github/config/rubocop_linter_action.yml b/.github/config/rubocop_linter_action.yml new file mode 100644 index 0000000..84a46e1 --- /dev/null +++ b/.github/config/rubocop_linter_action.yml @@ -0,0 +1,4 @@ +rubocop_fail_level: "convention" + +versions: + rubocop: "1.27.0" diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 6be520e..b7eb90f 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,20 +1,21 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2022-04-11 12:21:32 UTC using RuboCop version 1.22.3. +# on 2022-04-12 08:30:13 UTC using RuboCop version 1.27.0. # 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 +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: Include. # Include: **/*.gemspec -Gemspec/RequiredRubyVersion: +Gemspec/RequireMFA: Exclude: - 'net-ssh.gemspec' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: aligned, indented Layout/LineEndStringConcatenationIndentation: @@ -22,7 +23,7 @@ Layout/LineEndStringConcatenationIndentation: - 'lib/net/ssh/transport/algorithms.rb' # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, IndentationWidth. # SupportedStyles: aligned, indented Layout/MultilineOperationIndentation: @@ -33,7 +34,7 @@ Layout/MultilineOperationIndentation: - 'lib/net/ssh/transport/state.rb' # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters. # SupportedStyles: space, no_space # SupportedStylesForEmptyBraces: space, no_space @@ -44,7 +45,7 @@ Layout/SpaceInsideBlockBraces: - 'support/ssh_tunnel_bug.rb' # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets. # SupportedStyles: space, no_space # SupportedStylesForEmptyBrackets: space, no_space @@ -53,7 +54,7 @@ Layout/SpaceInsideReferenceBrackets: - 'lib/net/ssh/transport/algorithms.rb' # Offense count: 11 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Lint/AmbiguousOperatorPrecedence: Exclude: - 'lib/net/ssh/authentication/certificate.rb' @@ -81,13 +82,13 @@ Lint/ConstantDefinitionInBlock: - 'test/transport/test_cipher_factory.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Lint/DeprecatedClassMethods: Exclude: - 'lib/net/ssh/transport/packet_stream.rb' # Offense count: 12 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Lint/DeprecatedOpenSSLConstant: Exclude: - 'lib/net/ssh/transport/openssl.rb' @@ -111,15 +112,17 @@ 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. +# Offense count: 8 +# This cop supports safe auto-correction (--auto-correct). Lint/IncompatibleIoSelectWithFiberScheduler: Exclude: + - 'lib/net/ssh/buffered_io.rb' + - 'lib/net/ssh/proxy/command.rb' - 'lib/net/ssh/transport/packet_stream.rb' - 'lib/net/ssh/transport/server_version.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Lint/Loop: Exclude: - 'lib/net/ssh/authentication/methods/password.rb' @@ -138,13 +141,13 @@ Lint/NonLocalExitFromIterator: - 'lib/net/ssh/known_hosts.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Lint/OrAssignmentToConstant: Exclude: - 'lib/net/ssh/authentication/pageant.rb' # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). # Configuration parameters: AllowedImplicitNamespaces. # AllowedImplicitNamespaces: Gem Lint/RaiseException: @@ -154,7 +157,7 @@ Lint/RaiseException: - 'lib/net/ssh/key_factory.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Lint/RedundantCopDisableDirective: Exclude: - 'lib/net/ssh/key_factory.rb' @@ -166,7 +169,7 @@ Lint/RescueException: - 'lib/net/ssh/service/forward.rb' # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Lint/SendWithMixinArgument: Exclude: - 'lib/net/ssh/test/extensions.rb' @@ -192,7 +195,7 @@ Lint/UnderscorePrefixedVariableName: - 'lib/net/ssh/test/local_packet.rb' # Offense count: 15 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. Lint/UnusedBlockArgument: Exclude: @@ -201,13 +204,13 @@ Lint/UnusedBlockArgument: - 'lib/net/ssh/service/forward.rb' # Offense count: 74 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods. Lint/UnusedMethodArgument: Enabled: false # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: ContextCreatingMethods, MethodCreatingMethods. Lint/UselessAccessModifier: Exclude: @@ -224,7 +227,7 @@ Lint/UselessAssignment: - 'test/integration/test_forward.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Lint/UselessTimes: Exclude: - 'test/integration/test_forward.rb' @@ -287,7 +290,7 @@ Naming/AccessorMethodName: - 'lib/net/ssh/transport/kex/diffie_hellman_group_exchange_sha1.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Naming/BinaryOperatorParameterName: Exclude: - 'lib/net/ssh/buffer.rb' @@ -358,7 +361,7 @@ Naming/MethodParameterName: - 'test/connection/test_session.rb' # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: PreferredName. Naming/RescuedExceptionsVariableName: Exclude: @@ -377,7 +380,7 @@ Naming/VariableNumber: - 'test/transport/test_identity_cipher.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Security/IoMethods: Exclude: - 'lib/net/ssh/config.rb' @@ -390,7 +393,7 @@ Style/AccessModifierDeclarations: - 'lib/net/ssh/authentication/pageant.rb' # Offense count: 31 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: separated, grouped Style/AccessorGrouping: @@ -403,7 +406,7 @@ Style/AccessorGrouping: - 'test/start/test_transport.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: prefer_alias, prefer_alias_method Style/Alias: @@ -412,7 +415,7 @@ Style/Alias: - 'lib/net/ssh/service/forward.rb' # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, conditionals Style/AndOr: @@ -422,7 +425,7 @@ Style/AndOr: - 'lib/net/ssh/service/forward.rb' # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners, BracesRequiredMethods. # SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces # ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object @@ -439,7 +442,7 @@ Style/BlockDelimiters: - 'test/verifiers/test_always.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowOnConstant. Style/CaseEquality: Exclude: @@ -447,27 +450,27 @@ Style/CaseEquality: - 'lib/net/ssh/connection/session.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Style/CaseLikeIf: Exclude: - 'lib/net/ssh/transport/openssl.rb' - 'test/connection/test_session.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/CharacterLiteral: Exclude: - 'test/test_buffer.rb' # Offense count: 18 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: nested, compact Style/ClassAndModuleChildren: Enabled: false # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: IgnoredMethods. # IgnoredMethods: ==, equal?, eql? Style/ClassEqualityComparison: @@ -483,7 +486,7 @@ Style/ClassVars: - 'test/authentication/methods/test_publickey.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/ColonMethodCall: Exclude: - 'lib/net/ssh/authentication/ed25519.rb' @@ -495,7 +498,7 @@ Style/CombinableLoops: - 'test/integration/test_hmac_etm.rb' # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: Keywords, RequireColon. # Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW, NOTE Style/CommentAnnotation: @@ -506,14 +509,14 @@ Style/CommentAnnotation: - 'lib/net/ssh/config.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/CommentedKeyword: Exclude: - 'test/connection/test_session.rb' - 'test/integration/test_forward.rb' # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions. # SupportedStyles: assign_to_condition, assign_inside_condition Style/ConditionalAssignment: @@ -539,13 +542,13 @@ Style/Documentation: - 'lib/net/ssh/transport/openssl.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/EvenOdd: Exclude: - 'lib/net/ssh/buffer.rb' # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/ExplicitBlockArgument: Exclude: - 'lib/net/ssh/loggable.rb' @@ -554,8 +557,14 @@ Style/ExplicitBlockArgument: - 'test/integration/mitm_server.rb' - 'test/integration/test_forward.rb' +# Offense count: 1 +# This cop supports safe auto-correction (--auto-correct). +Style/FileWrite: + Exclude: + - 'test/integration/test_proxy.rb' + # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: format, sprintf, percent Style/FormatString: @@ -564,14 +573,14 @@ Style/FormatString: - 'lib/net/ssh/loggable.rb' # Offense count: 173 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, always_true, never Style/FrozenStringLiteralComment: Enabled: false # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/GlobalStdStream: Exclude: - 'lib/net/ssh.rb' @@ -582,7 +591,7 @@ Style/GuardClause: Enabled: false # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowSplatArgument. Style/HashConversion: Exclude: @@ -590,14 +599,14 @@ Style/HashConversion: - 'test/test_config.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowIfModifier. Style/IfInsideElse: Exclude: - 'lib/net/ssh/connection/session.rb' # Offense count: 13 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/IfUnlessModifier: Exclude: - 'lib/net/ssh.rb' @@ -610,13 +619,13 @@ Style/IfUnlessModifier: - 'test/test_key_factory.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Style/InfiniteLoop: Exclude: - 'lib/net/ssh/authentication/pageant.rb' # Offense count: 27 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/LineEndConcatenation: Exclude: - 'lib/net/ssh/authentication/pageant.rb' @@ -625,26 +634,32 @@ Style/LineEndConcatenation: - 'lib/net/ssh/verifiers/always.rb' # Offense count: 1 +# This cop supports unsafe auto-correction (--auto-correct-all). +Style/MapToHash: + Exclude: + - 'lib/net/ssh/config.rb' + +# Offense count: 1 Style/MissingRespondToMissing: Exclude: - 'lib/net/ssh/connection/session.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/MultilineIfThen: Exclude: - 'lib/net/ssh/buffered_io.rb' - 'lib/net/ssh/service/forward.rb' # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/MultilineWhenThen: Exclude: - 'lib/net/ssh/transport/packet_stream.rb' - 'lib/net/ssh/transport/session.rb' # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowMethodComparison. Style/MultipleComparison: Exclude: @@ -654,14 +669,14 @@ Style/MultipleComparison: - 'lib/net/ssh/verifiers/accept_new_or_local_tunnel.rb' # Offense count: 42 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: literals, strict Style/MutableConstant: Enabled: false # Offense count: 14 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: both, prefix, postfix Style/NegatedIf: @@ -677,20 +692,20 @@ Style/NegatedIf: - 'test/transport/test_state.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--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. +# This cop supports safe auto-correction (--auto-correct). Style/NegatedWhile: Exclude: - 'lib/net/ssh/config.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, MinBodyLength. # SupportedStyles: skip_modifier_ifs, always Style/Next: @@ -698,7 +713,7 @@ Style/Next: - 'lib/net/ssh/authentication/key_manager.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: predicate, comparison Style/NilComparison: @@ -706,24 +721,34 @@ Style/NilComparison: - 'lib/net/ssh/proxy/command.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/Not: Exclude: - 'lib/net/ssh/connection/channel.rb' # Offense count: 11 -# Cop supports --auto-correct. -# Configuration parameters: Strict. +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: Strict, AllowedNumbers. Style/NumericLiterals: MinDigits: 310 # Offense count: 29 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). # Configuration parameters: EnforcedStyle, IgnoredMethods. # SupportedStyles: predicate, comparison Style/NumericPredicate: Enabled: false +# Offense count: 13 +Style/OpenStructUse: + Exclude: + - 'test/authentication/test_ed25519.rb' + - 'test/common.rb' + - 'test/transport/kex/test_curve25519_sha256.rb' + - 'test/transport/kex/test_diffie_hellman_group1_sha1.rb' + - 'test/transport/kex/test_ecdh_sha2_nistp256.rb' + - 'test/verifiers/test_always.rb' + # Offense count: 16 # Configuration parameters: AllowedMethods. # AllowedMethods: respond_to_missing? @@ -741,7 +766,7 @@ Style/OptionalBooleanParameter: - 'test/transport/test_server_version.rb' # Offense count: 15 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/ParallelAssignment: Exclude: - 'lib/net/ssh/config.rb' @@ -755,7 +780,7 @@ Style/ParallelAssignment: - 'test/connection/test_channel.rb' # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowSafeAssignment, AllowInMultilineConditions. Style/ParenthesesAroundCondition: Exclude: @@ -765,7 +790,7 @@ Style/ParenthesesAroundCondition: - 'test/integration/test_proxy.rb' # Offense count: 23 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: PreferredDelimiters. Style/PercentLiteralDelimiters: Exclude: @@ -773,7 +798,7 @@ Style/PercentLiteralDelimiters: - 'test/test_config.rb' # Offense count: 16 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/PerlBackrefs: Exclude: - 'lib/net/ssh/buffer.rb' @@ -784,7 +809,7 @@ Style/PerlBackrefs: - 'test/integration/common.rb' # Offense count: 15 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/Proc: Exclude: - 'lib/net/ssh/connection/session.rb' @@ -797,7 +822,7 @@ Style/Proc: - 'test/connection/test_session.rb' # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, AllowedCompactTypes. # SupportedStyles: compact, exploded Style/RaiseArgs: @@ -805,7 +830,7 @@ Style/RaiseArgs: - 'lib/net/ssh/authentication/ed25519.rb' # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). # Configuration parameters: Methods. Style/RedundantArgument: Exclude: @@ -813,7 +838,7 @@ Style/RedundantArgument: - 'test/authentication/test_ed25519.rb' # Offense count: 5 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantBegin: Exclude: - 'lib/net/ssh/buffered_io.rb' @@ -822,32 +847,37 @@ Style/RedundantBegin: - 'test/manual/test_pageant.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantCondition: Exclude: - 'lib/net/ssh/proxy/command.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantFileExtensionInRequire: Exclude: - 'lib/net/ssh/transport/cipher_factory.rb' +# Offense count: 1 +Style/RedundantInitialize: + Exclude: + - 'lib/net/ssh/prompt.rb' + # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantInterpolation: Exclude: - 'lib/net/ssh/proxy/socks5.rb' - 'lib/net/ssh/transport/session.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantPercentQ: Exclude: - 'net-ssh.gemspec' # Offense count: 9 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantRegexpEscape: Exclude: - 'lib/net/ssh/authentication/agent.rb' @@ -856,13 +886,13 @@ Style/RedundantRegexpEscape: - 'lib/net/ssh/transport/cipher_factory.rb' # Offense count: 87 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowMultipleReturnValues. Style/RedundantReturn: Enabled: false # Offense count: 18 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RedundantSelf: Exclude: - 'lib/net/ssh/connection/channel.rb' @@ -870,15 +900,15 @@ Style/RedundantSelf: - 'test/authentication/test_ed25519.rb' # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/RescueModifier: Exclude: - 'lib/net/ssh/service/forward.rb' - 'lib/net/ssh/transport/algorithms.rb' # Offense count: 25 -# Cop supports --auto-correct. -# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods. +# This cop supports safe auto-correction (--auto-correct). +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods, MaxChainLength. # AllowedMethods: present?, blank?, presence, try, try! Style/SafeNavigation: Exclude: @@ -896,19 +926,19 @@ Style/SafeNavigation: - 'lib/net/ssh/transport/packet_stream.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/SelectByRegexp: Exclude: - 'test/test_all.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/SelfAssignment: Exclude: - 'lib/net/ssh/config.rb' # Offense count: 7 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowAsExpressionSeparator. Style/Semicolon: Exclude: @@ -917,7 +947,7 @@ Style/Semicolon: - 'test/connection/test_session.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle. # SupportedStyles: only_raise, only_fail, semantic Style/SignalException: @@ -926,14 +956,14 @@ Style/SignalException: - 'lib/net/ssh/connection/channel.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowIfMethodIsEmpty. Style/SingleLineMethods: Exclude: - 'lib/net/ssh/buffered_io.rb' # Offense count: 11 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Style/SlicingWithRange: Exclude: - 'lib/net/ssh/authentication/ed25519.rb' @@ -945,7 +975,7 @@ Style/SlicingWithRange: - 'test/transport/test_packet_stream.rb' # Offense count: 3 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: AllowModifier. Style/SoleNestedConditional: Exclude: @@ -954,7 +984,7 @@ Style/SoleNestedConditional: - 'test/integration/test_proxy.rb' # Offense count: 18 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: RequireEnglish, EnforcedStyle. # SupportedStyles: use_perl_names, use_english_names Style/SpecialGlobalVars: @@ -968,13 +998,13 @@ Style/SpecialGlobalVars: - 'test/test_all.rb' # Offense count: 1 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Style/StringChars: Exclude: - 'test/transport/test_server_version.rb' # Offense count: 27 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). # Configuration parameters: Mode. Style/StringConcatenation: Exclude: @@ -991,14 +1021,14 @@ Style/StringConcatenation: - 'test/test_key_factory.rb' # Offense count: 1846 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline. # SupportedStyles: single_quotes, double_quotes Style/StringLiterals: Enabled: false # Offense count: 6 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). # Configuration parameters: AllowMethodsWithArguments, IgnoredMethods. # IgnoredMethods: respond_to, define_method Style/SymbolProc: @@ -1009,7 +1039,7 @@ Style/SymbolProc: - 'lib/net/ssh/test/extensions.rb' # Offense count: 14 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/UnpackFirst: Exclude: - 'lib/net/ssh/authentication/pageant.rb' @@ -1020,14 +1050,14 @@ Style/UnpackFirst: - 'lib/net/ssh/transport/packet_stream.rb' # Offense count: 2 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). Style/WhileUntilDo: Exclude: - 'lib/net/ssh/config.rb' - 'test/integration/common.rb' # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports safe auto-correction (--auto-correct). # Configuration parameters: WordRegex. # SupportedStyles: percent, brackets Style/WordArray: @@ -1035,7 +1065,7 @@ Style/WordArray: MinSize: 3 # Offense count: 4 -# Cop supports --auto-correct. +# This cop supports unsafe auto-correction (--auto-correct-all). Style/ZeroLengthPredicate: Exclude: - 'lib/net/ssh/buffered_io.rb' diff --git a/net-ssh.gemspec b/net-ssh.gemspec index d9fdc57..ee45c50 100644 --- a/net-ssh.gemspec +++ b/net-ssh.gemspec @@ -40,5 +40,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "minitest", "~> 5.10" spec.add_development_dependency "mocha", "~> 1.11.2" spec.add_development_dependency "rake", "~> 12.0" - spec.add_development_dependency "rubocop", "~> 1.22.1" + spec.add_development_dependency "rubocop", "~> 1.27.0" end |