botanicus/interfacer

View on GitHub
.rubocop.yml

Summary

Maintainability
Test Coverage
AllCops:
  TargetRubyVersion: 2.5

# list = posts.map { |post| post.title.strip }.
#   select ...
Layout/DotPosition:
  EnforcedStyle: trailing

# var = if condition
#         code       # Layout/IndentationWidth
#       else         # Layout/ElseAlignment
#       end          # Layout/EndAlignment
Layout/ElseAlignment:
  Enabled: no
Layout/EndAlignment:
  Enabled: no
Layout/IndentationWidth:
  Enabled: no
Layout/FirstParameterIndentation:
  Enabled: no
Layout/AccessModifierIndentation:
  Enabled: no
Layout/AlignArray:
  Enabled: no
Layout/IndentArray:
  Enabled: no
Layout/IndentHash:
  Enabled: no

# Interfacer, Route, store = import('registry').
#                            grab(:Interfacer, :Route, :data_store)
Layout/MultilineMethodCallIndentation:
  Enabled: no

# def initialize(id: nil, title:, body:)# , author:, tags: Array.new)
# def initialize(id: nil, title:, body:) # , author:, tags: Array.new)
Layout/SpaceBeforeComment:
  Enabled: no

# {a: 1} vs. { a: 1 }
#
# Configuration parameters: EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
  EnforcedStyle: no_space

# SupportedStyles: require_no_space, require_space
# Do not change `-> (example) { ... }` to `->(example) {}`.
Layout/SpaceInLambdaLiteral:
  EnforcedStyle: require_space

  # Do not add an empty line around `private|protected`.
Layout/EmptyLinesAroundAccessModifier:
  Enabled: no

# Enable `if id = params[:id]`.
Lint/AssignmentInCondition:
  Enabled: no

# Disable renaming unused variables to their `_var` versions.
Lint/UnusedMethodArgument:
  Enabled: no
Lint/UnusedBlockArgument:
  Enabled: no

# Disable warning about long blocks (i. e. `Class.new { ... lines }`).
Metrics/BlockLength:
  Enabled: no

# Disables the following warning:
# Do not place comments on the same line as the def keyword.
#
# def initialize(id: nil, title:, body:)#, author:, tags: Array.new)
Style/CommentedKeyword:
  Enabled: no
# @prompt.data# .merge(total: total_data[:total])
Layout/LeadingCommentSpace:
  Enabled: no

# Do not change Hash.new to {}. I happen to like it this way dammit!
Style/EmptyLiteral:
  Enabled: no

# Disable warning about optional arguments in front.
# def render(status_code = 200, content)
Style/OptionalArguments:
  Enabled: no

# Do not warn about `@a, @b = a, b`.
Style/ParallelAssignment:
  Enabled: no

# Do not remove `self`, it is not redundant.
Style/RedundantSelf:
  Enabled: no

# Do not warn about `require 'pg'; PG.connect(dbname: 'blog')`.
Style/Semicolon:
  Enabled: no

# Do not change an empty method to a one-liner.
Style/EmptyMethod:
  EnforcedStyle: expanded

# Prefer `[:a, :b, :c]` over `%i[a b c]`.
Style/SymbolArray:
  EnforcedStyle: brackets
Style/WordArray:
  Enabled: no

# Do not change `Proc.new` to `proc`.
Style/Proc:
  Enabled: no

Style/TernaryParentheses:
  Enabled: no

# Do not enforce one particular style of quotation.
Style/StringLiterals:
  # EnforcedStyle: single_quotes | double_quotes
  Enabled: no

# The standard is 80, but I can fit 90 x 90 into a split screen.
Metrics/LineLength:
  Max: 90

Metrics/AbcSize:
  Max: 43

# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
  Max: 210

# Configuration parameters: CountComments.
Metrics/ClassLength:
  Max: 116

Metrics/CyclomaticComplexity:
  Max: 10

# Configuration parameters: CountComments.
Metrics/MethodLength:
  Max: 36

# Configuration parameters: CountComments.
Metrics/ModuleLength:
  Max: 115

# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
  Max: 11

# TODO: This converts `block.call` to `yield`, but it leaves the `&block`
#       in the arguments. Does it really help like this? It feels inconsistent.
Performance/RedundantBlockCall:
  Enabled: no

# Configuration parameters: EnforcedStyle, 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:
  EnforcedStyle: braces_for_chaining

# Project-specific.
#
# Disable warning about `Interfacer, Route = import('registry').grab(...)`.
Naming/ConstantName:
  Enabled: no