Move ProjectQuery model to the main namespace #12977
reviewdog [rubocop] report
reported by reviewdog 🐶
Findings (2)
app/models/user.rb|528 col 3| Assignment Branch Condition size for anonymous is too high. [<9, 15, 3> 17.75/17]
app/models/user.rb|678 col 6| Use find_by
instead of dynamic find_by_login
.
Filtered Findings (61)
app/controllers/admin/settings/project_custom_fields_controller.rb|118 col 7| Redundant else
-clause.
app/controllers/admin/settings/project_custom_fields_controller.rb|133 col 7| Redundant else
-clause.
app/helpers/projects_helper.rb|38 col 23| Do not use instance variables in helpers.
app/helpers/projects_helper.rb|40 col 5| Do not use instance variables in helpers.
app/helpers/projects_helper.rb|44 col 5| Do not use instance variables in helpers.
app/helpers/projects_helper.rb|67 col 8| Use filter_map
instead.
app/models/user.rb|70 col 3| Specify a :dependent
option.
app/models/user.rb|70 col 3| Specify an :inverse_of
option.
app/models/user.rb|75 col 3| Specify a :dependent
option.
app/models/user.rb|111 col 35| Do not use Time.now
without zone. Use one of Time.zone.now
, Time.current
, Time.now.in_time_zone
, Time.now.utc
, Time.now.getlocal
, Time.now.xmlschema
, Time.now.iso8601
, Time.now.jisx0301
, Time.now.rfc3339
, Time.now.httpdate
, Time.now.to_i
, Time.now.to_f
instead.
app/models/user.rb|213 col 3| Perceived complexity for try_authentication_for_existing_user is too high. [10/8]
app/models/user.rb|232 col 15| Use find_by
instead of dynamic find_by_plaintext_value
.
app/models/user.rb|258 col 13| Use find_by
instead of dynamic find_by_plaintext_value
.
app/models/user.rb|289 col 5| Duplicate branch body detected.
app/models/user.rb|389 col 43| Do not use Time.now
without zone. Use one of Time.zone.now
, Time.current
, Time.now.in_time_zone
, Time.now.utc
, Time.now.getlocal
, Time.now.xmlschema
, Time.now.iso8601
, Time.now.jisx0301
, Time.now.rfc3339
, Time.now.httpdate
, Time.now.to_i
, Time.now.to_f
instead.
app/models/user.rb|417 col 13| Use find_by
instead of dynamic find_by_plaintext_value
.
app/models/user.rb|461 col 12| Do not use Date.today
without zone. Use Time.zone.today
instead.
app/models/user.rb|597 col 3| private
(on line 595) does not make singleton methods private. Use private_class_method
or private
inside a class << self
block instead.
app/models/user.rb|618 col 15| Prefer [keep_count..]
over [keep_count..-1]
.
app/models/user.rb|628 col 3| private
(on line 595) does not make singleton methods private. Use private_class_method
or private
inside a class << self
block instead.
app/models/user.rb|636 col 3| private
(on line 595) does not make singleton methods private. Use private_class_method
or private
inside a class << self
block instead.
app/models/user.rb|637 col 12| Use find_by
instead of dynamic find_by_login
.
app/models/user.rb|642 col 3| private
(on line 595) does not make singleton methods private. Use private_class_method
or private
inside a class << self
block instead.
app/models/user.rb|646 col 3| private
(on line 595) does not make singleton methods private. Use private_class_method
or private
inside a class << self
block instead.
app/models/user.rb|662 col 12| Do not use Time.now
without zone. Use one of Time.zone.now
, Time.current
, Time.now.in_time_zone
, Time.now.utc
, Time.now.getlocal
, Time.now.xmlschema
, Time.now.iso8601
, Time.now.jisx0301
, Time.now.rfc3339
, Time.now.httpdate
, Time.now.to_i
, Time.now.to_f
instead.
app/models/user.rb|674 col 38| Do not use Time.now
without zone. Use one of Time.zone.now
, Time.current
, Time.now.in_time_zone
, Time.now.utc
, Time.now.getlocal
, Time.now.xmlschema
, Time.now.iso8601
, Time.now.jisx0301
, Time.now.rfc3339
, Time.now.httpdate
, Time.now.to_i
, Time.now.to_f
instead.
app/models/user.rb|677 col 3| private
(on line 595) does not make singleton methods private. Use private_class_method
or private
inside a class << self
block instead.
config/constants/settings/definition.rb|66 col 131| Line is too long. [146/130]
config/constants/settings/definition.rb|1153 col 53| Use map { |x| x.name.to_s }
instead of map
method chain.
config/constants/settings/definition.rb|1178 col 5| Assignment Branch Condition size for initialize is too high. [<7, 16, 2> 17.58/17]
spec/factories/principal_factory.rb|58 col 131| Line is too long. [136/130]
spec/factories/principal_factory.rb|69 col 131| Line is too long. [136/130]
spec/models/queries/projects/filters/custom_field_filter_spec.rb|135 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|144 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|153 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|162 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|171 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|180 col 5| Repeated context block description on line(s) [189]
spec/models/queries/projects/filters/custom_field_filter_spec.rb|180 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|189 col 5| Repeated context block description on line(s) [180]
spec/models/queries/projects/filters/custom_field_filter_spec.rb|189 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|198 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|207 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|225 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|234 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|243 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|252 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|261 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|275 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|289 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|298 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|308 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|351 col 11| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|383 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|389 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|395 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|401 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|407 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|436 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|466 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
spec/models/queries/projects/filters/custom_field_filter_spec.rb|472 col 13| Context description should match /^and\b/, /^as\b/, /^even\b/, /^for\b/, /^given\b/, /^having\b/, /^if\b/, /^in\b/, /^on\b/, /^to\b/, /^unless\b/, /^via\b/, /^when\b/, /^with\b/, /^within\b/, or /^without\b/.
Annotations
Check notice on line 545 in app/models/user.rb
github-actions / rubocop
[rubocop] app/models/user.rb#L528-L545 <Metrics/AbcSize>
Assignment Branch Condition size for anonymous is too high. [<9, 15, 3> 17.75/17]
Raw output
app/models/user.rb:528:3: C: Metrics/AbcSize: Assignment Branch Condition size for anonymous is too high. [<9, 15, 3> 17.75/17]
Check notice on line 678 in app/models/user.rb
github-actions / rubocop
[rubocop] app/models/user.rb#L678 <Rails/DynamicFindBy>
Use `find_by` instead of dynamic `find_by_login`.
Raw output
app/models/user.rb:678:6: C: Rails/DynamicFindBy: Use `find_by` instead of dynamic `find_by_login`.