ctran/annotate_models

View on GitHub
.rubocop_todo.yml

Summary

Maintainability
Test Coverage
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-04-06 10:26:11 +0900 using RuboCop version 0.68.1.
# 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
# Cop supports --auto-correct.
# Configuration parameters: TreatCommentsAsGroupSeparators, Include.
# Include: **/*.gemspec
Gemspec/OrderedDependencies:
  Exclude:
    - 'annotate.gemspec'

# Offense count: 1
# Configuration parameters: Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
  Exclude:
    - 'annotate.gemspec'

# Offense count: 65
# Cop supports --auto-correct.
# Configuration parameters: EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/AlignHash:
  Exclude:
    - 'lib/generators/annotate/templates/auto_annotate_models.rake'
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleAlignWith.
# SupportedStylesAlignWith: either, start_of_block, start_of_line
Layout/BlockAlignment:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 9
# Cop supports --auto-correct.
Layout/EmptyLineAfterGuardClause:
  Exclude:
    - 'Rakefile'
    - 'lib/annotate.rb'
    - 'lib/annotate/annotate_models.rb'

# Offense count: 2
# Cop supports --auto-correct.
Layout/EmptyLineAfterMagicComment:
  Exclude:
    - 'annotate.gemspec'
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
Layout/ExtraSpacing:
  Exclude:
    - 'Guardfile'
    - 'lib/annotate/annotate_models.rb'
    - 'lib/tasks/annotate_routes.rake'

# Offense count: 16
# Cop supports --auto-correct.
# Configuration parameters: IndentationWidth.
# SupportedStyles: special_inside_parentheses, consistent, align_brackets
Layout/IndentFirstArrayElement:
  EnforcedStyle: consistent

# Offense count: 5
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: aligned, indented
Layout/MultilineOperationIndentation:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
Layout/SpaceAroundEqualsInParameterDefault:
  Exclude:
    - 'lib/annotate/annotate_routes.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment.
Layout/SpaceAroundOperators:
  Exclude:
    - 'lib/annotate/annotate_models.rb'
    - 'lib/tasks/annotate_routes.rake'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceBeforeBlockBraces:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
Layout/SpaceBeforeComment:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces, SpaceBeforeBlockParameters.
# SupportedStyles: space, no_space
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideBlockBraces:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
  Exclude:
    - 'lib/tasks/annotate_models.rake'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
Layout/SpaceInsideParens:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space
Layout/SpaceInsideStringInterpolation:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
  Exclude:
    - 'spec/lib/annotate/annotate_routes_spec.rb'

# Offense count: 2
# Configuration parameters: AllowSafeAssignment.
Lint/AssignmentInCondition:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
Lint/HandleExceptions:
  Exclude:
    - 'bin/annotate'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: runtime_error, standard_error
Lint/InheritException:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Configuration parameters: MaximumRangeSize.
Lint/MissingCopEnableDirective:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 2
Lint/RescueException:
  Exclude:
    - 'Rakefile'

# Offense count: 1
Lint/ShadowingOuterLocalVariable:
  Exclude:
    - 'Rakefile'

# Offense count: 22
Metrics/AbcSize:
  Max: 103

# Offense count: 7
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
  Max: 53

# Offense count: 1
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
  Max: 4

# Offense count: 12
Metrics/CyclomaticComplexity:
  Max: 25

# Offense count: 30
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/MethodLength:
  Max: 40

# Offense count: 9
Metrics/PerceivedComplexity:
  Max: 28

# Offense count: 1
Naming/AccessorMethodName:
  Exclude:
    - 'lib/annotate.rb'

# Offense count: 103
# Configuration parameters: Blacklist.
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
  Exclude:
    - 'spec/lib/annotate/annotate_models_spec.rb'
    - 'spec/lib/annotate/annotate_routes_spec.rb'

# Offense count: 1
# Configuration parameters: EnforcedStyleForLeadingUnderscores.
# SupportedStylesForLeadingUnderscores: disallowed, required, optional
Naming/MemoizedInstanceVariableName:
  Exclude:
    - 'lib/annotate/annotate_routes.rb'

# Offense count: 1
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db
Naming/UncommunicativeMethodParamName:
  Exclude:
    - 'Rakefile'

# Offense count: 2
# Configuration parameters: EnforcedStyle.
# SupportedStyles: inline, group
Style/AccessModifierDeclarations:
  Exclude:
    - 'lib/annotate/annotate_models.rb'
    - 'lib/annotate/annotate_routes/header_generator.rb'

# Offense count: 1
Style/CaseEquality:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
  Exclude:
    - 'lib/annotate/active_record_patch.rb'

# Offense count: 2
Style/ClassVars:
  Exclude:
    - 'lib/tasks/annotate_models_migrate.rake'

# Offense count: 1
# Cop supports --auto-correct.
Style/Dir:
  Exclude:
    - 'bin/annotate'

