]> git.openstreetmap.org Git - rails.git/blob - .rubocop.yml
Merge remote-tracking branch 'upstream/pull/2770'
[rails.git] / .rubocop.yml
1 inherit_from: .rubocop_todo.yml
2
3 require:
4   - rubocop-minitest
5   - rubocop-performance
6   - rubocop-rails
7
8 AllCops:
9   TargetRubyVersion: 2.7
10   NewCops: enable
11   Exclude:
12     - 'vendor/**/*'
13
14 Rails:
15   Enabled: true
16
17 Layout/ExtraSpacing:
18   AllowForAlignment: true
19
20 Lint/PercentStringArray:
21   Exclude:
22     - 'config/initializers/secure_headers.rb'
23     - 'app/controllers/application_controller.rb'
24     - 'app/controllers/site_controller.rb'
25
26 Metrics/BlockLength:
27   Exclude:
28     - 'config/routes.rb'
29
30 Metrics/ClassLength:
31   Exclude:
32     - 'test/**/*'
33
34 Metrics/ModuleLength:
35   Max: 150
36
37 Naming/FileName:
38   Exclude:
39     - 'script/deliver-message'
40     - 'script/locale/reload-languages'
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/InverseOf:
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