Showing 686 of 688 total issues
Trailing whitespace detected. Open
Open
revision['timestamp'] = DateTime.now.to_i # odd assignment needed due to legacy Drupal column types
- Create a ticketCreate a ticket
- Exclude checks
Use tr
instead of gsub
. Open
Open
tags_order = 'CASE WHEN name LIKE ? OR name LIKE ? THEN 1 WHEN name LIKE ? OR name LIKE ? THEN 2 WHEN name LIKE ? OR name LIKE ? THEN 4 ELSE 3 END', "#{query}", "#{query.to_s.gsub(' ', '-')}", "#{query}%", "#{query.to_s.gsub(' ', '-')}%", "%#{query}", "%#{query.to_s.gsub(' ', '-')}"
- Read upRead up
- Create a ticketCreate a ticket
- Exclude checks
This cop identifies places where gsub
can be replaced by
tr
or delete
.
Example:
# bad
'abc'.gsub('b', 'd')
'abc'.gsub('a', '')
'abc'.gsub(/a/, 'd')
'abc'.gsub!('a', 'd')
# good
'abc'.gsub(/.*/, 'a')
'abc'.gsub(/a+/, 'd')
'abc'.tr('b', 'd')
'a b c'.delete(' ')
TODO found Open
Open
<!-- TODO: could be resolved with `node.node.main_image` but applying quick fix here -->
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: make less redundant with https://github.com/publiclab/plots2/blob/main/app/helpers/application_helper.rb#L3
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
# TODO: evaluate if disabling this caching action actually speeds things up?
- Create a ticketCreate a ticket
- Exclude checks
TODO found Open
Open
// TODO: create multicase for "CREATE NEW COMMENT FORM" in reducers.js
- Create a ticketCreate a ticket
- Exclude checks