Skip to content

Commit

Permalink
rubocop fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alihadimazeh committed Dec 19, 2024
1 parent 35e6238 commit 2ad7a79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Metrics/ClassLength:
# A calculated magnitude based on number of assignments,
# branches, and conditions.
Metrics/AbcSize:
Max: 90
Max: 95

Metrics/ParameterLists:
CountKeywordArgs: false
Expand All @@ -82,10 +82,10 @@ RSpec/AnyInstance:
Enabled: false

Metrics/CyclomaticComplexity:
Max: 20
Max: 25

Metrics/PerceivedComplexity:
Max: 20
Max: 25

Rails/Exit:
Exclude:
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/api/v1/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def show
render_data data: user, status: :ok
end

# rubocop:disable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
# rubocop:disable Metrics/AbcSize
# POST /api/v1/users.json
# Creates and saves a new user record in the database with the provided parameters
def create
Expand Down Expand Up @@ -97,7 +97,7 @@ def create
render_error errors: Rails.configuration.custom_error_msgs[:record_invalid], status: :bad_request
end
end
# rubocop:enable Metrics/AbcSize, Metrics/CyclomaticComplexity, Metrics/PerceivedComplexity
# rubocop:enable Metrics/AbcSize

# PATCH /api/v1/users/:id.json
# Updates the values of a user
Expand Down

0 comments on commit 2ad7a79

Please sign in to comment.