Page MenuHomeDevCentral
Paste P203

RuboCop analysis for Tommy
ActivePublic

Authored by dereckson on Jul 10 2016, 16:28.
Tags
None
Referenced Files
F650937: RuboCop analysis for Tommy
Sep 21 2018, 11:00
F43843: RuboCop analysis for Tommy
Jul 10 2016, 16:28
Subscribers
None
>>> Lint for tommy.rb:
Warning (Style/FrozenStringLiteralComment) RuboCop
Style/FrozenStringLiteralComment: Missing magic comment `#
frozen_string_literal: true`.
>>> 1 # -------------------------------------------------------------
^
2 # Tommy - Visualisation dashboard for Jenkins
3 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
4 # Author: Arfon Smitn (Zooniverse)
Warning (Metrics/AbcSize) RuboCop
Metrics/AbcSize: Assignment Branch Condition size for parse_project is
too high. [25.81/15]
52 ##
53 # Parses a job element of the Jenkins API.
54 # Returns a Project instance.
>>> 55 def self.parse_project(data)
^
56 project = Project.new(
57 name: data['displayName'].tr('-', ' '),
58 last_build_number: data['builds'].first['number'],
Warning (Metrics/MethodLength) RuboCop
Metrics/MethodLength: Method has too many lines. [24/10]
52 ##
53 # Parses a job element of the Jenkins API.
54 # Returns a Project instance.
>>> 55 def self.parse_project(data)
^
56 project = Project.new(
57 name: data['displayName'].tr('-', ' '),
58 last_build_number: data['builds'].first['number'],
Warning (Layout/EmptyLineAfterGuardClause) RuboCop
Layout/EmptyLineAfterGuardClause: Add empty line after guard clause.
74 'lastFailedBuild' => 'last_failed_url='
75 }
76 urls.each do |api_property, local_property|
>>> 77 next if data[api_property].blank?
^
78 project.send(local_property, data[api_property]['url'])
79 end
80

Event Timeline

dereckson changed the title of this paste from untitled to RuboCop analysis for Tommy.
dereckson updated the paste's language from autodetect to ruby.