Open ghost opened 9 years ago
Rubocop
Models
# validates_with UnpermittedParamsValidator, fields: [:emergency_code]
should be removedControllers
@emergency.save
is not necessary, @emergency.calc_full_response calls save already@railschallenge-judge01 thanks for the feedback :+1:, I'm working on it :)
Just an FYI, your repo shows an automated score of 110:
4 points probably isn't a huge deal, but if you want to maximize your score you'll want to take a look at those offenses, especially if they are easy to resolve.
The offenses I see when I run rubocop
locally are:
Offenses:
app/controllers/application_controller.rb:62:3: C: Metrics/AbcSize: Assignment Branch Condition size for dispatcher is too high. [34.71/15]
def dispatcher(obj, tbl, severity_hash, type)
^^^
app/controllers/application_controller.rb:62:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for dispatcher is too high. [8/6]
def dispatcher(obj, tbl, severity_hash, type)
^^^
app/controllers/application_controller.rb:62:3: C: Metrics/PerceivedComplexity: Perceived complexity for dispatcher is too high. [10/7]
def dispatcher(obj, tbl, severity_hash, type)
^^^
app/models/emergency.rb:36:3: C: Metrics/AbcSize: Assignment Branch Condition size for calc_full_response is too high. [17.72/15]
def calc_full_response
^^^
@railschallenge-judge04 Thanks, Rubocop offences should be fixed by now.
Placeholder issue for judges' feedback.