]> git.openstreetmap.org Git - rails.git/blob - .rubocop.yml
Remove current user check from dashboard view
[rails.git] / .rubocop.yml
1 inherit_from: .rubocop_todo.yml
2
3 plugins:
4   - rubocop-minitest
5   - rubocop-performance
6   - rubocop-rails
7   - rubocop-rake
8
9 require:
10   - rubocop-capybara
11   - rubocop-factory_bot
12   - ./.rubocop/specific_action_names.rb
13
14 AllCops:
15   TargetRubyVersion: 3.1
16   NewCops: enable
17   Exclude:
18     - 'vendor/**/*'
19
20 Rails:
21   Enabled: true
22
23 Layout/ExtraSpacing:
24   AllowForAlignment: true
25
26 Lint/PercentStringArray:
27   Exclude:
28     - 'config/initializers/secure_headers.rb'
29     - 'app/controllers/application_controller.rb'
30     - 'app/controllers/site_controller.rb'
31
32 Metrics/BlockLength:
33   Exclude:
34     - 'config/routes.rb'
35
36 Metrics/ClassLength:
37   Exclude:
38     - 'test/**/*'
39
40 Metrics/ModuleLength:
41   Max: 150
42
43 Naming/FileName:
44   Exclude:
45     - 'script/deliver-message'
46     - 'script/update-spam-blocks'
47
48 Naming/MethodParameterName:
49   Enabled: false
50
51 # This conflicts with Strong Migrations, which can't check `change_table`
52 Rails/BulkChangeTable:
53   Enabled: false
54
55 Rails/CreateTableWithTimestamps:
56   Enabled: false
57
58 Rails/FindBy:
59   IgnoreWhereFirst: false
60
61 Rails/FindEach:
62   Enabled: false
63
64 Rails/HasManyOrHasOneDependent:
65   Enabled: false
66
67 Rails/HttpPositionalArguments:
68   Enabled: false
69
70 Rails/ReflectionClassName:
71   Enabled: false
72
73 Rails/SkipsModelValidations:
74   Exclude:
75     - 'db/migrate/*.rb'
76     - 'app/controllers/users/lists_controller.rb'
77
78 Style/Documentation:
79   Enabled: false
80
81 Style/FormatStringToken:
82   Exclude:
83     - 'config/routes.rb'
84
85 Style/IfInsideElse:
86   Enabled: false
87
88 Style/GuardClause:
89   Enabled: false
90
91 Style/HashEachMethods:
92   Enabled: true
93
94 Style/HashSyntax:
95   EnforcedStyle: hash_rockets
96   Exclude:
97     - 'lib/tasks/testing.rake'
98     - 'config/initializers/wrap_parameters.rb'
99
100 Style/HashTransformKeys:
101   Enabled: true
102
103 Style/HashTransformValues:
104   Enabled: true
105
106 Style/MixinUsage:
107   Exclude:
108     - 'bin/setup'
109     - 'bin/update'
110
111 Style/StringLiterals:
112   EnforcedStyle: double_quotes
113
114 Style/SymbolArray:
115   EnforcedStyle: brackets
116
117 Rails/SpecificActionNames:
118   Description: Use only specific action names.
119   Enabled: true
120   ActionNames:
121     - index
122     - show
123     - new
124     - edit
125     - create
126     - update
127     - destroy
128   Include:
129     - app/controllers/**/*.rb
130   Exclude:
131     # This is a todo list, but is currently too long for `rubocop --auto-gen-config`
132     - 'app/controllers/api/changeset_comments_controller.rb'
133     - 'app/controllers/api/changesets_controller.rb'
134     - 'app/controllers/api/notes_controller.rb'
135     - 'app/controllers/api/user_preferences_controller.rb'
136     - 'app/controllers/api/users_controller.rb'
137     - 'app/controllers/browse_controller.rb'
138     - 'app/controllers/changesets_controller.rb'
139     - 'app/controllers/confirmations_controller.rb'
140     - 'app/controllers/diary_comments_controller.rb'
141     - 'app/controllers/diary_entries_controller.rb'
142     - 'app/controllers/directions_controller.rb'
143     - 'app/controllers/errors_controller.rb'
144     - 'app/controllers/export_controller.rb'
145     - 'app/controllers/geocoder_controller.rb'
146     - 'app/controllers/issues_controller.rb'
147     - 'app/controllers/site_controller.rb'
148     - 'app/controllers/traces_controller.rb'
149     - 'app/controllers/users_controller.rb'