Skip to content

Commit

Permalink
fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
baldarn committed Aug 20, 2024
1 parent 502fd7c commit dbf86d1
Show file tree
Hide file tree
Showing 3 changed files with 91 additions and 3 deletions.
23 changes: 22 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,28 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-07-19 12:31:30 UTC using RuboCop version 1.64.1.
# on 2024-08-20 08:53:30 UTC using RuboCop version 1.64.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Configuration parameters: Include.
# Include: app/controllers/**/*.rb, app/mailers/**/*.rb
Rails/LexicallyScopedActionFilter:
Exclude:
- 'app/controllers/users/registrations_controller.rb'

# Offense count: 1
# Configuration parameters: ForbiddenMethods, AllowedMethods.
# ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
Rails/SkipsModelValidations:
Exclude:
- 'db/migrate/20240812090546_add_service_name_to_active_storage_blobs.active_storage.rb'

# Offense count: 1
# Configuration parameters: Include.
# Include: db/**/*.rb
Rails/ThreeStateBooleanColumn:
Exclude:
- 'db/migrate/20240818144629_create_recurring_tasks.solid_queue.rb'
63 changes: 63 additions & 0 deletions config/brakeman.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"ignored_warnings": [
{
"warning_type": "Mass Assignment",
"warning_code": 105,
"fingerprint": "0a1a3c5279485d15d9c6c50797f45b3e7322c4773d4246804d8084724d1d48c0",
"check_name": "PermitAttributes",
"message": "Potentially dangerous key allowed for mass assignment",
"file": "app/controllers/users_controller.rb",
"line": 62,
"link": "https://brakemanscanner.org/docs/warning_types/mass_assignment/",
"code": "params.require(:user).permit(:first_name, :last_name, :email, :picture, :role, :blsd_expires_at, :group_ids => ([]))",
"render_path": null,
"location": {
"type": "method",
"class": "UsersController",
"method": "user_params"
},
"user_input": ":role",
"confidence": "Medium",
"cwe_id": [
915
],
"note": ""
},
{
"warning_type": "Dynamic Render Path",
"warning_code": 15,
"fingerprint": "98eeb33f9eb07816fb55dafdc27c35da8afe256aae03213adf4fec346877b886",
"check_name": "Render",
"message": "Render path contains parameter value",
"file": "app/views/events/edit.html.erb",
"line": 1,
"link": "https://brakemanscanner.org/docs/warning_types/dynamic_render_path/",
"code": "render(action => current_user.club.events.find(params[:id]), {})",
"render_path": [
{
"type": "controller",
"class": "EventsController",
"method": "edit",
"line": 18,
"file": "app/controllers/events_controller.rb",
"rendered": {
"name": "events/edit",
"file": "app/views/events/edit.html.erb"
}
}
],
"location": {
"type": "template",
"template": "events/edit"
},
"user_input": "params[:id]",
"confidence": "Weak",
"cwe_id": [
22
],
"note": ""
}
],
"updated": "2024-08-20 10:50:17 +0200",
"brakeman_version": "6.1.2"
}
8 changes: 6 additions & 2 deletions db/migrate/20240818160205_remove_places.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

class RemovePlaces < ActiveRecord::Migration[7.2]
def change
drop_table :places
drop_table :places do |t|
t.string :name, null: false

remove_column :events, :place_id
t.timestamps
end

remove_column :events, :place_id, :integer
end
end

0 comments on commit dbf86d1

Please sign in to comment.