|
| 1 | +AllCops: |
| 2 | + TargetRubyVersion: 2.5 |
| 3 | + |
| 4 | +# list = posts.map { |post| post.title.strip }. |
| 5 | +# select ... |
| 6 | +Layout/DotPosition: |
| 7 | + EnforcedStyle: trailing |
| 8 | + |
| 9 | +# var = if condition |
| 10 | +# code # Layout/IndentationWidth |
| 11 | +# else # Layout/ElseAlignment |
| 12 | +# end # Layout/EndAlignment |
| 13 | +Layout/ElseAlignment: |
| 14 | + Enabled: no |
| 15 | +Layout/EndAlignment: |
| 16 | + Enabled: no |
| 17 | +Layout/IndentationWidth: |
| 18 | + Enabled: no |
| 19 | +Layout/FirstParameterIndentation: |
| 20 | + Enabled: no |
| 21 | +Layout/AccessModifierIndentation: |
| 22 | + Enabled: no |
| 23 | +Layout/AlignArray: |
| 24 | + Enabled: no |
| 25 | +Layout/IndentArray: |
| 26 | + Enabled: no |
| 27 | +Layout/IndentHash: |
| 28 | + Enabled: no |
| 29 | + |
| 30 | +# Interfacer, Route, store = import('registry'). |
| 31 | +# grab(:Interfacer, :Route, :data_store) |
| 32 | +Layout/MultilineMethodCallIndentation: |
| 33 | + Enabled: no |
| 34 | + |
| 35 | +# def initialize(id: nil, title:, body:)# , author:, tags: Array.new) |
| 36 | +# def initialize(id: nil, title:, body:) # , author:, tags: Array.new) |
| 37 | +Layout/SpaceBeforeComment: |
| 38 | + Enabled: no |
| 39 | + |
| 40 | +# {a: 1} vs. { a: 1 } |
| 41 | +# |
| 42 | +# Configuration parameters: EnforcedStyleForEmptyBraces. |
| 43 | +# SupportedStyles: space, no_space, compact |
| 44 | +# SupportedStylesForEmptyBraces: space, no_space |
| 45 | +Layout/SpaceInsideHashLiteralBraces: |
| 46 | + EnforcedStyle: no_space |
| 47 | + |
| 48 | +# SupportedStyles: require_no_space, require_space |
| 49 | +# Do not change `-> (example) { ... }` to `->(example) {}`. |
| 50 | +Layout/SpaceInLambdaLiteral: |
| 51 | + EnforcedStyle: require_space |
| 52 | + |
| 53 | + # Do not add an empty line around `private|protected`. |
| 54 | +Layout/EmptyLinesAroundAccessModifier: |
| 55 | + Enabled: no |
| 56 | + |
| 57 | +# Enable `if id = params[:id]`. |
| 58 | +Lint/AssignmentInCondition: |
| 59 | + Enabled: no |
| 60 | + |
| 61 | +# Disable renaming unused variables to their `_var` versions. |
| 62 | +Lint/UnusedMethodArgument: |
| 63 | + Enabled: no |
| 64 | +Lint/UnusedBlockArgument: |
| 65 | + Enabled: no |
| 66 | + |
| 67 | +# Disable warning about long blocks (i. e. `Class.new { ... lines }`). |
| 68 | +Metrics/BlockLength: |
| 69 | + Enabled: no |
| 70 | + |
| 71 | +# Disables the following warning: |
| 72 | +# Do not place comments on the same line as the def keyword. |
| 73 | +# |
| 74 | +# def initialize(id: nil, title:, body:)#, author:, tags: Array.new) |
| 75 | +Style/CommentedKeyword: |
| 76 | + Enabled: no |
| 77 | +# @prompt.data# .merge(total: total_data[:total]) |
| 78 | +Layout/LeadingCommentSpace: |
| 79 | + Enabled: no |
| 80 | + |
| 81 | +# Do not change Hash.new to {}. I happen to like it this way dammit! |
| 82 | +Style/EmptyLiteral: |
| 83 | + Enabled: no |
| 84 | + |
| 85 | +# Disable warning about optional arguments in front. |
| 86 | +# def render(status_code = 200, content) |
| 87 | +Style/OptionalArguments: |
| 88 | + Enabled: no |
| 89 | + |
| 90 | +# Do not warn about `@a, @b = a, b`. |
| 91 | +Style/ParallelAssignment: |
| 92 | + Enabled: no |
| 93 | + |
| 94 | +# Do not remove `self`, it is not redundant. |
| 95 | +Style/RedundantSelf: |
| 96 | + Enabled: no |
| 97 | + |
| 98 | +# Do not warn about `require 'pg'; PG.connect(dbname: 'blog')`. |
| 99 | +Style/Semicolon: |
| 100 | + Enabled: no |
| 101 | + |
| 102 | +# Do not change an empty method to a one-liner. |
| 103 | +Style/EmptyMethod: |
| 104 | + EnforcedStyle: expanded |
| 105 | + |
| 106 | +# Prefer `[:a, :b, :c]` over `%i[a b c]`. |
| 107 | +Style/SymbolArray: |
| 108 | + EnforcedStyle: brackets |
| 109 | +Style/WordArray: |
| 110 | + Enabled: no |
| 111 | + |
| 112 | +# Do not change `Proc.new` to `proc`. |
| 113 | +Style/Proc: |
| 114 | + Enabled: no |
| 115 | + |
| 116 | +Style/TernaryParentheses: |
| 117 | + Enabled: no |
| 118 | + |
| 119 | +# Do not enforce one particular style of quotation. |
| 120 | +Style/StringLiterals: |
| 121 | + # EnforcedStyle: single_quotes | double_quotes |
| 122 | + Enabled: no |
| 123 | + |
| 124 | +# The standard is 80, but I can fit 90 x 90 into a split screen. |
| 125 | +Metrics/LineLength: |
| 126 | + Max: 90 |
| 127 | + |
| 128 | +Metrics/AbcSize: |
| 129 | + Max: 43 |
| 130 | + |
| 131 | +# Configuration parameters: CountComments, ExcludedMethods. |
| 132 | +Metrics/BlockLength: |
| 133 | + Max: 210 |
| 134 | + |
| 135 | +# Configuration parameters: CountComments. |
| 136 | +Metrics/ClassLength: |
| 137 | + Max: 116 |
| 138 | + |
| 139 | +Metrics/CyclomaticComplexity: |
| 140 | + Max: 10 |
| 141 | + |
| 142 | +# Configuration parameters: CountComments. |
| 143 | +Metrics/MethodLength: |
| 144 | + Max: 36 |
| 145 | + |
| 146 | +# Configuration parameters: CountComments. |
| 147 | +Metrics/ModuleLength: |
| 148 | + Max: 115 |
| 149 | + |
| 150 | +# Configuration parameters: CountKeywordArgs. |
| 151 | +Metrics/ParameterLists: |
| 152 | + Max: 11 |
| 153 | + |
| 154 | +# TODO: This converts `block.call` to `yield`, but it leaves the `&block` |
| 155 | +# in the arguments. Does it really help like this? It feels inconsistent. |
| 156 | +Performance/RedundantBlockCall: |
| 157 | + Enabled: no |
| 158 | + |
| 159 | +# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods. |
| 160 | +# SupportedStyles: line_count_based, semantic, braces_for_chaining |
| 161 | +# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object |
| 162 | +# FunctionalMethods: let, let!, subject, watch |
| 163 | +# IgnoredMethods: lambda, proc, it |
| 164 | +Style/BlockDelimiters: |
| 165 | + EnforcedStyle: braces_for_chaining |
0 commit comments