# rubocop yml config example # https://github.com/ryshinoz/rubocop_sample ######## Rubocop Config ######## AllCops: Exclude: - vendor/**/* - db/**/* - config/**/* - tmp/**/* - log/**/* TargetRubyVersion: 2.3 # NOTE 4 系を利用している場合は書き換える TargetRailsVersion: 5.0 AndOr: Enabled: false CommentAnnotation: Enabled: false # NOTE チームで推奨しているスタイルを差異があるため Lint/BlockAlignment: Enabled: false Lint/EndAlignment: Enabled: false Lint/UnderscorePrefixedVariableName: Enabled: false Lint/AssignmentInCondition: Enabled: false Lint/UnusedBlockArgument: Enabled: true Lint/UnusedMethodArgument: Enabled: true Lint/UselessAssignment: Enabled: true Lint/UselessComparison: Enabled: true Lint/Void: Enabled: true Metrics/AbcSize: Max: 1000 Metrics/BlockLength: Max: 150 CountComments: false # NOTE RSpec のブロックは長くなるため Exclude: - "**/*_spec.rb" - "spec/support/*.rb" Metrics/ClassLength: Max: 1000 Metrics/CyclomaticComplexity: Max: 50 Metrics/LineLength: Enabled: false Metrics/MethodLength: Enabled: false NumericLiterals: MinDigits: 12 Rails: Enabled: true Rails/ActionFilter: Enabled: false Rails/Delegate: Enabled: true Rails/HttpPositionalArguments: Enabled: false Rails/Validation: Enabled: true RedundantSelf: Enabled: false Style/AlignParameters: EnforcedStyle: with_fixed_indentation Style/AsciiComments: Enabled: false Style/BlockDelimiters: Enabled: false Style/BracesAroundHashParameters: EnforcedStyle: no_braces Style/CaseEquality: Enabled: false Style/CaseIndentation: EnforcedStyle: end Style/ClassAndModuleChildren: Enabled: false Style/CollectionMethods: Enabled: false Style/Documentation: Enabled: false Style/EmptyLiteral: Enabled: false Style/GuardClause: MinBodyLength: 3 Style/IfUnlessModifier: MaxLineLength: 60 Style/IndentHash: Enabled: false Style/IndentationWidth: Enabled: false Style/Lambda: Enabled: false Style/MultilineBlockChain: Enabled: false Style/MultilineOperationIndentation: Enabled: false # NOTE () で統一していたため [] への変更はしない Style/PercentLiteralDelimiters: PreferredDelimiters: default: () '%r': '{}' '%w': '()' '%W': '()' '%i': '()' '%I': '()' Style/PredicateName: Enabled: false Style/Semicolon: Enabled: false Style/SignalException: EnforcedStyle: only_raise Style/SpaceBeforeBlockBraces: EnforcedStyle: space Style/SpaceInsideBlockBraces: EnforcedStyle: space SpaceBeforeBlockParameters: false Style/SpaceInsideHashLiteralBraces: EnforcedStyle: no_space Style/TrailingUnderscoreVariable: Enabled: false Style/WhenThen: Enabled: false SingleLineMethods: Enabled: false