# Offense count: 10
Style/Documentation:
  Exclude:
    - 'spec/**/*'
    - 'test/**/*'
    - 'lib/annotate.rb'
    - 'lib/annotate/active_record_patch.rb'
    - 'lib/annotate/annotate_models.rb'
    - 'lib/annotate/annotate_routes.rb'
    - 'lib/annotate/annotate_routes/header_generator.rb'
    - 'lib/annotate/annotate_routes/helpers.rb'
    - 'lib/annotate/version.rb'
    - 'lib/generators/annotate/install_generator.rb'
    - 'lib/tasks/annotate_models_migrate.rake'

# Offense count: 2
# Cop supports --auto-correct.
Style/Encoding:
  Exclude:
    - 'annotate.gemspec'
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/ExpandPathArguments:
  Exclude:
    - 'annotate.gemspec'

# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: format, sprintf, percent
Style/FormatString:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 23
# Configuration parameters: EnforcedStyle.
# SupportedStyles: annotated, template, unannotated
Style/FormatStringToken:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 30
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: when_needed, always, never
Style/FrozenStringLiteralComment:
  Enabled: false

# Offense count: 1
# Configuration parameters: MinBodyLength.
Style/GuardClause:
  Exclude:
    - 'lib/tasks/annotate_models_migrate.rake'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
Style/HashSyntax:
  Exclude:
    - 'lib/tasks/annotate_routes.rake'
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 7
# Cop supports --auto-correct.
Style/IfUnlessModifier:
  Exclude:
    - 'Rakefile'
    - 'bin/annotate'
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: InverseMethods, InverseBlocks.
Style/InverseMethods:
  Exclude:
    - 'Rakefile'

# Offense count: 1
Style/MethodMissingSuper:
  Exclude:
    - 'lib/annotate/active_record_patch.rb'

# Offense count: 1
Style/MissingRespondToMissing:
  Exclude:
    - 'lib/annotate/active_record_patch.rb'

# Offense count: 1
Style/MixinUsage:
  Exclude:
    - 'Rakefile'

# Offense count: 2
Style/MultilineBlockChain:
  Exclude:
    - 'Rakefile'
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: Whitelist.
# Whitelist: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
Style/NestedParenthesizedCalls:
  Exclude:
    - 'bin/annotate'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
  Exclude:
    - 'spec/**/*'
    - 'lib/annotate.rb'
    - 'lib/annotate/annotate_models.rb'

# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: PreferredDelimiters.
Style/PercentLiteralDelimiters:
  Exclude:
    - 'annotate.gemspec'
    - 'lib/annotate/annotate_models.rb'
    - 'lib/annotate/annotate_routes.rb'
    - 'lib/tasks/annotate_models_migrate.rake'
    - 'spec/lib/annotate/annotate_models_spec.rb'
    - 'spec/lib/tasks/annotate_models_migrate_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 3
# Cop supports --auto-correct.
Style/RedundantBegin:
  Exclude:
    - 'lib/annotate/annotate_models.rb'
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantParentheses:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AllowMultipleReturnValues.
Style/RedundantReturn:
  Exclude:
    - 'lib/annotate/annotate_routes/helpers.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/RedundantSelf:
  Exclude:
    - 'lib/tasks/annotate_models_migrate.rake'

# Offense count: 12
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, AllowInnerSlashes.
# SupportedStyles: slashes, percent_r, mixed
Style/RegexpLiteral:
  Exclude:
    - 'Rakefile'
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/RescueModifier:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Style/RescueStandardError:
  Exclude:
    - 'lib/annotate.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist.
# Whitelist: present?, blank?, presence, try, try!
Style/SafeNavigation:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 15
# Cop supports --auto-correct.
Style/StderrPuts:
  Exclude:
    - 'Rakefile'
    - 'lib/annotate.rb'
    - 'lib/annotate/annotate_models.rb'

# Offense count: 55
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
  Exclude:
    - 'annotate.gemspec'
    - 'lib/annotate/annotate_models.rb'
    - 'lib/annotate/parser.rb'
    - 'lib/tasks/annotate_models_migrate.rake'
    - 'lib/tasks/annotate_routes.rake'
    - 'spec/lib/annotate/annotate_models_spec.rb'
    - 'spec/lib/annotate/parser_spec.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiteralsInInterpolation:
  Exclude:
    - 'lib/annotate/annotate_models.rb'

# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: MinSize.
# SupportedStyles: percent, brackets
Style/SymbolArray:
  EnforcedStyle: brackets

# Offense count: 1
# Cop supports --auto-correct.
Style/SymbolLiteral:
  Exclude:
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArrayLiteral:
  Exclude:
    - 'spec/lib/annotate/annotate_models_spec.rb'

# Offense count: 2
# Cop supports --auto-correct.
Style/UnneededPercentQ:
  Exclude:
    - 'annotate.gemspec'

# Offense count: 381
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
  Max: 264