|
| 1 | +# The behavior of RuboCop can be controlled via the .rubocop.yml |
| 2 | +# configuration file. It makes it possible to enable/disable |
| 3 | +# certain cops (checks) and to alter their behavior if they accept |
| 4 | +# any parameters. The file can be placed either in your home |
| 5 | +# directory or in some project directory. |
| 6 | +# |
| 7 | +# RuboCop will start looking for the configuration file in the directory |
| 8 | +# where the inspected file is and continue its way up to the root directory. |
| 9 | +# |
| 10 | +# See https://docs.rubocop.org/rubocop/configuration |
| 11 | + |
| 12 | +# General |
| 13 | +AllCops: |
| 14 | + NewCops: enable |
| 15 | + SuggestExtensions: false |
| 16 | + |
| 17 | +# Layout |
| 18 | +Layout/BlockAlignment: |
| 19 | + Enabled: true |
| 20 | + EnforcedStyleAlignWith: start_of_block |
| 21 | + |
| 22 | +Layout/ClassStructure: |
| 23 | + Enabled: true |
| 24 | + |
| 25 | +Layout/DotPosition: |
| 26 | + Enabled: true |
| 27 | + EnforcedStyle: leading |
| 28 | + |
| 29 | +Layout/FirstArrayElementIndentation: |
| 30 | + Enabled: true |
| 31 | + EnforcedStyle: consistent |
| 32 | + |
| 33 | +Layout/FirstHashElementIndentation: |
| 34 | + Enabled: true |
| 35 | + EnforcedStyle: consistent |
| 36 | + |
| 37 | +Layout/HashAlignment: |
| 38 | + Enabled: true |
| 39 | + EnforcedColonStyle: key |
| 40 | + EnforcedLastArgumentHashStyle: always_inspect |
| 41 | + |
| 42 | +Layout/LineEndStringConcatenationIndentation: |
| 43 | + Enabled: true |
| 44 | + EnforcedStyle: aligned |
| 45 | + |
| 46 | +Layout/LineLength: |
| 47 | + Enabled: true |
| 48 | + Max: 120 |
| 49 | + |
| 50 | +Layout/MultilineArrayLineBreaks: |
| 51 | + Enabled: true |
| 52 | + |
| 53 | +Layout/MultilineAssignmentLayout: |
| 54 | + Enabled: false |
| 55 | + |
| 56 | +Layout/MultilineHashKeyLineBreaks: |
| 57 | + Enabled: true |
| 58 | + |
| 59 | +Layout/MultilineMethodArgumentLineBreaks: |
| 60 | + Enabled: true |
| 61 | + |
| 62 | +Layout/MultilineMethodCallIndentation: |
| 63 | + Enabled: true |
| 64 | + EnforcedStyle: indented_relative_to_receiver |
| 65 | + |
| 66 | +Layout/MultilineOperationIndentation: |
| 67 | + Enabled: true |
| 68 | + EnforcedStyle: indented |
| 69 | + |
| 70 | +Layout/ParameterAlignment: |
| 71 | + Enabled: true |
| 72 | + EnforcedStyle: with_first_parameter |
| 73 | + |
| 74 | +Layout/RedundantLineBreak: |
| 75 | + Enabled: true |
| 76 | + InspectBlocks: false |
| 77 | + |
| 78 | +Layout/SingleLineBlockChain: |
| 79 | + Enabled: false |
| 80 | + |
| 81 | +Layout/SpaceBeforeBrackets: |
| 82 | + Enabled: true |
| 83 | + |
| 84 | +Layout/TrailingEmptyLines: |
| 85 | + Enabled: true |
| 86 | + EnforcedStyle: final_newline |
| 87 | + |
| 88 | +# Lint |
| 89 | +Lint/AmbiguousAssignment: |
| 90 | + Enabled: true |
| 91 | + |
| 92 | +Lint/AmbiguousOperatorPrecedence: |
| 93 | + Enabled: true |
| 94 | + |
| 95 | +Lint/AmbiguousRange: |
| 96 | + Enabled: true |
| 97 | + |
| 98 | +# Metrics |
| 99 | +Metrics/AbcSize: |
| 100 | + Max: 20 |
| 101 | + Exclude: |
| 102 | + - "test/**/*" |
| 103 | + |
| 104 | +Metrics/ClassLength: |
| 105 | + Max: 150 |
| 106 | + CountAsOne: |
| 107 | + - array |
| 108 | + - hash |
| 109 | + - heredoc |
| 110 | + Exclude: |
| 111 | + - "test/**/*" |
| 112 | + |
| 113 | +Metrics/MethodLength: |
| 114 | + Max: 20 |
| 115 | + CountAsOne: |
| 116 | + - array |
| 117 | + - hash |
| 118 | + - heredoc |
| 119 | + Exclude: |
| 120 | + - "test/**/*" |
| 121 | + |
| 122 | +# Naming |
| 123 | +Naming/InclusiveLanguage: |
| 124 | + Enabled: true |
| 125 | + |
| 126 | +Naming/VariableNumber: |
| 127 | + EnforcedStyle: snake_case |
| 128 | + |
| 129 | +# Style |
| 130 | +Style/AndOr: |
| 131 | + EnforcedStyle: always |
| 132 | + |
| 133 | +Style/ArrayCoercion: |
| 134 | + Enabled: true |
| 135 | + |
| 136 | +Style/CollectionCompact: |
| 137 | + Enabled: true |
| 138 | + |
| 139 | +Style/ConstantVisibility: |
| 140 | + Enabled: true |
| 141 | + IgnoreModules: true |
| 142 | + |
| 143 | +Style/Documentation: |
| 144 | + Exclude: |
| 145 | + - "test/**/*" |
| 146 | + |
| 147 | +Style/DocumentationMethod: |
| 148 | + Enabled: true |
| 149 | + Exclude: |
| 150 | + - "test/**/*" |
| 151 | + |
| 152 | +Style/SelectByRegexp: |
| 153 | + Enabled: false |
| 154 | + |
| 155 | +Style/SwapValues: |
| 156 | + Enabled: true |
| 157 | + |
| 158 | +Style/TrailingCommaInArrayLiteral: |
| 159 | + EnforcedStyleForMultiline: comma |
0 commit comments