mozilla/ssh_scan

View on GitHub
.rubocop_todo.yml

Summary

Maintainability
Test Coverage
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2016-10-28 01:20:01 +0530 using RuboCop version 0.37.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: 2
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
  Exclude:
    - 'lib/ssh_scan/banner.rb'
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AlignWith, SupportedStyles, AutoCorrect.
# SupportedStyles: keyword, variable, start_of_line
Lint/EndAlignment:
  Enabled: false

# Offense count: 14
Lint/UselessAssignment:
  Exclude:
    - 'scripts/Ubuntu.rb'
    - 'spec/ssh_scan/enforce_signed_commits.rb'

# Offense count: 13
Metrics/AbcSize:
  Max: 85

# Offense count: 4
Metrics/BlockLength:
  Max: 125
  Exclude:
    - 'ssh_scan.gemspec'
    - 'bin/ssh_scan'
    - 'lib/ssh_scan/api.rb'
    - 'spec/**/*'

# Offense count: 1
Metrics/BlockNesting:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 4
# Configuration parameters: CountComments.
Metrics/ClassLength:
  Max: 185
  Exclude:
    - 'lib/ssh_scan/os/ubuntu.rb'
    - 'lib/ssh_scan/policy_manager.rb'
    - 'lib/ssh_scan/protocol.rb'
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 9
Metrics/CyclomaticComplexity:
  Max: 19

# Offense count: 282
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
# URISchemes: http, https
Metrics/LineLength:
  Max: 85

# Offense count: 17
# Configuration parameters: CountComments.
Metrics/MethodLength:
  Max: 150

# Offense count: 7
Metrics/PerceivedComplexity:
  Max: 19

# Offense count: 1
# Cop supports --auto-correct.
Performance/RangeInclude:
  Exclude:
    - 'bin/ssh_scan'

# Offense count: 2
# Cop supports --auto-correct.
Performance/RedundantMatch:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: MaxKeyValuePairs.
Performance/RedundantMerge:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 2
# Cop supports --auto-correct.
Performance/StringReplacement:
  Exclude:
    - 'spec/ssh_scan/enforce_signed_commits.rb'

# Offense count: 6
# Cop supports --auto-correct.
Style/AlignArray:
  Exclude:
    - 'Rakefile'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: always, conditionals
Style/AndOr:
  Exclude:
    - 'lib/ssh_scan/os/ubuntu.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ProceduralMethods, FunctionalMethods, IgnoredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# IgnoredMethods: lambda, proc, it
Style/BlockDelimiters:
  Exclude:
    - 'lib/string_ext.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: braces, no_braces, context_dependent
Style/BracesAroundHashParameters:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'
    - 'spec/ssh_scan/api_spec.rb'
    - 'spec/ssh_scan/protocol_spec.rb'

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: IndentWhenRelativeTo, SupportedStyles, IndentOneStep, IndentationWidth.
# SupportedStyles: case, end
Style/CaseIndentation:
  Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/ClosingParenthesisIndentation:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/ColonMethodCall:
  Exclude:
    - 'lib/string_ext.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Keywords.
# Keywords: TODO, FIXME, OPTIMIZE, HACK, REVIEW
Style/CommentAnnotation:
  Exclude:
    - 'spec/ssh_scan/banner/os/raspbian_spec.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: SingleLineConditionsOnly.
Style/ConditionalAssignment:
  Exclude:
    - 'lib/ssh_scan/ssh_lib/dropbear.rb'
    - 'lib/ssh_scan/target_parser.rb'
    - 'bin/ssh_scan'

# Offense count: 10
# Cop supports --auto-correct.
Style/DefWithParentheses:
  Exclude:
    - 'lib/ssh_scan/banner.rb'
    - 'lib/ssh_scan/client.rb'
    - 'lib/ssh_scan/ssh_lib/flowssh.rb'
    - 'lib/ssh_scan/ssh_lib/ipssh.rb'
    - 'lib/ssh_scan/ssh_lib/mpssh.rb'
    - 'lib/ssh_scan/ssh_lib/nosssh.rb'
    - 'lib/ssh_scan/ssh_lib/openssh.rb'
    - 'lib/ssh_scan/ssh_lib/romsshell.rb'

