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