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