|
1 | | -inherit_from: .rubocop_todo.yml |
2 | | - |
3 | 1 | AllCops: |
4 | 2 | TargetRubyVersion: 2.7 |
5 | 3 | NewCops: enable |
@@ -73,6 +71,14 @@ Style/RedundantConstantBase: |
73 | 71 | Style/RedundantLineContinuation: |
74 | 72 | AutoCorrect: false |
75 | 73 |
|
| 74 | +# We rescue Exception only in deliberate, reviewed places: integrations that |
| 75 | +# record the error and re-raise it, and a spec helper that retries on RSpec |
| 76 | +# expectation failures (ExpectationNotMetError subclasses Exception). The cop |
| 77 | +# can't tell these from a careless rescue, so we disable it rather than scatter |
| 78 | +# inline disables. |
| 79 | +Lint/RescueException: |
| 80 | + Enabled: false |
| 81 | + |
76 | 82 | Lint/ConstantDefinitionInBlock: |
77 | 83 | Exclude: |
78 | 84 | - "spec/**/*.rb" |
@@ -116,26 +122,48 @@ Naming/FileName: |
116 | 122 | Exclude: |
117 | 123 | - "ext/Rakefile" |
118 | 124 |
|
| 125 | +# Our API mirrors the agent's set_*/get_* method names, a convention used |
| 126 | +# throughout the gem and the extension. We follow it deliberately, so disable |
| 127 | +# the cop instead of scattering excludes and inline disables for it. |
119 | 128 | Naming/AccessorMethodName: |
120 | | - Exclude: |
121 | | - - "lib/appsignal/helpers/instrumentation.rb" |
122 | | - - "lib/appsignal/transaction.rb" |
| 129 | + Enabled: false |
| 130 | + |
| 131 | +# Several command methods return a boolean status (abort_installation, |
| 132 | +# Demo.transmit). The cop wants them renamed with a `?`, which would wrongly |
| 133 | +# read them as queries, so we don't run it. |
| 134 | +Naming/PredicateMethod: |
| 135 | + Enabled: false |
123 | 136 |
|
124 | 137 | Naming/RescuedExceptionsVariableName: |
125 | 138 | Enabled: false |
126 | 139 |
|
127 | 140 | Naming/VariableNumber: |
128 | 141 | Enabled: false |
129 | 142 |
|
130 | | -Metrics/ModuleLength: |
| 143 | +# Complexity and length metrics were never enforced here: their thresholds |
| 144 | +# floated for years through `rubocop --auto-gen-config` and the remaining hits |
| 145 | +# were silenced inline. They flag a style we deliberately accept, so instead of |
| 146 | +# tracking an ever-changing Max we don't run them. |
| 147 | +Metrics/AbcSize: |
| 148 | + Enabled: false |
| 149 | + |
| 150 | +Metrics/BlockLength: |
131 | 151 | Enabled: false |
132 | 152 |
|
133 | 153 | Metrics/ClassLength: |
134 | 154 | Enabled: false |
135 | 155 |
|
136 | | -Metrics/BlockLength: |
137 | | - Exclude: |
138 | | - - "Rakefile" |
| 156 | +Metrics/CyclomaticComplexity: |
| 157 | + Enabled: false |
| 158 | + |
| 159 | +Metrics/MethodLength: |
| 160 | + Enabled: false |
| 161 | + |
| 162 | +Metrics/ModuleLength: |
| 163 | + Enabled: false |
| 164 | + |
| 165 | +Metrics/PerceivedComplexity: |
| 166 | + Enabled: false |
139 | 167 |
|
140 | 168 | Gemspec/DevelopmentDependencies: |
141 | 169 | Enabled: false |
0 commit comments