Replace dynamic bootstrapped components with angular elements #680
reviewdog [rubocop] report
reported by reviewdog 🐶
Findings (6)
app/helpers/application_helper.rb|372 col 131| Line is too long. [140/130]
app/helpers/custom_fields_helper.rb|66 col 3| Assignment Branch Condition size for custom_field_tag is too high. [<10, 40, 11> 42.67/17]
app/helpers/custom_fields_helper.rb|66 col 3| Perceived complexity for custom_field_tag is too high. [10/8]
app/helpers/custom_fields_helper.rb|146 col 3| Assignment Branch Condition size for custom_field_tag_for_bulk_edit is too high. [<5, 26, 8> 27.66/17]
lib/tabular_form_builder.rb|86 col 3| Assignment Branch Condition size for date_picker is too high. [<12, 38, 7> 40.46/17]
modules/reporting/lib/widget/filters/date.rb|32 col 3| Assignment Branch Condition size for render is too high. [<9, 36, 0> 37.11/17]
Filtered Findings (60)
app/helpers/application_helper.rb|45 col 50| Do not use instance variables in helpers.
app/helpers/application_helper.rb|90 col 5| Prefer string interpolation to string concatenation.
app/helpers/application_helper.rb|113 col 27| Do not use Date.today
without zone. Use Time.zone.today
instead.
app/helpers/application_helper.rb|114 col 59| Do not use Date.today
without zone. Use Time.zone.today
instead.
app/helpers/application_helper.rb|125 col 3| Assignment Branch Condition size for project_nested_ul is too high. [<3, 23, 6> 23.96/17]
app/helpers/application_helper.rb|146 col 7| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|155 col 3| Assignment Branch Condition size for labeled_check_box_tags is too high. [<8, 22, 3> 23.6/17]
app/helpers/application_helper.rb|171 col 14| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|177 col 8| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|195 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/helpers/application_helper.rb|196 col 8| Do not use instance variables in helpers.
app/helpers/application_helper.rb|196 col 8| Use safe navigation (&.
) instead of checking if an object exists before calling the method.
app/helpers/application_helper.rb|196 col 21| Do not use instance variables in helpers.
app/helpers/application_helper.rb|199 col 35| Do not use instance variables in helpers.
app/helpers/application_helper.rb|212 col 43| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|231 col 3| Assignment Branch Condition size for body_css_classes is too high. [<3, 21, 3> 21.42/17]
app/helpers/application_helper.rb|232 col 12| Prefer string interpolation to string concatenation.
app/helpers/application_helper.rb|235 col 15| Prefer string interpolation to string concatenation.
app/helpers/application_helper.rb|236 col 15| Prefer string interpolation to string concatenation.
app/helpers/application_helper.rb|249 col 17| Method parameter must be at least 3 characters long.
app/helpers/application_helper.rb|259 col 8| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|262 col 31| Prefer keyword arguments for arguments with a boolean default value; use blank: true
instead of blank = true
.
app/helpers/application_helper.rb|281 col 5| Useless assignment to variable - options
.
app/helpers/application_helper.rb|327 col 5| Prefer string interpolation to string concatenation.
app/helpers/application_helper.rb|347 col 3| Assignment Branch Condition size for progress_bar is too high. [<8, 17, 6> 19.72/17]
app/helpers/application_helper.rb|365 col 21| Prefer keyword arguments for arguments with a boolean default value; use checked: true
instead of checked = true
.
app/helpers/application_helper.rb|423 col 54| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|454 col 9| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|454 col 13| Prefer string interpolation to string concatenation.
app/helpers/application_helper.rb|455 col 10| Tagging a string as html safe may be a security risk.
app/helpers/application_helper.rb|455 col 14| Prefer string interpolation to string concatenation.
app/helpers/custom_fields_helper.rb|71 col 20| Use find_by
instead of dynamic find_by_name
.
app/helpers/custom_fields_helper.rb|99 col 36| Tagging a string as html safe may be a security risk.
app/helpers/custom_fields_helper.rb|149 col 20| Use find_by
instead of dynamic find_by_name
.
app/helpers/custom_fields_helper.rb|207 col 14| Use find_by
instead of dynamic find_by_name
.
lib/open_project/text_formatting/filters/macro_filter.rb|40 col 7| Assignment Branch Condition size for call is too high. [<3, 20, 5> 20.83/17]
lib/open_project/text_formatting/filters/macro_filter.rb|84 col 9| Use (element["class"] || "").split.intersect?(Array(macro_class.identifier))
instead of ((element["class"] || "").split & Array(macro_class.identifier)).any?
.
lib/tabular_form_builder.rb|39 col 3| Assignment Branch Condition size for tag_with_label_method is too high. [<9, 17, 2> 19.34/17]
lib/tabular_form_builder.rb|209 col 38| Tagging a string as html safe may be a security risk.
lib/tabular_form_builder.rb|217 col 37| Tagging a string as html safe may be a security risk.
lib/tabular_form_builder.rb|273 col 3| Assignment Branch Condition size for label_for_field is too high. [<3, 19, 2> 19.34/17]
lib/tabular_form_builder.rb|312 col 54| Tagging a string as html safe may be a security risk.
lib/tabular_form_builder.rb|343 col 3| Assignment Branch Condition size for extract_from is too high. [<8, 14, 6> 17.2/17]
modules/reporting/lib/widget/filters/date.rb|40 col 26| Prefer string interpolation to string concatenation.
modules/reporting/lib/widget/filters/date.rb|54 col 26| Prefer string interpolation to string concatenation.
spec/lib/custom_field_form_builder_spec.rb|34 col 78| Avoid instance variables - use let, a method call, or a local variable (if possible).
spec/lib/custom_field_form_builder_spec.rb|219 col 15| 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/lib/custom_field_form_builder_spec.rb|236 col 15| 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/lib/custom_field_form_builder_spec.rb|292 col 15| 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/lib/custom_field_form_builder_spec.rb|350 col 15| 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/lib/tabular_form_builder_spec.rb|43 col 19| Use described_class
instead of TabularFormBuilder
.
spec/lib/tabular_form_builder_spec.rb|210 col 15| 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/lib/tabular_form_builder_spec.rb|254 col 9| Avoid using OpenStruct
; use Struct
, Hash
, a class or test doubles instead.
spec/lib/tabular_form_builder_spec.rb|255 col 9| Avoid using OpenStruct
; use Struct
, Hash
, a class or test doubles instead.
spec/lib/tabular_form_builder_spec.rb|256 col 9| Avoid using OpenStruct
; use Struct
, Hash
, a class or test doubles instead.
spec/lib/tabular_form_builder_spec.rb|299 col 25| Prefer have_select
over have_css
.
spec/lib/tabular_form_builder_spec.rb|544 col 25| Prefer have_field
over have_css
.
spec/lib/tabular_form_builder_spec.rb|586 col 24| Avoid using OpenStruct
; use Struct
, Hash
, a class or test doubles instead.
spec/lib/tabular_form_builder_spec.rb|652 col 26| Avoid using OpenStruct
; use Struct
, Hash
, a class or test doubles instead.
spec/support/pages/notifications/center.rb|53 col 9| Use click_link_or_button
or click_on
instead of click_button
.
Annotations
Check notice on line 372 in app/helpers/application_helper.rb
github-actions / rubocop
[rubocop] app/helpers/application_helper.rb#L372 <Layout/LineLength>
Line is too long. [140/130]
Raw output
app/helpers/application_helper.rb:372:131: C: Layout/LineLength: Line is too long. [140/130]
Check notice on line 115 in app/helpers/custom_fields_helper.rb
github-actions / rubocop
[rubocop] app/helpers/custom_fields_helper.rb#L66-L115 <Metrics/AbcSize>
Assignment Branch Condition size for custom_field_tag is too high. [<10, 40, 11> 42.67/17]
Raw output
app/helpers/custom_fields_helper.rb:66:3: C: Metrics/AbcSize: Assignment Branch Condition size for custom_field_tag is too high. [<10, 40, 11> 42.67/17]
Check notice on line 115 in app/helpers/custom_fields_helper.rb
github-actions / rubocop
[rubocop] app/helpers/custom_fields_helper.rb#L66-L115 <Metrics/PerceivedComplexity>
Perceived complexity for custom_field_tag is too high. [10/8]
Raw output
app/helpers/custom_fields_helper.rb:66:3: C: Metrics/PerceivedComplexity: Perceived complexity for custom_field_tag is too high. [10/8]
Check notice on line 178 in app/helpers/custom_fields_helper.rb
github-actions / rubocop
[rubocop] app/helpers/custom_fields_helper.rb#L146-L178 <Metrics/AbcSize>
Assignment Branch Condition size for custom_field_tag_for_bulk_edit is too high. [<5, 26, 8> 27.66/17]
Raw output
app/helpers/custom_fields_helper.rb:146:3: C: Metrics/AbcSize: Assignment Branch Condition size for custom_field_tag_for_bulk_edit is too high. [<5, 26, 8> 27.66/17]
Check notice on line 124 in lib/tabular_form_builder.rb
github-actions / rubocop
[rubocop] lib/tabular_form_builder.rb#L86-L124 <Metrics/AbcSize>
Assignment Branch Condition size for date_picker is too high. [<12, 38, 7> 40.46/17]
Raw output
lib/tabular_form_builder.rb:86:3: C: Metrics/AbcSize: Assignment Branch Condition size for date_picker is too high. [<12, 38, 7> 40.46/17]
Check notice on line 69 in modules/reporting/lib/widget/filters/date.rb
github-actions / rubocop
[rubocop] modules/reporting/lib/widget/filters/date.rb#L32-L69 <Metrics/AbcSize>
Assignment Branch Condition size for render is too high. [<9, 36, 0> 37.11/17]
Raw output
modules/reporting/lib/widget/filters/date.rb:32:3: C: Metrics/AbcSize: Assignment Branch Condition size for render is too high. [<9, 36, 0> 37.11/17]