Skip to content

Merge branch 'main' into run-standard

80c358f
Select commit
Loading
Failed to load commit list.
Open

Run bin/rubocop -a #1831

Merge branch 'main' into run-standard
80c358f
Select commit
Loading
Failed to load commit list.
GitHub Advanced Security / RuboCop succeeded Apr 22, 2025 in 7s

517 new alerts

New alerts in code changed by this pull request

  • 41 warnings
  • 470 notes

Alerts not introduced by this pull request might have been detected because the code changes were too large.

See annotations below for details.

View all branch alerts.

Annotations

Check notice on line 15 in app/controllers/campaigns/donations_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Checks the correct usage of date aware methods, such as Date.today, Date.current etc. Note

Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.

Check notice on line 27 in app/controllers/nonprofits/custom_field_joins_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Prefer `pluck` over `map { ... }`. Note

Rails/Pluck: Prefer pluck("id") over map { |h| h["id"] }.

Check notice on line 24 in app/controllers/nonprofits/supporters_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Checks the correct usage of date aware methods, such as Date.today, Date.current etc. Note

Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.

Check notice on line 87 in app/controllers/nonprofits/supporters_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Prefer `pluck` over `map { ... }`. Note

Rails/Pluck: Prefer pluck("id") over map { |h| h["id"] }.

Check notice on line 21 in app/controllers/nonprofits/tag_joins_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Prefer `pluck` over `map { ... }`. Note

Rails/Pluck: Prefer pluck("id") over map { |h| h["id"] }.

Check notice on line 47 in app/controllers/recurring_donations_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: params[:id]) instead of manually constructing SQL.

Check warning on line 24 in app/controllers/super_admins_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Avoid rescuing the Exception class. Warning

Lint/RescueException: Avoid rescuing the Exception class. Perhaps you meant to rescue StandardError?

Check notice on line 34 in app/controllers/super_admins_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: params[:profile_id]) instead of manually constructing SQL.

Check notice on line 38 in app/controllers/tickets_controller.rb

See this annotation in the file changed.

Code scanning / Rubocop

Checks the correct usage of date aware methods, such as Date.today, Date.current etc. Note

Rails/Date: Do not use Date.today without zone. Use Time.zone.today instead.

Check notice on line 20 in app/legacy_lib/create_campaign_gift.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: params[:donation_id]) instead of manually constructing SQL.

Check notice on line 25 in app/legacy_lib/create_campaign_gift.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: params[:campaign_gift_option_id]) instead of manually constructing SQL.

Check notice on line 30 in app/legacy_lib/delete_custom_field_joins.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: ids_to_delete) instead of manually constructing SQL.

Check notice on line 6 in app/legacy_lib/email.rb

See this annotation in the file changed.

Code scanning / Rubocop

Constants should use SCREAMING_SNAKE_CASE. Note

Naming/ConstantName: Use SCREAMING_SNAKE_CASE for constants.

Check warning on line 6 in app/legacy_lib/email.rb

See this annotation in the file changed.

Code scanning / Rubocop

Checks unintended or-assignment to constant. Warning

Lint/OrAssignmentToConstant: Avoid using or-assignment with constants.

Check notice on line 12 in app/legacy_lib/export_payments.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: npo_id) instead of manually constructing SQL.

Check notice on line 17 in app/legacy_lib/export_payments.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: user_id) instead of manually constructing SQL.

Check notice on line 51 in app/legacy_lib/export_payments.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: user_id) instead of manually constructing SQL.

Check notice on line 56 in app/legacy_lib/export_payments.rb

See this annotation in the file changed.

Code scanning / Rubocop

Checks the correct usage of time zone aware methods. Note

Rails/TimeZone: 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.

Check notice on line 12 in app/legacy_lib/export_recurring_donations.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: npo_id) instead of manually constructing SQL.

Check notice on line 17 in app/legacy_lib/export_recurring_donations.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: user_id) instead of manually constructing SQL.

Check notice on line 51 in app/legacy_lib/export_recurring_donations.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: user_id) instead of manually constructing SQL.

Check notice on line 56 in app/legacy_lib/export_recurring_donations.rb

See this annotation in the file changed.

Code scanning / Rubocop

Checks the correct usage of time zone aware methods. Note

Rails/TimeZone: 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.

Check notice on line 11 in app/legacy_lib/export_supporter_notes.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: npo_id) instead of manually constructing SQL.

Check notice on line 16 in app/legacy_lib/export_supporter_notes.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: user_id) instead of manually constructing SQL.

Check notice on line 50 in app/legacy_lib/export_supporter_notes.rb

See this annotation in the file changed.

Code scanning / Rubocop

Pass conditions to `where` and `where.not` as a hash instead of manually constructing SQL. Note

Rails/WhereEquals: Use where(id: user_id) instead of manually constructing SQL.