]> git.openstreetmap.org Git - rails.git/blob - .rubocop_todo.yml
Fix some rubocop todos
[rails.git] / .rubocop_todo.yml
1 # This configuration was generated by
2 # `rubocop --auto-gen-config`
3 # on 2020-08-02 18:37:55 UTC using RuboCop version 0.86.0.
4 # The point is for the user to remove these configuration records
5 # one by one as the offenses are removed from the code base.
6 # Note that changes in the inspected code, or installation of new
7 # versions of RuboCop, may require this file to be generated again.
8
9 # Work around erblint issues.
10 # https://github.com/openstreetmap/openstreetmap-website/issues/2472
11 require:
12   - rubocop-minitest
13   - rubocop-performance
14   - rubocop-rails
15
16 # Offense count: 568
17 # Cop supports --auto-correct.
18 # Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
19 # URISchemes: http, https
20 Layout/LineLength:
21   Max: 370
22
23 # Offense count: 36
24 # Configuration parameters: AllowSafeAssignment.
25 Lint/AssignmentInCondition:
26   Exclude:
27     - 'app/controllers/api/traces_controller.rb'
28     - 'app/controllers/api/user_preferences_controller.rb'
29     - 'app/controllers/application_controller.rb'
30     - 'app/controllers/geocoder_controller.rb'
31     - 'app/controllers/notes_controller.rb'
32     - 'app/controllers/traces_controller.rb'
33     - 'app/controllers/users_controller.rb'
34     - 'app/helpers/application_helper.rb'
35     - 'app/helpers/browse_tags_helper.rb'
36     - 'app/mailers/notifier.rb'
37     - 'app/models/client_application.rb'
38     - 'lib/nominatim.rb'
39     - 'lib/osm.rb'
40     - 'script/deliver-message'
41
42 # Offense count: 739
43 # Configuration parameters: IgnoredMethods.
44 Metrics/AbcSize:
45   Max: 189
46
47 # Offense count: 72
48 # Configuration parameters: CountComments, ExcludedMethods.
49 # ExcludedMethods: refine
50 Metrics/BlockLength:
51   Max: 71
52
53 # Offense count: 15
54 # Configuration parameters: CountBlocks.
55 Metrics/BlockNesting:
56   Max: 5
57
58 # Offense count: 25
59 # Configuration parameters: CountComments.
60 Metrics/ClassLength:
61   Max: 645
62
63 # Offense count: 68
64 # Configuration parameters: IgnoredMethods.
65 Metrics/CyclomaticComplexity:
66   Max: 28
67
68 # Offense count: 735
69 # Configuration parameters: CountComments, ExcludedMethods.
70 Metrics/MethodLength:
71   Max: 179
72
73 # Offense count: 4
74 # Configuration parameters: CountKeywordArgs.
75 Metrics/ParameterLists:
76   Max: 9
77
78 # Offense count: 73
79 # Configuration parameters: IgnoredMethods.
80 Metrics/PerceivedComplexity:
81   Max: 25
82
83 # Offense count: 6
84 Naming/AccessorMethodName:
85   Exclude:
86     - 'app/controllers/application_controller.rb'
87     - 'app/helpers/title_helper.rb'
88     - 'app/models/old_way.rb'
89     - 'lib/osm.rb'
90     - 'lib/potlatch.rb'
91
92 # Offense count: 8
93 # Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros.
94 # NamePrefix: is_, has_, have_
95 # ForbiddenPrefixes: is_, has_, have_
96 # AllowedMethods: is_a?
97 # MethodDefinitionMacros: define_method, define_singleton_method
98 Naming/PredicateName:
99   Exclude:
100     - 'spec/**/*'
101     - 'app/models/changeset.rb'
102     - 'app/models/old_node.rb'
103     - 'app/models/old_relation.rb'
104     - 'app/models/old_way.rb'
105     - 'app/models/user.rb'
106     - 'lib/classic_pagination/pagination.rb'
107
108 # Offense count: 5
109 # Configuration parameters: Database, Include.
110 # SupportedDatabases: mysql, postgresql
111 # Include: db/migrate/*.rb
112 Rails/BulkChangeTable:
113   Exclude:
114     - 'db/migrate/20111116184519_update_oauth.rb'
115     - 'db/migrate/20120208194454_add_domain_to_acl.rb'
116     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
117
118 # Offense count: 2
119 # Configuration parameters: Include.
120 # Include: app/models/**/*.rb
121 Rails/HasAndBelongsToMany:
122   Exclude:
123     - 'app/models/changeset.rb'
124     - 'app/models/user.rb'
125
126 # Offense count: 4
127 # Configuration parameters: Include.
128 # Include: app/helpers/**/*.rb
129 Rails/HelperInstanceVariable:
130   Exclude:
131     - 'app/helpers/title_helper.rb'
132
133 # Offense count: 5
134 # Configuration parameters: Include.
135 # Include: db/migrate/*.rb
136 Rails/NotNullColumn:
137   Exclude:
138     - 'db/migrate/002_cleanup_osm_db.rb'
139     - 'db/migrate/020_populate_node_tags_and_remove.rb'
140     - 'db/migrate/021_move_to_innodb.rb'
141     - 'db/migrate/025_add_end_time_to_changesets.rb'
142     - 'db/migrate/20120404205604_add_user_and_description_to_redaction.rb'
143
144 # Offense count: 19
145 Rails/OutputSafety:
146   Exclude:
147     - 'app/controllers/users_controller.rb'
148     - 'app/helpers/application_helper.rb'
149     - 'app/helpers/changesets_helper.rb'
150     - 'app/helpers/geocoder_helper.rb'
151     - 'app/helpers/note_helper.rb'
152     - 'app/helpers/open_graph_helper.rb'
153     - 'app/helpers/user_blocks_helper.rb'
154     - 'lib/rich_text.rb'
155     - 'test/helpers/application_helper_test.rb'
156
157 # Offense count: 95
158 # Cop supports --auto-correct.
159 # Configuration parameters: EnforcedStyle.
160 # SupportedStyles: strict, flexible
161 Rails/TimeZone:
162   Enabled: false
163
164 # Offense count: 572
165 # Cop supports --auto-correct.
166 # Configuration parameters: EnforcedStyle.
167 # SupportedStyles: always, always_true, never
168 Style/FrozenStringLiteralComment:
169   Enabled: false
170
171 # Offense count: 78
172 # Cop supports --auto-correct.
173 # Configuration parameters: Strict.
174 Style/NumericLiterals:
175   MinDigits: 11