]> git.openstreetmap.org Git - rails.git/blob - .rubocop.yml
Bump actions/cache from 2.1.7 to 3
[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/MigrationClassName:
59   Enabled: false
60
61 Rails/ReflectionClassName:
62   Enabled: false
63
64 Rails/SkipsModelValidations:
65   Exclude:
66     - 'db/migrate/*.rb'
67     - 'app/controllers/users_controller.rb'
68
69 Style/Documentation:
70   Enabled: false
71
72 Style/FormatStringToken:
73   Exclude:
74     - 'config/routes.rb'
75
76 Style/IfInsideElse:
77   Enabled: false
78
79 Style/GuardClause:
80   Enabled: false
81
82 Style/HashEachMethods:
83   Enabled: true
84
85 Style/HashSyntax:
86   EnforcedStyle: hash_rockets
87   Exclude:
88     - 'lib/tasks/testing.rake'
89     - 'config/initializers/wrap_parameters.rb'
90
91 Style/HashTransformKeys:
92   Enabled: true
93
94 Style/HashTransformValues:
95   Enabled: true
96
97 Style/MixinUsage:
98   Exclude:
99     - 'bin/setup'
100     - 'bin/update'
101
102 Style/StringLiterals:
103   EnforcedStyle: double_quotes
104
105 Style/SymbolArray:
106   EnforcedStyle: brackets