]> git.openstreetmap.org Git - rails.git/blob - .rubocop.yml
Added ignoring unused translations auth.providers
[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 # This conflicts with Strong Migrations, which can't check `change_table`
49 Rails/BulkChangeTable:
50   Enabled: false
51
52 Rails/CreateTableWithTimestamps:
53   Enabled: false
54
55 Rails/FindBy:
56   IgnoreWhereFirst: false
57
58 Rails/FindEach:
59   Enabled: false
60
61 Rails/HasManyOrHasOneDependent:
62   Enabled: false
63
64 Rails/HttpPositionalArguments:
65   Enabled: false
66
67 Rails/ReflectionClassName:
68   Enabled: false
69
70 Rails/SkipsModelValidations:
71   Exclude:
72     - 'db/migrate/*.rb'
73     - 'app/controllers/users_controller.rb'
74
75 Style/Documentation:
76   Enabled: false
77
78 Style/FormatStringToken:
79   Exclude:
80     - 'config/routes.rb'
81
82 Style/IfInsideElse:
83   Enabled: false
84
85 Style/GuardClause:
86   Enabled: false
87
88 Style/HashEachMethods:
89   Enabled: true
90
91 Style/HashSyntax:
92   EnforcedStyle: hash_rockets
93   Exclude:
94     - 'lib/tasks/testing.rake'
95     - 'config/initializers/wrap_parameters.rb'
96
97 Style/HashTransformKeys:
98   Enabled: true
99
100 Style/HashTransformValues:
101   Enabled: true
102
103 Style/MixinUsage:
104   Exclude:
105     - 'bin/setup'
106     - 'bin/update'
107
108 Style/StringLiterals:
109   EnforcedStyle: double_quotes
110
111 Style/SymbolArray:
112   EnforcedStyle: brackets