]> git.openstreetmap.org Git - rails.git/blob - .rubocop.yml
Add rubocop-rails
[rails.git] / .rubocop.yml
1 inherit_from: .rubocop_todo.yml
2
3 require:
4   - rubocop-performance
5   - rubocop-rails
6
7 AllCops:
8   TargetRubyVersion: 2.5
9
10 Rails:
11   Enabled: true
12
13 Layout/ExtraSpacing:
14   AllowForAlignment: true
15
16 Lint/PercentStringArray:
17   Exclude:
18     - 'config/initializers/secure_headers.rb'
19     - 'app/controllers/application_controller.rb'
20     - 'app/controllers/site_controller.rb'
21
22 Naming/FileName:
23   Exclude:
24     - 'script/deliver-message'
25     - 'script/locale/reload-languages'
26     - 'script/update-spam-blocks'
27
28 Naming/UncommunicativeMethodParamName:
29   Enabled: false
30
31 Rails/ApplicationRecord:
32   Enabled: false
33
34 Rails/CreateTableWithTimestamps:
35   Enabled: false
36
37 Rails/FindEach:
38   Enabled: false
39
40 Rails/HasManyOrHasOneDependent:
41   Enabled: false
42
43 Rails/HttpPositionalArguments:
44   Enabled: false
45
46 Rails/InverseOf:
47   Enabled: false
48
49 Rails/SkipsModelValidations:
50   Exclude:
51     - 'db/migrate/*.rb'
52     - 'app/controllers/users_controller.rb'
53
54 Style/BracesAroundHashParameters:
55   EnforcedStyle: context_dependent
56
57 Style/FormatStringToken:
58   EnforcedStyle: template
59
60 Style/IfInsideElse:
61   Enabled: false
62
63 Style/GuardClause:
64   Enabled: false
65
66 Style/HashSyntax:
67   EnforcedStyle: hash_rockets
68   Exclude:
69     - 'lib/tasks/testing.rake'
70     - 'config/initializers/wrap_parameters.rb'
71
72 Style/MixinUsage:
73   Exclude:
74     - 'bin/setup'
75     - 'bin/update'
76
77 Style/StringLiterals:
78   EnforcedStyle: double_quotes
79
80 Style/SymbolArray:
81   EnforcedStyle: brackets