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