|
| 1 | +# Relaxed.Ruby.Style |
| 2 | + |
| 3 | +AllCops: |
| 4 | + Exclude: |
| 5 | + - 'vendor/**/*' |
| 6 | + - '**/vendor/**/*' |
| 7 | + - 'spec/dummy/**/*' |
| 8 | + - 'sandbox/**/*' |
| 9 | + - '**/templates/**/*' |
| 10 | + - 'lib/**/*' |
| 11 | + - '*.gemspec' |
| 12 | + - 'spec/spec_helper.rb' |
| 13 | + TargetRubyVersion: 2.4 |
| 14 | + |
| 15 | +# Sometimes I believe this reads better |
| 16 | +# This also causes spacing issues on multi-line fixes |
| 17 | +Style/BracesAroundHashParameters: |
| 18 | + Enabled: false |
| 19 | + |
| 20 | +# We use class vars and will have to continue doing so for compatability |
| 21 | +Style/ClassVars: |
| 22 | + Enabled: false |
| 23 | + |
| 24 | +# We need these names for backwards compatability |
| 25 | +Naming/PredicateName: |
| 26 | + Enabled: false |
| 27 | + |
| 28 | +Naming/AccessorMethodName: |
| 29 | + Enabled: false |
| 30 | + |
| 31 | +# This has been used for customization |
| 32 | +Style/MutableConstant: |
| 33 | + Enabled: false |
| 34 | + |
| 35 | +Style/ClassAndModuleChildren: |
| 36 | + Enabled: false |
| 37 | + |
| 38 | +Style/EmptyElse: |
| 39 | + Enabled: false |
| 40 | + |
| 41 | +Style/GuardClause: |
| 42 | + Enabled: false |
| 43 | + |
| 44 | +Style/Next: |
| 45 | + Enabled: false |
| 46 | + |
| 47 | +Style/NumericPredicate: |
| 48 | + Enabled: false |
| 49 | + |
| 50 | +Style/WordArray: |
| 51 | + Enabled: false |
| 52 | + |
| 53 | +Style/ConditionalAssignment: |
| 54 | + Enabled: false |
| 55 | + |
| 56 | +Style/RaiseArgs: |
| 57 | + Enabled: false |
| 58 | + |
| 59 | +Naming/BinaryOperatorParameterName: |
| 60 | + Enabled: false |
| 61 | + |
| 62 | +# We can use good judgement here |
| 63 | +Style/RegexpLiteral: |
| 64 | + Enabled: false |
| 65 | + |
| 66 | +# Unicode comments are useful |
| 67 | +Style/AsciiComments: |
| 68 | + Enabled: false |
| 69 | + |
| 70 | +Layout/EndAlignment: |
| 71 | + Enabled: false |
| 72 | + |
| 73 | +Layout/ElseAlignment: |
| 74 | + Enabled: false |
| 75 | + |
| 76 | +Layout/IndentationWidth: |
| 77 | + Enabled: false |
| 78 | + |
| 79 | +Layout/AlignParameters: |
| 80 | + Enabled: false |
| 81 | + |
| 82 | +Layout/ClosingParenthesisIndentation: |
| 83 | + Enabled: false |
| 84 | + |
| 85 | +Layout/MultilineMethodCallIndentation: |
| 86 | + Enabled: false |
| 87 | + |
| 88 | +Layout/IndentFirstArrayElement: |
| 89 | + Enabled: false |
| 90 | + |
| 91 | +Layout/IndentFirstHashElement: |
| 92 | + Enabled: false |
| 93 | + |
| 94 | +Layout/AlignHash: |
| 95 | + Enabled: false |
| 96 | + |
| 97 | +Style/TrailingCommaInArguments: |
| 98 | + Enabled: false |
| 99 | + |
| 100 | +Style/TrailingCommaInArrayLiteral: |
| 101 | + Enabled: false |
| 102 | + |
| 103 | +Style/TrailingCommaInHashLiteral: |
| 104 | + Enabled: false |
| 105 | + |
| 106 | +# Symbol Arrays are ok and the %i syntax widely unknown |
| 107 | +Style/SymbolArray: |
| 108 | + Enabled: false |
| 109 | + |
| 110 | +# We use a lot of |
| 111 | +# |
| 112 | +# expect { |
| 113 | +# something |
| 114 | +# }.to { happen } |
| 115 | +# |
| 116 | +# syntax in the specs files. |
| 117 | +Lint/AmbiguousBlockAssociation: |
| 118 | + Exclude: |
| 119 | + - '*/spec/**/*' |
| 120 | + - 'spec/**/*' # For the benefit of apps that inherit from this config |
| 121 | + |
| 122 | +# We use eval to add common_spree_dependencies into the Gemfiles of each of our gems |
| 123 | +Security/Eval: |
| 124 | + Exclude: |
| 125 | + - 'Gemfile' |
| 126 | + - 'common_spree_dependencies.rb' |
| 127 | + - '*/Gemfile' |
| 128 | + |
| 129 | +Naming/VariableNumber: |
| 130 | + Enabled: false |
| 131 | + |
| 132 | +# Write empty methods as you wish. |
| 133 | +Style/EmptyMethod: |
| 134 | + Enabled: false |
| 135 | + |
| 136 | +# From http://relaxed.ruby.style/ |
| 137 | + |
| 138 | +Style/Alias: |
| 139 | + Enabled: false |
| 140 | + StyleGuide: http://relaxed.ruby.style/#stylealias |
| 141 | + |
| 142 | +Style/BeginBlock: |
| 143 | + Enabled: false |
| 144 | + StyleGuide: http://relaxed.ruby.style/#stylebeginblock |
| 145 | + |
| 146 | +Style/BlockDelimiters: |
| 147 | + Enabled: false |
| 148 | + StyleGuide: http://relaxed.ruby.style/#styleblockdelimiters |
| 149 | + |
| 150 | +Style/Documentation: |
| 151 | + Enabled: false |
| 152 | + StyleGuide: http://relaxed.ruby.style/#styledocumentation |
| 153 | + |
| 154 | +Layout/DotPosition: |
| 155 | + Enabled: false |
| 156 | + StyleGuide: http://relaxed.ruby.style/#styledotposition |
| 157 | + |
| 158 | +Style/DoubleNegation: |
| 159 | + Enabled: false |
| 160 | + StyleGuide: http://relaxed.ruby.style/#styledoublenegation |
| 161 | + |
| 162 | +Style/EndBlock: |
| 163 | + Enabled: false |
| 164 | + StyleGuide: http://relaxed.ruby.style/#styleendblock |
| 165 | + |
| 166 | +Style/FormatString: |
| 167 | + Enabled: false |
| 168 | + StyleGuide: http://relaxed.ruby.style/#styleformatstring |
| 169 | + |
| 170 | +Style/IfUnlessModifier: |
| 171 | + Enabled: false |
| 172 | + StyleGuide: http://relaxed.ruby.style/#styleifunlessmodifier |
| 173 | + |
| 174 | +Style/Lambda: |
| 175 | + Enabled: false |
| 176 | + StyleGuide: http://relaxed.ruby.style/#stylelambda |
| 177 | + |
| 178 | +Style/ModuleFunction: |
| 179 | + Enabled: false |
| 180 | + StyleGuide: http://relaxed.ruby.style/#stylemodulefunction |
| 181 | + |
| 182 | +Style/MultilineBlockChain: |
| 183 | + Enabled: false |
| 184 | + StyleGuide: http://relaxed.ruby.style/#stylemultilineblockchain |
| 185 | + |
| 186 | +Style/NegatedIf: |
| 187 | + Enabled: false |
| 188 | + StyleGuide: http://relaxed.ruby.style/#stylenegatedif |
| 189 | + |
| 190 | +Style/NegatedWhile: |
| 191 | + Enabled: false |
| 192 | + StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile |
| 193 | + |
| 194 | +Style/ParallelAssignment: |
| 195 | + Enabled: false |
| 196 | + StyleGuide: http://relaxed.ruby.style/#styleparallelassignment |
| 197 | + |
| 198 | +Style/PercentLiteralDelimiters: |
| 199 | + Enabled: false |
| 200 | + StyleGuide: http://relaxed.ruby.style/#stylepercentliteraldelimiters |
| 201 | + |
| 202 | +Style/PerlBackrefs: |
| 203 | + Enabled: false |
| 204 | + StyleGuide: http://relaxed.ruby.style/#styleperlbackrefs |
| 205 | + |
| 206 | +Style/Semicolon: |
| 207 | + Enabled: false |
| 208 | + StyleGuide: http://relaxed.ruby.style/#stylesemicolon |
| 209 | + |
| 210 | +Style/SignalException: |
| 211 | + Enabled: false |
| 212 | + StyleGuide: http://relaxed.ruby.style/#stylesignalexception |
| 213 | + |
| 214 | +Style/SingleLineBlockParams: |
| 215 | + Enabled: false |
| 216 | + StyleGuide: http://relaxed.ruby.style/#stylesinglelineblockparams |
| 217 | + |
| 218 | +Style/SingleLineMethods: |
| 219 | + Enabled: false |
| 220 | + StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods |
| 221 | + |
| 222 | +Layout/SpaceBeforeBlockBraces: |
| 223 | + Enabled: false |
| 224 | + StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces |
| 225 | + |
| 226 | +Layout/SpaceInsideParens: |
| 227 | + Enabled: false |
| 228 | + StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens |
| 229 | + |
| 230 | +Style/SpecialGlobalVars: |
| 231 | + Enabled: false |
| 232 | + StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars |
| 233 | + |
| 234 | +Style/StringLiterals: |
| 235 | + Enabled: false |
| 236 | + StyleGuide: http://relaxed.ruby.style/#stylestringliterals |
| 237 | + |
| 238 | +Style/SymbolProc: |
| 239 | + Enabled: false |
| 240 | + |
| 241 | +Style/TernaryParentheses: |
| 242 | + Enabled: false |
| 243 | + |
| 244 | +Style/WhileUntilModifier: |
| 245 | + Enabled: false |
| 246 | + StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier |
| 247 | + |
| 248 | +Lint/AmbiguousRegexpLiteral: |
| 249 | + Enabled: false |
| 250 | + StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral |
| 251 | + |
| 252 | +Lint/AssignmentInCondition: |
| 253 | + Enabled: false |
| 254 | + StyleGuide: http://relaxed.ruby.style/#lintassignmentincondition |
| 255 | + |
| 256 | +Metrics/AbcSize: |
| 257 | + Enabled: false |
| 258 | + |
| 259 | +Metrics/BlockNesting: |
| 260 | + Enabled: false |
| 261 | + |
| 262 | +Metrics/ClassLength: |
| 263 | + Enabled: false |
| 264 | + |
| 265 | +Metrics/ModuleLength: |
| 266 | + Enabled: false |
| 267 | + |
| 268 | +Metrics/BlockLength: |
| 269 | + Enabled: false |
| 270 | + |
| 271 | +Metrics/CyclomaticComplexity: |
| 272 | + Enabled: false |
| 273 | + |
| 274 | +Metrics/LineLength: |
| 275 | + Enabled: false |
| 276 | + |
| 277 | +Metrics/MethodLength: |
| 278 | + Enabled: false |
| 279 | + |
| 280 | +Metrics/ParameterLists: |
| 281 | + Enabled: false |
| 282 | + |
| 283 | +Metrics/PerceivedComplexity: |
| 284 | + Enabled: false |
| 285 | + |
| 286 | +Bundler/OrderedGems: |
| 287 | + Enabled: false |
| 288 | + |
| 289 | +Style/NumericLiterals: |
| 290 | + Enabled: false |
| 291 | + |
| 292 | +Style/FrozenStringLiteralComment: |
| 293 | + Enabled: true |
| 294 | + EnforcedStyle: always |
| 295 | + |
| 296 | +# json.() is idiomatic in jbuilder files |
| 297 | +Style/LambdaCall: |
| 298 | + Enabled: false |
| 299 | + |
| 300 | +Naming/UncommunicativeMethodParamName: |
| 301 | + AllowedNames: |
| 302 | + - id |
| 303 | + - to |
| 304 | + - _ |
| 305 | + |
| 306 | +# Rubocop doesn't understand side-effects |
| 307 | +Style/IdenticalConditionalBranches: |
| 308 | + Enabled: false |
| 309 | + |
| 310 | +Naming/MemoizedInstanceVariableName: |
| 311 | + Enabled: false |
| 312 | + |
| 313 | +Lint/UselessComparison: |
| 314 | + Enabled: false |
| 315 | + |
| 316 | +Lint/HandleExceptions: |
| 317 | + Enabled: false |
| 318 | + |
| 319 | +Style/RescueStandardError: |
| 320 | + Enabled: false |
| 321 | + |
| 322 | +Layout/CaseIndentation: |
| 323 | + Enabled: false |
| 324 | + |
| 325 | +Style/MissingRespondToMissing: |
| 326 | + Enabled: false |
| 327 | + |
| 328 | +Lint/UselessAssignment: |
| 329 | + Enabled: false |
| 330 | + |
| 331 | +Style/MethodMissingSuper: |
| 332 | + Enabled: false |
| 333 | + |
| 334 | +Lint/UnusedMethodArgument: |
| 335 | + Enabled: false |
0 commit comments