# Offense count: 53
Style/Documentation:
  Enabled: false

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: AllowAdjacentOneLineDefs.
Style/EmptyLineBetweenDefs:
  Exclude:
    - 'lib/ssh_scan/error/connect_timeout.rb'
    - 'lib/ssh_scan/error/connection_refused.rb'
    - 'lib/ssh_scan/error/disconnected.rb'
    - 'lib/ssh_scan/error/no_banner.rb'
    - 'lib/ssh_scan/error/no_kex_response.rb'
    - 'lib/ssh_scan/os/ubuntu.rb'
    - 'lib/ssh_scan/ssh_lib/dropbear.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyLines:
  Exclude:
    - 'lib/ssh_scan/api.rb'

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, no_empty_lines
Style/EmptyLinesAroundBlockBody:
  Exclude:
    - 'spec/ssh_scan/policy_manager_spec.rb'
    - 'spec/ssh_scan/policy_spec.rb'
    - 'spec/ssh_scan/protocol_spec.rb'
    - 'spec/ssh_scan/string_ext_spec.rb'
    - 'spec/ssh_scan/version_spec.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: empty_lines, no_empty_lines
Style/EmptyLinesAroundClassBody:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'
    - 'lib/string_ext.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/EmptyLinesAroundMethodBody:
  Exclude:
    - 'lib/string_ext.rb'

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, ForceEqualSignAlignment.
Style/ExtraSpacing:
  Exclude:
    - 'Rakefile'
    - 'lib/string_ext.rb'
    - 'spec/ssh_scan/policy_manager_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: consistent, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
Style/FirstParameterIndentation:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'

# Offense count: 1
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: for, each
Style/For:
  Enabled: false

# Offense count: 5
# Configuration parameters: MinBodyLength.
Style/GuardClause:
  Exclude:
    - 'lib/ssh_scan/banner.rb'
    - 'lib/ssh_scan/scan_engine.rb'
    - 'lib/ssh_scan/update.rb'
    - 'lib/string_ext.rb'
    - 'Rakefile'

# Offense count: 423
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, UseHashRocketsWithSymbolValues.
# SupportedStyles: ruby19, ruby19_no_mixed_keys, hash_rockets
Style/HashSyntax:
  Enabled: false

# Offense count: 2
Style/IfInsideElse:
  Exclude:
    - 'bin/ssh_scan'
    - 'lib/ssh_scan/target_parser.rb'

# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: MaxLineLength.
Style/IfUnlessModifier:
  Exclude:
    - 'lib/ssh_scan/os/ubuntu.rb'
    - 'lib/ssh_scan/policy_manager.rb'
    - 'lib/ssh_scan/scan_engine.rb'
    - 'lib/ssh_scan/target_parser.rb'
    - 'lib/ssh_scan/update.rb'

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Style/IndentArray:
  Enabled: false

# Offense count: 17
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_braces
Style/IndentHash:
  Enabled: false

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: normal, rails
Style/IndentationConsistency:
  Exclude:
    - 'spec/ssh_scan/string_ext_spec.rb'

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: Width.
Style/IndentationWidth:
  Exclude:
    - 'lib/ssh_scan/client.rb'
    - 'spec/ssh_scan/string_ext_spec.rb'

# Offense count: 11
# Cop supports --auto-correct.
Style/Lambda:
  Exclude:
    - 'lib/ssh_scan/protocol.rb'

# Offense count: 11
# Cop supports --auto-correct.
Style/LeadingCommentSpace:
  Exclude:
    - 'bin/ssh_scan'
    - 'lib/ssh_scan.rb'
    - 'spec/ssh_scan/fingerprint_database_spec.rb'
    - 'spec/ssh_scan/protocol_spec.rb'

# Offense count: 151
# Cop supports --auto-correct.
Style/LineEndConcatenation:
  Exclude:
    - 'Rakefile'
    - 'bin/ssh_scan'
    - 'bin/ssh_scan_api'
    - 'lib/ssh_scan/constants.rb'
    - 'spec/ssh_scan/constants_spec.rb'
    - 'spec/ssh_scan/policy_manager_spec.rb'
    - 'spec/ssh_scan/policy_spec.rb'
    - 'spec/ssh_scan/protocol_spec.rb'

# Offense count: 34
# Cop supports --auto-correct.
Style/MethodCallParentheses:
  Exclude:
    - 'bin/ssh_scan'
    - 'lib/ssh_scan/api.rb'
    - 'lib/ssh_scan/banner.rb'
    - 'lib/ssh_scan/protocol.rb'
    - 'lib/ssh_scan/scan_engine.rb'
    - 'spec/ssh_scan/policy_manager_spec.rb'
    - 'spec/ssh_scan/target_parser_spec.rb'

# Offense count: 2
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: snake_case, camelCase
Style/MethodName:
  Enabled: false

# Offense count: 3
# Cop supports --auto-correct.
Style/MultilineArrayBraceLayout:
  Exclude:
    - 'Rakefile'
    - 'spec/ssh_scan/api_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/MultilineHashBraceLayout:
  Exclude:
    - 'spec/ssh_scan/protocol_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/MultilineMethodCallBraceLayout:
  Exclude:
    - 'spec/ssh_scan/client_spec.rb'

# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, IndentationWidth.
# SupportedStyles: aligned, indented
Style/MultilineOperationIndentation:
  Enabled: false

# Offense count: 8
# Cop supports --auto-correct.
Style/MutableConstant:
  Exclude:
    - 'Rakefile'
    - 'lib/ssh_scan/os/ubuntu.rb'
    - 'lib/ssh_scan/version.rb'
    - 'spec/ssh_scan/banner/ssh_lib/dropbear_spec.rb'
    - 'spec/ssh_scan/enforce_signed_commits.rb'

# Offense count: 9
# Cop supports --auto-correct.
Style/NegatedIf:
  Exclude:
    - 'Rakefile'
    - 'bin/ssh_scan'
    - 'lib/ssh_scan/client.rb'
    - 'lib/ssh_scan/policy_manager.rb'
    - 'lib/ssh_scan/target_parser.rb'
    - 'scripts/Ubuntu.rb'

# Offense count: 7
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, MinBodyLength, SupportedStyles.
# SupportedStyles: skip_modifier_ifs, always
Style/Next:
  Exclude:
    - 'bin/ssh_scan'
    - 'lib/ssh_scan/scan_engine.rb'
    - 'scripts/Ubuntu.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/NilComparison:
  Exclude:
    - 'lib/ssh_scan/ssh_lib/dropbear.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/Not:
  Exclude:
    - 'lib/ssh_scan/policy_manager.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/NumericLiterals:
  MinDigits: 6

# Offense count: 1
# Configuration parameters: SupportedStyles.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
  EnforcedStyle: compact

# Offense count: 3
# Cop supports --auto-correct.
Style/RedundantBegin:
  Exclude:
    - 'lib/ssh_scan/client.rb'
    - 'lib/string_ext.rb'

# Offense count: 32
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
  Enabled: false

# Offense count: 32
# Cop supports --auto-correct.
Style/RedundantSelf:
  Exclude:
    - 'lib/ssh_scan/banner.rb'
    - 'lib/ssh_scan/fingerprint_database.rb'
    - 'lib/ssh_scan/policy.rb'
    - 'lib/ssh_scan/protocol.rb'
    - 'lib/string_ext.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/RescueEnsureAlignment:
  Exclude:
    - 'lib/ssh_scan/client.rb'

# Offense count: 65
# Cop supports --auto-correct.
Style/SpaceAfterComma:
  Exclude:
    - 'lib/ssh_scan/constants.rb'
    - 'lib/ssh_scan/target_parser.rb'
    - 'lib/string_ext.rb'
    - 'spec/ssh_scan/policy_manager_spec.rb'
    - 'spec/ssh_scan/protocol_spec.rb'

# Offense count: 6
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Style/SpaceAroundOperators:
  Exclude:
    - 'spec/ssh_scan/client_spec.rb'
    - 'spec/ssh_scan/policy_manager_spec.rb'
    - 'spec/ssh_scan/protocol_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
Style/SpaceInsideBlockBraces:
  Enabled: false

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SupportedStyles.
# SupportedStyles: space, no_space
Style/SpaceInsideHashLiteralBraces:
  Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
Style/SpaceInsideParens:
  Exclude:
    - 'lib/ssh_scan/fingerprint_database.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: SupportedStyles.
# SupportedStyles: use_perl_names, use_english_names
Style/SpecialGlobalVars:
  EnforcedStyle: use_perl_names

# Offense count: 1428
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
  Enabled: false

# Offense count: 10
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation:
  Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: IgnoredMethods.
# IgnoredMethods: respond_to
Style/SymbolProc:
  Exclude:
    - 'lib/string_ext.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: final_newline, final_blank_line
Style/TrailingBlankLines:
  Exclude:
    - 'lib/ssh_scan/os/ros.rb'
    - 'lib/ssh_scan/ssh_lib/rosssh.rb'
    - 'lib/ssh_scan/target_parser.rb'
    - 'spec/ssh_scan/string_ext_spec.rb'

# Offense count: 117
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStyles.
# SupportedStyles: comma, consistent_comma, no_comma
Style/TrailingCommaInLiteral:
  Enabled: false

# Offense count: 3
# Cop supports --auto-correct.
Style/TrailingWhitespace:
  Exclude:
    - 'lib/ssh_scan/scan_engine.rb'
    - 'lib/ssh_scan/ssh_lib/ciscossh.rb'
    - 'scripts/Ubuntu.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/UnneededInterpolation:
  Exclude:
    - 'lib/ssh_scan/error/closed_connection.rb'

# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, SupportedStyles, MinSize, WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
  Enabled: false