|
| 1 | +# This configuration file was generated by `ameba --gen-config` |
| 2 | +# on 2025-06-02 13:57:07 UTC using Ameba version 1.7.0-dev. |
| 3 | +# The point is for the user to remove these configuration records |
| 4 | +# one by one as the reported problems are removed from the code base. |
| 5 | +# |
| 6 | +# For more details on any individual rule, run `ameba --only RuleName`. |
| 7 | + |
| 8 | +# Indicators for comment annotations: |
| 9 | +# |
| 10 | +# * `Disabled`: The rule is disabled because it does not seem useful for this repo (or in general). |
| 11 | +# * `BUG`: A bug in ameba prevents using this rule either entirely or for specific files. |
| 12 | +# * `FIXME`: The rule seems useful, but requires some effort to resolve. That's deferred for later. |
| 13 | +# * `TODO`: The rule might be useful, but we need to investigate whether we want to use it or not. |
| 14 | + |
| 15 | +Version: "1.7.0-dev" |
| 16 | + |
| 17 | +# Documentation |
| 18 | +# ========================= |
| 19 | + |
| 20 | +# Disabled: What's the point in alerting about existing TODOs in code? |
| 21 | +Documentation/DocumentationAdmonition: |
| 22 | + Enabled: false |
| 23 | + |
| 24 | +# Lint |
| 25 | +# ========================= |
| 26 | + |
| 27 | +Lint/DebugCalls: |
| 28 | + Excluded: |
| 29 | + # Samples may legitimately use DebugCalls |
| 30 | + - samples/**/* |
| 31 | + # Explicit tests |
| 32 | + - spec/std/pp_spec.cr |
| 33 | + |
| 34 | +Lint/DebuggerStatement: |
| 35 | + Excluded: |
| 36 | + # Explicit tests |
| 37 | + - spec/debug/**/* |
| 38 | + |
| 39 | +# Disabled: `else nil` can be useful to explicitly show the consequence of the else branch |
| 40 | +Lint/ElseNil: |
| 41 | + Enabled: false |
| 42 | + |
| 43 | +Lint/LiteralInCondition: |
| 44 | + Excluded: |
| 45 | + # Samples may legitimately use literals in conditions |
| 46 | + - samples/**/* |
| 47 | + |
| 48 | +Lint/LiteralInInterpolation: |
| 49 | + Excluded: |
| 50 | + - spec/std/random_spec.cr # BUG: https://github.com/crystal-ameba/ameba/issues/611 |
| 51 | + |
| 52 | +Lint/LiteralsComparison: |
| 53 | + Excluded: |
| 54 | + # Explicit tests for case equality on tuple literals |
| 55 | + - spec/std/tuple_spec.cr |
| 56 | + |
| 57 | +# TODO: Investigate if some `not_nil!` calls can be avoided. |
| 58 | +Lint/NotNil: |
| 59 | + Enabled: false |
| 60 | + |
| 61 | +Lint/RandZero: |
| 62 | + Excluded: |
| 63 | + # Explicit tests |
| 64 | + - spec/std/random_spec.cr |
| 65 | + |
| 66 | +# FIXME: Resolve shadowing. |
| 67 | +Lint/ShadowingOuterLocalVar: |
| 68 | + Enabled: false |
| 69 | + |
| 70 | +# TODO: Investigate file names and move to data directories. |
| 71 | +Lint/SpecFilename: |
| 72 | + Enabled: false |
| 73 | + |
| 74 | +# BUG: https://github.com/crystal-ameba/ameba/issues/612 |
| 75 | +Lint/TopLevelOperatorDefinition: |
| 76 | + Enabled: false |
| 77 | + |
| 78 | +# Disabled: We have an explicit CI job for `typos`. No reason to run it through |
| 79 | +# ameba. |
| 80 | +Lint/Typos: |
| 81 | + Enabled: false |
| 82 | + |
| 83 | +# TODO: Investigate unused arguments. |
| 84 | +Lint/UnusedArgument: |
| 85 | + Enabled: false |
| 86 | + |
| 87 | +# TODO: Investigate unused block arguments. |
| 88 | +Lint/UnusedBlockArgument: |
| 89 | + Enabled: false |
| 90 | + |
| 91 | +# FIXME: Investigate useless assigns. |
| 92 | +Lint/UselessAssign: |
| 93 | + Enabled: false |
| 94 | + |
| 95 | +# Metrics |
| 96 | +# ========================= |
| 97 | + |
| 98 | +# Disabled: Lot's of violations. Complexity is very individual. |
| 99 | +Metrics/CyclomaticComplexity: |
| 100 | + Enabled: false |
| 101 | + |
| 102 | +# Naming |
| 103 | +# ========================= |
| 104 | +# All disabled. There are many violations and some of the rules are questionable. |
| 105 | +# TODO: Consider enabling some of these rules. |
| 106 | + |
| 107 | +Naming/AccessorMethodName: |
| 108 | + Enabled: false |
| 109 | + |
| 110 | +Naming/BinaryOperatorParameterName: |
| 111 | + Enabled: false |
| 112 | + |
| 113 | +Naming/BlockParameterName: |
| 114 | + Enabled: false |
| 115 | + |
| 116 | +# Disabled: All violations follow the spelling of identifiers in upstream |
| 117 | +# projects, e.g. for lib bindings. |
| 118 | +Naming/ConstantNames: |
| 119 | + Enabled: false |
| 120 | + |
| 121 | +Naming/MethodNames: |
| 122 | + Enabled: false |
| 123 | + |
| 124 | +Naming/PredicateName: |
| 125 | + Enabled: false |
| 126 | + |
| 127 | +Naming/QueryBoolMethods: |
| 128 | + Enabled: false |
| 129 | + |
| 130 | +Naming/RescuedExceptionsVariableName: |
| 131 | + Enabled: false |
| 132 | + |
| 133 | +Naming/TypeNames: |
| 134 | + Enabled: false |
| 135 | + |
| 136 | +Naming/VariableNames: |
| 137 | + Enabled: false |
| 138 | + |
| 139 | +# Performance |
| 140 | +# ========================= |
| 141 | + |
| 142 | +Performance/AnyInsteadOfEmpty: |
| 143 | + Excluded: |
| 144 | + # These specs explicitly test `#any?` implementations |
| 145 | + - spec/std/bit_array_spec.cr |
| 146 | + - spec/std/enumerable_spec.cr |
| 147 | + - spec/std/hash_spec.cr |
| 148 | + |
| 149 | +# Style |
| 150 | +# ========================= |
| 151 | +# All disabled. There are many violations and some of the rules are questionable. |
| 152 | +# TODO: Consider enabling some of these rules. |
| 153 | + |
| 154 | +Style/HeredocEscape: |
| 155 | + Enabled: false |
| 156 | + |
| 157 | +Style/HeredocIndent: |
| 158 | + Enabled: false |
| 159 | + |
| 160 | +Style/MultilineCurlyBlock: |
| 161 | + Enabled: false |
| 162 | + |
| 163 | +# Disabled: This rule seems too strict when any negation inside a complex condition is |
| 164 | +# considered a violation. https://github.com/crystal-ameba/ameba/issues/621 |
| 165 | +Style/NegatedConditionsInUnless: |
| 166 | + Enabled: false |
| 167 | + |
| 168 | +# BUG: https://github.com/crystal-ameba/ameba/issues/614 |
| 169 | +Style/ParenthesesAroundCondition: |
| 170 | + Enabled: false |
| 171 | + |
| 172 | +Style/PercentLiteralDelimiters: |
| 173 | + Enabled: false |
| 174 | + |
| 175 | +Style/RedundantBegin: |
| 176 | + Enabled: false |
| 177 | + |
| 178 | +Style/RedundantNext: |
| 179 | + Enabled: false |
| 180 | + |
| 181 | +Style/RedundantReturn: |
| 182 | + Enabled: false |
| 183 | + |
| 184 | +Style/RedundantSelf: |
| 185 | + Enabled: false |
| 186 | + |
| 187 | +Style/UnlessElse: |
| 188 | + Enabled: false |
| 189 | + |
| 190 | +Style/VerboseBlock: |
| 191 | + Enabled: false |
| 192 | + |
| 193 | +Style/WhileTrue: |
| 194 | + Enabled: false |
0 commit comments