]> git.openstreetmap.org Git - rails.git/blob - .rubocop.yml
Fix new rubocop warnings
[rails.git] / .rubocop.yml
1 inherit_from: .rubocop_todo.yml
2
3 require:
4   - rubocop-minitest
5   - rubocop-performance
6   - rubocop-rails
7   - rubocop-rake
8
9 AllCops:
10   TargetRubyVersion: 2.7
11   NewCops: enable
12   Exclude:
13     - 'vendor/**/*'
14
15 Rails:
16   Enabled: true
17
18 Layout/ExtraSpacing:
19   AllowForAlignment: true
20
21 Lint/PercentStringArray:
22   Exclude:
23     - 'config/initializers/secure_headers.rb'
24     - 'app/controllers/application_controller.rb'
25     - 'app/controllers/site_controller.rb'
26
27 Metrics/BlockLength:
28   Exclude:
29     - 'config/routes.rb'
30
31 Metrics/ClassLength:
32   Exclude:
33     - 'test/**/*'
34
35 Metrics/ModuleLength:
36   Max: 150
37
38 Naming/FileName:
39   Exclude:
40     - 'script/deliver-message'
41     - 'script/update-spam-blocks'
42
43 Naming/MethodParameterName:
44   Enabled: false
45
46 Rails/CreateTableWithTimestamps:
47   Enabled: false
48
49 Rails/FindEach:
50   Enabled: false
51
52 Rails/HasManyOrHasOneDependent:
53   Enabled: false
54
55 Rails/HttpPositionalArguments:
56   Enabled: false
57
58 Rails/ReflectionClassName:
59   Enabled: false
60
61 Rails/SkipsModelValidations:
62   Exclude:
63     - 'db/migrate/*.rb'
64     - 'app/controllers/users_controller.rb'
65
66 Style/Documentation:
67   Enabled: false
68
69 Style/FormatStringToken:
70   Exclude:
71     - 'config/routes.rb'
72
73 Style/IfInsideElse:
74   Enabled: false
75
76 Style/GuardClause:
77   Enabled: false
78
79 Style/HashEachMethods:
80   Enabled: true
81
82 Style/HashSyntax:
83   EnforcedStyle: hash_rockets
84   Exclude:
85     - 'lib/tasks/testing.rake'
86     - 'config/initializers/wrap_parameters.rb'
87
88 Style/HashTransformKeys:
89   Enabled: true
90
91 Style/HashTransformValues:
92   Enabled: true
93
94 Style/MixinUsage:
95   Exclude:
96     - 'bin/setup'
97     - 'bin/update'
98
99 Style/StringLiterals:
100   EnforcedStyle: double_quotes
101
102 Style/SymbolArray:
103   EnforcedStyle: brackets