karimmtarek / railschallenge-city-watch

Our first challenge! Build a JSON API for managing your city's emergency services.
0 stars 0 forks source link

Judges' feedback #1

Open ghost opened 9 years ago

ghost commented 9 years ago

Placeholder issue for judges' feedback.

railschallenge-judge01 commented 9 years ago

Rubocop

Models

Controllers

karimmtarek commented 9 years ago

@railschallenge-judge01 thanks for the feedback :+1:, I'm working on it :)

ghost commented 9 years ago

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
  ^^^
karimmtarek commented 9 years ago

@railschallenge-judge04 Thanks, Rubocop offences should be fixed by now.