Created
November 14, 2014 11:56
-
-
Save PragTob/756ad5684c8dc47e5f2c to your computer and use it in GitHub Desktop.
Shoes rubocop offense 14/11/2014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Inspecting 160 files | |
| ..CCWCCCCWWCCWCWCW.CCC.CCWCCCCCCCCCC.CCCCCCCCCCCCCCCCWCWCCCCCCCCCWC.C.CCCCCCCCCWCCCCCCCCCCCCCCCCCCCCCCWCCCWCW.WCCCCCCCC..CCCWCW.CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC | |
| Offenses: | |
| lib/shoes/dsl.rb:5:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/dsl.rb:34:81: C: Metrics/LineLength: Line is too long. [101/80] | |
| $stderr.puts "WARN: The Shoes.setup method is deprecated, you need to install gems yourself." \ | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:35:81: C: Metrics/LineLength: Line is too long. [94/80] | |
| "You can do this using the 'gem install' command or bundler and a Gemfile." | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:47:81: C: Metrics/LineLength: Line is too long. [121/80] | |
| raise LoadError, "Couldn't load backend Shoes::#{name.capitalize}'. Error: #{e.message}\n#{e.backtrace.join("\n")}" | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:51:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class DeprecatedShoesGemSetup | |
| ^^^^^ | |
| lib/shoes/dsl.rb:56:81: C: Metrics/LineLength: Line is too long. [150/80] | |
| $stderr.puts "WARN: To use the '#{name}' gem, install it with '#{install_cmd}', and put 'require \"#{name}\"' at the top of your Shoes program." | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:201:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| create Shoes::Background, pattern(color), style_normalizer.normalize(styles) | |
| ^^ | |
| lib/shoes/dsl.rb:302:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| # @param [Float] angle1 angle in radians marking the beginning of the arc segment | |
| ^^^^^ | |
| lib/shoes/dsl.rb:306:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| # @option opts [Boolean] center (false) is (left, top) the center of the rectangle? | |
| ^^^^^^^ | |
| lib/shoes/dsl.rb:307:12: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def arc(left, top, width, height, angle1, angle2, styles = {}, &blk) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:318:13: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def line(x1, y1, x2, y2, styles = {}, &blk) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:319:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| create Shoes::Line, Shoes::Point.new(x1, y1), Shoes::Point.new(x2, y2), styles, blk | |
| ^^^^^^^^^ | |
| lib/shoes/dsl.rb:338:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @option styles [Integer] left (0) the x-coordinate of the top-left corner | |
| ^ | |
| lib/shoes/dsl.rb:343:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| # @option styles [Boolean] center (false) is (left, top) the center of the oval | |
| ^^^^^ | |
| lib/shoes/dsl.rb:344:5: C: Metrics/AbcSize: Assignment Branch Condition size for oval is too high. [23.22/15] | |
| def oval(*opts, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:344:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for oval is too high. [10/6] | |
| def oval(*opts, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:344:5: C: Metrics/MethodLength: Method has too many lines. [24/10] | |
| def oval(*opts, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:344:5: C: Metrics/PerceivedComplexity: Perceived complexity for oval is too high. [8/7] | |
| def oval(*opts, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:348:9: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when 3 | |
| ^^^^ | |
| lib/shoes/dsl.rb:351:9: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when 4 | |
| ^^^^ | |
| lib/shoes/dsl.rb:353:9: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when 0 | |
| ^^^^ | |
| lib/shoes/dsl.rb:387:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @option styles [Integer] left (0) the x-coordinate of the top-left corner | |
| ^ | |
| lib/shoes/dsl.rb:392:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| # @option styles [Boolean] center (false) is (left, top) the center of the rectangle? | |
| ^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:393:5: C: Metrics/AbcSize: Assignment Branch Condition size for rect is too high. [29.93/15] | |
| def rect(*args, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:393:5: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for rect is too high. [9/6] | |
| def rect(*args, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:393:5: C: Metrics/MethodLength: Method has too many lines. [28/10] | |
| def rect(*args, &blk) | |
| ^^^ | |
| lib/shoes/dsl.rb:424:13: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def star(left, top, points = 10, outer = 100.0, inner = 50.0, styles = {}, &blk) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dsl.rb:424:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| def star(left, top, points = 10, outer = 100.0, inner = 50.0, styles = {}, &blk) | |
| ^^^^ | |
| lib/shoes/dsl.rb:539:7: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if url_data | |
| ^^ | |
| lib/shoes/configuration.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Configuration | |
| ^^^^^ | |
| lib/shoes/configuration.rb:33:81: C: Metrics/LineLength: Line is too long. [125/80] | |
| fail "Can't switch backend to Shoes::#{name.capitalize}, Shoes::#{backend_name.capitalize} backend already loaded." | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/configuration.rb:43:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # Shoes.configuration.backend_class(shoes_button) # => Shoes::Swt::Button | |
| ^ | |
| lib/shoes/configuration.rb:46:81: C: Metrics/LineLength: Line is too long. [140/80] | |
| fail ArgumentError, "#{shoes_object} does not have a backend class defined for #{backend}" unless backend.const_defined?(class_name) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/configuration.rb:50:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # Creates an appropriate backend object, passing along additional arguments | |
| ^ | |
| lib/shoes/configuration.rb:55:81: C: Metrics/LineLength: Line is too long. [92/80] | |
| # Shoes.configuration.backend_for(button, args) # => <Shoes::Swt::Button:0x12345678> | |
| ^^^^^^^^^^^^ | |
| lib/shoes/configuration.rb:62:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| backend_factory(shoes_object).call(shoes_object, shoes_object.app.gui, *args, &blk) | |
| ^^^^^^^^^^^ | |
| lib/shoes/link.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Link < Span | |
| ^^^^^ | |
| lib/shoes/link.rb:30:13: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| click &blk | |
| ^ | |
| lib/shoes/star.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Star | |
| ^^^^^ | |
| lib/shoes/star.rb:8:81: C: Metrics/LineLength: Line is too long. [88/80] | |
| style_with :angle, :art_styles, :common_styles, :dimensions, :inner, :outer, :points | |
| ^^^^^^^^ | |
| lib/shoes/star.rb:11:5: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [16.12/15] | |
| def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
| ^^^ | |
| lib/shoes/star.rb:11:5: C: Metrics/MethodLength: Method has too many lines. [12/10] | |
| def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
| ^^^ | |
| lib/shoes/star.rb:11:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/star.rb:11:81: C: Metrics/LineLength: Line is too long. [88/80] | |
| def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
| ^^^^^^^^ | |
| lib/shoes/star.rb:38:5: C: Metrics/AbcSize: Assignment Branch Condition size for in_bounds? is too high. [16.4/15] | |
| def in_bounds?(x, y) | |
| ^^^ | |
| lib/shoes/span.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Span < Text | |
| ^^^^^ | |
| lib/shoes/dimensions.rb:34:3: C: Metrics/ClassLength: Class definition is too long. [103/100] | |
| class Dimensions | |
| ^^^^^ | |
| lib/shoes/dimensions.rb:34:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Dimensions | |
| ^^^^^ | |
| lib/shoes/dimensions.rb:46:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # bottom values. Because right is not left + width but rather left + width -1 | |
| ^ | |
| lib/shoes/dimensions.rb:54:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def initialize(parent, left_or_hash = nil, top = nil, width = nil, | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dimensions.rb:104:5: C: Metrics/AbcSize: Assignment Branch Condition size for inspect is too high. [15.17/15] | |
| def inspect | |
| ^^^ | |
| lib/shoes/dimensions.rb:107:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| " relative:#{Point.new left, top}->#{Point.new right, bottom}" \ | |
| ^^^ | |
| lib/shoes/dimensions.rb:108:81: C: Metrics/LineLength: Line is too long. [119/80] | |
| " absolute:#{Point.new absolute_left, absolute_top}->#{Point.new absolute_right, absolute_bottom}" \ | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dimensions.rb:161:5: C: Metrics/AbcSize: Assignment Branch Condition size for init_margins is too high. [16.03/15] | |
| def init_margins(opts) | |
| ^^^ | |
| lib/shoes/dimensions.rb:189:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| # depends on a #dimensions method being present that returns a Dimensions object | |
| ^^ | |
| lib/shoes/dimensions.rb:194:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| DELEGATED_METHODS = Dimensions.public_instance_methods(false) - UNDELEGATED_METHODS | |
| ^^^^^^^ | |
| lib/shoes/swt.rb:6:1: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Swt | |
| ^^^^^^ | |
| lib/shoes/swt.rb:11:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Events | |
| ^^^^^^ | |
| lib/shoes/swt.rb:16:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Widgets | |
| ^^^^^^ | |
| lib/shoes/swt.rb:21:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Graphics | |
| ^^^^^^ | |
| lib/shoes/swt.rb:28:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Swt | |
| ^^^^^^ | |
| lib/shoes/swt.rb:31:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Shoes | |
| ^^^^^^ | |
| lib/shoes/swt.rb:45:81: C: Metrics/LineLength: Line is too long. [97/80] | |
| ::Swt::Widgets::Display.new.getFontList(nil, true).each { |f| ::Shoes::FONTS << f.getName } | |
| ^^^^^^^^^^^^^^^^^ | |
| lib/shoes/widget.rb:61:5: W: Lint/UselessAccessModifier: Useless [33mprivate[0m access modifier. | |
| private | |
| ^^^^^^^ | |
| lib/shoes/list_box.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ListBox | |
| ^^^^^ | |
| lib/shoes/list_box.rb:8:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| style_with :change, :choose, :common_styles, :dimensions, :items, :state, :text | |
| ^^^ | |
| lib/shoes/list_box.rb:18:14: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| change &blk if blk | |
| ^ | |
| lib/shoes/progress.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Progress | |
| ^^^^^ | |
| lib/shoes/logger.rb:2:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Logger | |
| ^^^^^^ | |
| lib/shoes/logger.rb:18:5: C: Metrics/AbcSize: Assignment Branch Condition size for setup is too high. [33.51/15] | |
| def self.setup | |
| ^^^ | |
| lib/shoes/logger.rb:18:5: C: Metrics/MethodLength: Method has too many lines. [38/10] | |
| def self.setup | |
| ^^^ | |
| lib/shoes/logger.rb:20:9: C: Metrics/AbcSize: Assignment Branch Condition size for update is too high. [19.34/15] | |
| def update | |
| ^^^ | |
| lib/shoes/logger.rb:20:9: C: Metrics/MethodLength: Method has too many lines. [18/10] | |
| def update | |
| ^^^ | |
| lib/shoes/logger.rb:21:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if @hash != Shoes::LOG.hash | |
| ^^ | |
| lib/shoes/logger.rb:26:43: C: Style/EvenOdd: Replace with [33mFixnum#even?[0m. | |
| background "#f1f5e1" if index % 2 == 0 | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/logger.rb:27:52: C: Style/EvenOdd: Replace with [33mFixnum#odd?[0m. | |
| background rgb(220, 220, 220) if index % 2 != 0 | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/input_box.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class InputBox | |
| ^^^^^ | |
| lib/shoes/input_box.rb:16:14: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| change &blk if blk | |
| ^ | |
| lib/shoes/input_box.rb:46:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class EditBox < InputBox | |
| ^^^^^ | |
| lib/shoes/input_box.rb:51:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class EditLine < InputBox | |
| ^^^^^ | |
| lib/shoes/download.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class HttpResponse | |
| ^^^^^ | |
| lib/shoes/download.rb:12:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Download | |
| ^^^^^ | |
| lib/shoes/download.rb:32:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def started? | |
| ^^^ | |
| lib/shoes/download.rb:36:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def finished? | |
| ^^^ | |
| lib/shoes/download.rb:54:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def length | |
| ^^^ | |
| lib/shoes/download.rb:60:5: C: Metrics/AbcSize: Assignment Branch Condition size for start_download is too high. [18.22/15] | |
| def start_download | |
| ^^^ | |
| lib/shoes/download.rb:60:5: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
| def start_download | |
| ^^^ | |
| lib/shoes/internal_app.rb:9:3: C: Metrics/ClassLength: Class definition is too long. [166/100] | |
| class InternalApp | |
| ^^^^^ | |
| lib/shoes/internal_app.rb:20:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| background: Shoes::COLORS.fetch(:shoes_background) }.freeze | |
| ^^^ | |
| lib/shoes/internal_app.rb:49:26: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| current_slot.clear &blk | |
| ^ | |
| lib/shoes/internal_app.rb:97:7: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| unless mouse_hover_controls.include? element | |
| ^^^^^^ | |
| lib/shoes/internal_app.rb:135:25: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| app.instance_eval &blk | |
| ^ | |
| lib/shoes/internal_app.rb:170:24: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| @top_slot.append &execution_blk | |
| ^ | |
| lib/shoes/internal_app.rb:173:5: C: Metrics/MethodLength: Method has too many lines. [12/10] | |
| def create_execution_block(blk) | |
| ^^^ | |
| lib/shoes/internal_app.rb:199:9: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_attributes_from_options(opts) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/dimension.rb:2:3: C: Metrics/ClassLength: Class definition is too long. [161/100] | |
| class Dimension | |
| ^^^^^ | |
| lib/shoes/dimension.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Dimension | |
| ^^^^^ | |
| lib/shoes/dimension.rb:8:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # bottom values. Because right is not left + width but rather left + width -1 | |
| ^ | |
| lib/shoes/dimension.rb:131:9: C: Style/PredicateName: Rename [33mis_relative?[0m to [33mrelative?[0m. | |
| def is_relative?(result) | |
| ^^^^^^^^^^^^ | |
| lib/shoes/dimension.rb:145:9: C: Style/PredicateName: Rename [33mis_string?[0m to [33mstring?[0m. | |
| def is_string?(result) | |
| ^^^^^^^^^^ | |
| lib/shoes/dimension.rb:149:9: C: Style/PredicateName: Rename [33mis_negative?[0m to [33mnegative?[0m. | |
| def is_negative?(result) | |
| ^^^^^^^^^^^^ | |
| lib/shoes/dimension.rb:206:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def start_as_center? | |
| ^^^ | |
| lib/shoes/dimension.rb:220:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ParentDimension < Dimension | |
| ^^^^^ | |
| lib/shoes/text_block.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/text_block.rb:5:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class TextBlock | |
| ^^^^^ | |
| lib/shoes/text_block.rb:36:15: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| replace *texts[0] | |
| ^ | |
| lib/shoes/text_block.rb:42:20: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| @gui.replace *texts | |
| ^ | |
| lib/shoes/text_block.rb:65:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def has_textcursor? | |
| ^^^ | |
| lib/shoes/text_block.rb:65:9: C: Style/PredicateName: Rename [33mhas_textcursor?[0m to [33mtextcursor?[0m. | |
| def has_textcursor? | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/text_block.rb:83:5: C: Metrics/AbcSize: Assignment Branch Condition size for gather_text_styles is too high. [17.2/15] | |
| def gather_text_styles(parent_text, texts, styles = {}, start_point = 0) | |
| ^^^ | |
| lib/shoes/text_block.rb:83:5: C: Metrics/MethodLength: Method has too many lines. [17/10] | |
| def gather_text_styles(parent_text, texts, styles = {}, start_point = 0) | |
| ^^^ | |
| lib/shoes/text_block.rb:111:5: C: Metrics/AbcSize: Assignment Branch Condition size for parse_font_style is too high. [19.82/15] | |
| def parse_font_style(type) | |
| ^^^ | |
| lib/shoes/gradient.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Gradient | |
| ^^^^^ | |
| lib/shoes/key_event.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class KeyEvent | |
| ^^^^^ | |
| lib/shoes/background.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Background | |
| ^^^^^ | |
| lib/shoes/oval.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Oval | |
| ^^^^^ | |
| lib/shoes/oval.rb:10:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def initialize(app, parent, left, top, width, height, styles = {}, blk = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/oval.rb:10:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| def initialize(app, parent, left, top, width, height, styles = {}, blk = nil) | |
| ^ | |
| lib/shoes/text_block_dimensions.rb:44:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module TextBlockDimensionsDelegations | |
| ^^^^^^ | |
| lib/shoes/shape.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shape | |
| ^^^^^ | |
| lib/shoes/shape.rb:80:17: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def curve_to(cx1, cy1, cx2, cy2, x, y) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/shape.rb:94:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| # @param [Integer] arc_angle The angular extent of the arc, relative to the start angle | |
| ^^^^^^^^^^^ | |
| lib/shoes/shape.rb:96:12: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def arc(x, y, width, height, start_angle, arc_angle) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/shape.rb:97:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| update_bounds_rect(x - width / 2, y - height / 2, x + width / 2, y + height / 2) | |
| ^^^^^^ | |
| lib/shoes/shape.rb:144:33: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| (values + additional).map &:to_i | |
| ^ | |
| lib/shoes/line.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Line | |
| ^^^^^ | |
| lib/shoes/line.rb:12:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def initialize(app, parent, point_a, point_b, styles = {}, blk = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/line.rb:71:5: C: Metrics/MethodLength: Method has too many lines. [12/10] | |
| def enclosing_box_of_line | |
| ^^^ | |
| lib/shoes/renamed_delegate.rb:1:1: C: Style/Documentation: Missing top-level module documentation comment. | |
| module RenamedDelegate | |
| ^^^^^^ | |
| lib/shoes/image.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Image | |
| ^^^^^ | |
| lib/shoes/button.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Button | |
| ^^^^^ | |
| lib/shoes/app.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/app.rb:6:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| # @param opts [Hash] A hash of options used instantiate the Shoes::App object with. | |
| ^^^^^ | |
| lib/shoes/app.rb:7:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| # @param blk [Proc] The block containing the DSL instructions for the actual app. | |
| ^^^^ | |
| lib/shoes/app.rb:36:81: C: Metrics/LineLength: Line is too long. [98/80] | |
| # @param blk [Proc] The block containing the DSL instructions to be executed within the app. | |
| ^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/app.rb:39:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| # @option opts [Boolean] :resizable (true) Whether the window is resizable | |
| ^^^^ | |
| lib/shoes/app.rb:40:81: C: Metrics/LineLength: Line is too long. [95/80] | |
| # @option opts [Boolean] :fullscreen (false) Whether the app should start in fullscreen | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/app.rb:42:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @option opts [Fixnum] :height (500) The height of the app window | |
| ^ | |
| lib/shoes/app.rb:116:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| Shoes::DSL.public_instance_methods) - DELEGATE_BLACKLIST).freeze | |
| ^^^^^^^^^ | |
| lib/shoes/version.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/check_button.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class CheckButton | |
| ^^^^^ | |
| lib/shoes/check_button.rb:38:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Check < CheckButton | |
| ^^^^^ | |
| lib/shoes/image_pattern.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ImagePattern | |
| ^^^^^ | |
| lib/shoes/animation.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Animation | |
| ^^^^^ | |
| lib/shoes/animation.rb:33:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def stopped? | |
| ^^^ | |
| lib/shoes/animation.rb:45:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def removed? | |
| ^^^ | |
| lib/shoes/point.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Point | |
| ^^^^^ | |
| lib/shoes/point.rb:42:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| other.respond_to?(:x) && @x == other.x && other.respond_to?(:y) && @y == other.y | |
| ^^^^^^ | |
| lib/shoes/timer.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Timer | |
| ^^^^^ | |
| lib/shoes/font.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/font.rb:4:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Font | |
| ^^^^^^ | |
| lib/shoes/text.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Text | |
| ^^^^^ | |
| lib/shoes/slot_contents.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class SlotContents < SimpleDelegator | |
| ^^^^^ | |
| lib/shoes/slot_contents.rb:37:81: C: Metrics/LineLength: Line is too long. [106/80] | |
| super.insert(-2, " @size=#{size} @prepending=#{@prepending} @prepending_index=#{@prepending_index}") | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/radio.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Radio < CheckButton | |
| ^^^^^ | |
| lib/shoes/border.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Border | |
| ^^^^^ | |
| lib/shoes/border.rb:8:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| style_with :angle, :common_styles, :curve, :dimensions, :stroke, :strokewidth | |
| ^ | |
| lib/shoes/slot.rb:2:3: C: Metrics/ClassLength: Class definition is too long. [200/100] | |
| class Slot | |
| ^^^^^ | |
| lib/shoes/slot.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Slot | |
| ^^^^^ | |
| lib/shoes/slot.rb:12:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| attr_reader :parent, :dimensions, :gui, :contents, :blk, :hover_proc, :leave_proc | |
| ^^^^^ | |
| lib/shoes/slot.rb:79:5: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def hovered? | |
| ^^^ | |
| lib/shoes/slot.rb:120:81: C: Metrics/LineLength: Line is too long. [151/80] | |
| "#<#{self.class}:0x#{hash.to_s(16)} @contents=#{@contents.inspect} and so much stuff literally breaks the memory limit. Look at it selectively.>" | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/slot.rb:142:81: C: Metrics/LineLength: Line is too long. [93/80] | |
| element.contents_alignment(current_position) if element.respond_to? :contents_alignment | |
| ^^^^^^^^^^^^^ | |
| lib/shoes/slot.rb:227:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| fitting_width = element.fitting_width if element.respond_to?(:fitting_width) | |
| ^^ | |
| lib/shoes/slot.rb:248:9: C: Style/PredicateName: Rename [33mhas_variable_height?[0m to [33mvariable_height?[0m. | |
| def has_variable_height? | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/slot.rb:253:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Flow < Slot | |
| ^^^^^ | |
| lib/shoes/slot.rb:263:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Stack < Slot | |
| ^^^^^ | |
| lib/shoes/color.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/color.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Color | |
| ^^^^^ | |
| lib/shoes/color.rb:13:5: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [21.49/15] | |
| def initialize(*args) # red, green, blue, alpha = OPAQUE) | |
| ^^^ | |
| lib/shoes/color.rb:13:5: C: Metrics/MethodLength: Method has too many lines. [20/10] | |
| def initialize(*args) # red, green, blue, alpha = OPAQUE) | |
| ^^^ | |
| lib/shoes/color.rb:114:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class HexConverter | |
| ^^^^^ | |
| lib/shoes/color.rb:143:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module DSLHelpers | |
| ^^^^^^ | |
| lib/shoes/color.rb:144:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for pattern is too high. [7/6] | |
| def pattern(*args) | |
| ^^^ | |
| lib/shoes/color.rb:144:7: C: Metrics/MethodLength: Method has too many lines. [17/10] | |
| def pattern(*args) | |
| ^^^ | |
| lib/shoes/color.rb:148:13: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when String | |
| ^^^^ | |
| lib/shoes/color.rb:150:13: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when Shoes::Color | |
| ^^^^ | |
| lib/shoes/color.rb:152:13: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when Range, Shoes::Gradient | |
| ^^^^ | |
| lib/shoes/color.rb:154:13: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when Shoes::ImagePattern | |
| ^^^^ | |
| lib/shoes/color.rb:187:7: C: Metrics/AbcSize: Assignment Branch Condition size for gradient is too high. [18.47/15] | |
| def gradient(*args) | |
| ^^^ | |
| lib/shoes/color.rb:187:7: C: Metrics/MethodLength: Method has too many lines. [17/10] | |
| def gradient(*args) | |
| ^^^ | |
| lib/shoes/color.rb:189:11: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when 1 | |
| ^^^^ | |
| lib/shoes/color.rb:192:15: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when Gradient | |
| ^^^^ | |
| lib/shoes/color.rb:194:15: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when Range | |
| ^^^^ | |
| lib/shoes/color.rb:199:11: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when 2 | |
| ^^^^ | |
| lib/shoes/color.rb:202:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| fail ArgumentError, "Wrong number of arguments (#{args.length} for 1 or 2)" | |
| ^^^^^^^ | |
| lib/shoes/color.rb:228:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module DSL | |
| ^^^^^^ | |
| lib/shoes/rect.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Rect | |
| ^^^^^ | |
| lib/shoes/rect.rb:11:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def initialize(app, parent, left, top, width, height, styles = {}, blk = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/rect.rb:11:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| def initialize(app, parent, left, top, width, height, styles = {}, blk = nil) | |
| ^ | |
| lib/shoes/builtin_methods.rb:9:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module BuiltinMethods | |
| ^^^^^^ | |
| lib/shoes/url.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/url.rb:7:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module URL | |
| ^^^^^^ | |
| lib/shoes/url.rb:21:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module URLDefiner | |
| ^^^^^^ | |
| lib/shoes/url.rb:22:5: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def url(page, method) | |
| ^^^ | |
| lib/shoes/sound.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Sound | |
| ^^^^^ | |
| lib/shoes/dialog.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Dialog | |
| ^^^^^ | |
| lib/shoes/dialog.rb:19:5: C: Metrics/AbcSize: Assignment Branch Condition size for ask is too high. [17.49/15] | |
| def ask(msg, args) | |
| ^^^ | |
| lib/shoes/dialog.rb:19:5: C: Metrics/MethodLength: Method has too many lines. [23/10] | |
| def ask(msg, args) | |
| ^^^ | |
| lib/shoes/arc.rb:2:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Arc | |
| ^^^^^ | |
| lib/shoes/arc.rb:8:81: C: Metrics/LineLength: Line is too long. [99/80] | |
| style_with :angle1, :angle2, :art_styles, :center, :common_styles, :dimensions, :radius, :wedge | |
| ^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/arc.rb:11:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def initialize(app, parent, left, top, width, height, angle1, angle2, styles = {}, blk = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/arc.rb:11:81: C: Metrics/LineLength: Line is too long. [97/80] | |
| def initialize(app, parent, left, top, width, height, angle1, angle2, styles = {}, blk = nil) | |
| ^^^^^^^^^^^^^^^^^ | |
| lib/shoes/logger/ruby.rb:5:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Ruby < SimpleDelegator | |
| ^^^^^ | |
| lib/shoes/logger/ruby.rb:10:22: C: Style/FormatString: Favor [33mformat[0m over [33mString#%[0m. | |
| "%s: %s\n" % [severity, message] | |
| ^ | |
| lib/shoes/ui/manual.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/ui/manual.rb:3:5: C: Style/GlobalVars: Do not introduce global variables. | |
| $lang = lang | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:5:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Array | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:6:9: C: Style/OpMethod: When defining the [33m/[0m operator, name its argument [33mother[0m. | |
| def /(len) | |
| ^^^ | |
| lib/shoes/ui/help.rb:26:1: C: Metrics/ClassLength: Class definition is too long. [462/100] | |
| class Manual < Shoes | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:26:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Manual < Shoes | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:37:14: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| TOC.clear; TOC_LIST.clear | |
| ^ | |
| lib/shoes/ui/help.rb:42:3: C: Metrics/AbcSize: Assignment Branch Condition size for get_title_and_desc is too high. [24.27/15] | |
| def get_title_and_desc(pnum) | |
| ^^^ | |
| lib/shoes/ui/help.rb:54:3: C: Metrics/AbcSize: Assignment Branch Condition size for table_of_contents is too high. [21.68/15] | |
| def table_of_contents | |
| ^^^ | |
| lib/shoes/ui/help.rb:57:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| title = section ? DOCS[chapter][1][:sections][section][1][:title] : DOCS[chapter][0] | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:60:81: C: Metrics/LineLength: Line is too long. [133/80] | |
| section ? [' ', link(title) { visit "/manual/#{pnum}" }, "\n"] : [link(fg(title, magenta)) { visit "/manual/#{pnum}" }, "\n"] | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:64:3: C: Metrics/AbcSize: Assignment Branch Condition size for manual is too high. [21.02/15] | |
| def manual(pnum, docs_title, docs_description, docs_methods) | |
| ^^^ | |
| lib/shoes/ui/help.rb:64:3: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
| def manual(pnum, docs_title, docs_description, docs_methods) | |
| ^^^ | |
| lib/shoes/ui/help.rb:80:3: C: Metrics/AbcSize: Assignment Branch Condition size for show_header is too high. [16/15] | |
| def show_header(docs_title) | |
| ^^^ | |
| lib/shoes/ui/help.rb:87:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| image(File.join(DIR, 'static/shoes-icon.png'), width: 110, height: 110).move 5, -12 | |
| ^^^^^^^ | |
| lib/shoes/ui/help.rb:90:3: C: Metrics/AbcSize: Assignment Branch Condition size for show_toc is too high. [18.03/15] | |
| def show_toc | |
| ^^^ | |
| lib/shoes/ui/help.rb:90:3: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def show_toc | |
| ^^^ | |
| lib/shoes/ui/help.rb:96:81: C: Metrics/LineLength: Line is too long. [137/80] | |
| inscription "Not findng it?\n", 'Try ', link(fg 'Search', white) { visit '/manual/999' }, '!', align: 'center', stroke: lightgray | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:99:12: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| para *TOC | |
| ^ | |
| lib/shoes/ui/help.rb:104:3: C: Metrics/AbcSize: Assignment Branch Condition size for show_methods is too high. [21.05/15] | |
| def show_methods(docs_methods, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:104:3: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
| def show_methods(docs_methods, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:110:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| para ' ', fg(strong(m[0...n]), white), fg(strong(m[n..-1]), rgb(160, 160, 160)) | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:120:3: C: Metrics/AbcSize: Assignment Branch Condition size for show_page is too high. [43.37/15] | |
| def show_page(paras, intro = false, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:120:3: C: Metrics/MethodLength: Method has too many lines. [31/10] | |
| def show_page(paras, intro = false, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:127:11: W: Lint/UnderscorePrefixedVariableName: Do not use prefix [33m_[0m for a variable that is used. | |
| _code = lines[n...-1].join(NL + ' ') | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:130:57: W: Lint/Eval: The use of [33meval[0m is a serious security risk. | |
| inscription link(fg('Run this', magenta)) { eval s.mk_executable(_code), TOPLEVEL_BINDING }, ' ', align: 'right' | |
| ^^^^ | |
| lib/shoes/ui/help.rb:130:81: C: Metrics/LineLength: Line is too long. [125/80] | |
| inscription link(fg('Run this', magenta)) { eval s.mk_executable(_code), TOPLEVEL_BINDING }, ' ', align: 'right' | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:134:20: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| para *highlight(' ' + _code, nil).map { |e| code e }, NL * 2, margin: [-10, 10, 0, 20] | |
| ^ | |
| lib/shoes/ui/help.rb:134:81: C: Metrics/LineLength: Line is too long. [101/80] | |
| para *highlight(' ' + _code, nil).map { |e| code e }, NL * 2, margin: [-10, 10, 0, 20] | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:155:3: C: Metrics/AbcSize: Assignment Branch Condition size for show_paragraph is too high. [43/15] | |
| def show_paragraph(txt, intro, i, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:155:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for show_paragraph is too high. [10/6] | |
| def show_paragraph(txt, intro, i, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:155:3: C: Metrics/MethodLength: Method has too many lines. [16/10] | |
| def show_paragraph(txt, intro, i, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:157:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| txts = txt.split(/(\[\[\S+?\]\])/m).map { |s| s.split(/(\[\[\S+? .+?\]\])/m) }.flatten | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:159:42: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| when /\A==== (.+) ====/ then caption *marker(Regexp.last_match[1], term), size: 24 | |
| ^ | |
| lib/shoes/ui/help.rb:159:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| when /\A==== (.+) ====/ then caption *marker(Regexp.last_match[1], term), size: 24 | |
| ^^^^^^ | |
| lib/shoes/ui/help.rb:160:40: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| when /\A=== (.+) ===/ then tagline *marker(Regexp.last_match[1], term), size: 12, weight: 'bold' | |
| ^ | |
| lib/shoes/ui/help.rb:160:81: C: Metrics/LineLength: Line is too long. [100/80] | |
| when /\A=== (.+) ===/ then tagline *marker(Regexp.last_match[1], term), size: 12, weight: 'bold' | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:161:39: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| when /\A== (.+) ==/ then subtitle *marker(Regexp.last_match[1], term) | |
| ^ | |
| lib/shoes/ui/help.rb:162:34: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| when /\A= (.+) =/ then title *marker(Regexp.last_match[1], term) | |
| ^ | |
| lib/shoes/ui/help.rb:166:12: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| para *mk_deco(mk_links(txts, term).flatten), NL, (intro && i.zero?) ? { size: 16 } : '' | |
| ^ | |
| lib/shoes/ui/help.rb:166:81: C: Metrics/LineLength: Line is too long. [93/80] | |
| para *mk_deco(mk_links(txts, term).flatten), NL, (intro && i.zero?) ? { size: 16 } : '' | |
| ^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:168:65: W: Lint/Eval: The use of [33meval[0m is a serious security risk. | |
| image File.join(DIR, "static/#{Regexp.last_match[3]}"), eval("{#{Regexp.last_match[2] || 'margin_left: 50'}}") | |
| ^^^^ | |
| lib/shoes/ui/help.rb:168:81: C: Metrics/LineLength: Line is too long. [118/80] | |
| image File.join(DIR, "static/#{Regexp.last_match[3]}"), eval("{#{Regexp.last_match[2] || 'margin_left: 50'}}") | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:174:3: C: Metrics/AbcSize: Assignment Branch Condition size for mk_links is too high. [28.35/15] | |
| def mk_links(txts, term = nil) | |
| ^^^ | |
| lib/shoes/ui/help.rb:176:81: C: Metrics/LineLength: Line is too long. [165/80] | |
| .map { |txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = Regexp.last_match[1].split('.'); link(ins *marker(t.last, term)) { visit "/manual/#{find_pnum t.first}" }) : txt } | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:176:83: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| .map { |txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = Regexp.last_match[1].split('.'); link(ins *marker(t.last, term)) { visit "/manual/#{find_pnum t.first}" }) : txt } | |
| ^ | |
| lib/shoes/ui/help.rb:176:94: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| .map { |txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = Regexp.last_match[1].split('.'); link(ins *marker(t.last, term)) { visit "/manual/#{find_pnum t.first}" }) : txt } | |
| ^ | |
| lib/shoes/ui/help.rb:178:69: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = Regexp.last_match[1]; link(ins *marker(Regexp.last_match[2], term)) { visit url =~ /^http/ ? url : "/manual/#{find_pnum url}" }) : | |
| ^ | |
| lib/shoes/ui/help.rb:178:80: W: Lint/AmbiguousOperator: Ambiguous splat operator. Parenthesize the method arguments if it's surely a splat operator, or add a whitespace to the right of the [33m*[0m if it should be a multiplication. | |
| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = Regexp.last_match[1]; link(ins *marker(Regexp.last_match[2], term)) { visit url =~ /^http/ ? url : "/manual/#{find_pnum url}" }) : | |
| ^ | |
| lib/shoes/ui/help.rb:178:81: C: Metrics/LineLength: Line is too long. [178/80] | |
| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = Regexp.last_match[1]; link(ins *marker(Regexp.last_match[2], term)) { visit url =~ /^http/ ? url : "/manual/#{find_pnum url}" }) : | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:178:125: C: Style/NestedTernaryOperator: Ternary operators must not be nested. Prefer [33mif[0m/[33melse[0m constructs instead. | |
| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = Regexp.last_match[1]; link(ins *marker(Regexp.last_match[2], term)) { visit url =~ /^http/ ? url : "/manual/#{find_pnum url}" }) : | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:179:10: C: Style/NestedTernaryOperator: Ternary operators must not be nested. Prefer [33mif[0m/[33melse[0m constructs instead. | |
| (txt.is_a?(String) ? marker(txt, term) : txt) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:195:3: C: Metrics/AbcSize: Assignment Branch Condition size for color_page is too high. [19/15] | |
| def color_page | |
| ^^^ | |
| lib/shoes/ui/help.rb:195:3: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def color_page | |
| ^^^ | |
| lib/shoes/ui/help.rb:214:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| image File.join(DIR, "snapshots/#{file[0..-3]}png"), width: 50, height: 50 do | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:215:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| Dir.chdir(File.join DIR, 'samples') { instance_eval(IO.read(file), file, 0) } | |
| ^^^^^^^ | |
| lib/shoes/ui/help.rb:227:20: C: Style/FormatString: Favor [33mformat[0m over [33mString#%[0m. | |
| "%02d%s%s" % [first.to_i, ('-' if second), second] | |
| ^ | |
| lib/shoes/ui/help.rb:230:18: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| end.sort.map &:last | |
| ^ | |
| lib/shoes/ui/help.rb:236:14: W: Lint/UselessAssignment: Useless assignment to variable - [33msection[0m. Use [33m_[0m or [33m_section[0m as a variable name to indicate that it won't be used. | |
| title, section = e | |
| ^^^^^^^ | |
| lib/shoes/ui/help.rb:241:3: C: Metrics/AbcSize: Assignment Branch Condition size for load_docs is too high. [22.47/15] | |
| def self.load_docs(path) | |
| ^^^ | |
| lib/shoes/ui/help.rb:241:3: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
| def self.load_docs(path) | |
| ^^^ | |
| lib/shoes/ui/help.rb:248:9: W: Lint/UselessAssignment: Useless assignment to variable - [33mmeth_plain[0m. | |
| meth_plain = meth[0].gsub(IMAGE_RE, '') | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:249:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| h = { title: k2, section: k, description: meth[0], methods: (meth[1..-1] / 2) } | |
| ^^^^^^^ | |
| lib/shoes/ui/help.rb:252:81: C: Metrics/LineLength: Line is too long. [99/80] | |
| h = { description: sparts[0], sections: sections, class: "toc" + k.downcase.gsub(/\W+/, '') } | |
| ^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:268:3: C: Metrics/AbcSize: Assignment Branch Condition size for html_manual is too high. [30.82/15] | |
| def html_manual | |
| ^^^ | |
| lib/shoes/ui/help.rb:268:3: C: Metrics/MethodLength: Method has too many lines. [15/10] | |
| def html_manual | |
| ^^^ | |
| lib/shoes/ui/help.rb:273:81: C: Metrics/LineLength: Line is too long. [100/80] | |
| %w(shoes-icon.png shoes-manual-apps.png manual.css code_highlighter.js code_highlighter_ruby.js) | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:275:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| Dir[File.join DIR, 'static/man-*.png'].each { |x| FileUtils.cp x, "#{dir}/static" } | |
| ^^^^^^^ | |
| lib/shoes/ui/help.rb:276:81: C: Metrics/LineLength: Line is too long. [95/80] | |
| Dir[File.join DIR, 'snapshots/sample*.png'].each { |x| FileUtils.cp x, "#{dir}/snapshots" } | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:281:81: C: Metrics/LineLength: Line is too long. [110/80] | |
| html = mk_html(title, desc, methods, TOC_LIST[n + 1], get_title_and_desc(n + 1), mk_sidebar_list(num)) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:287:3: C: Metrics/AbcSize: Assignment Branch Condition size for mk_html is too high. [108.4/15] | |
| def mk_html(title, desc, methods, next_file, next_title, menu) | |
| ^^^ | |
| lib/shoes/ui/help.rb:287:3: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for mk_html is too high. [15/6] | |
| def mk_html(title, desc, methods, next_file, next_title, menu) | |
| ^^^ | |
| lib/shoes/ui/help.rb:287:3: C: Metrics/MethodLength: Method has too many lines. [92/10] | |
| def mk_html(title, desc, methods, next_file, next_title, menu) | |
| ^^^ | |
| lib/shoes/ui/help.rb:287:3: C: Metrics/PerceivedComplexity: Perceived complexity for mk_html is too high. [12/7] | |
| def mk_html(title, desc, methods, next_file, next_title, menu) | |
| ^^^ | |
| lib/shoes/ui/help.rb:287:14: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def mk_html(title, desc, methods, next_file, next_title, menu) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:295:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| h.script type: "text/javascript", src: "static/code_highlighter_ruby.js" | |
| ^^ | |
| lib/shoes/ui/help.rb:312:81: C: Metrics/LineLength: Line is too long. [101/80] | |
| h.pre { h.code(class: 'rb') { h.text Regexp.last_match[1].gsub(/^\s*?\n/, '') } } | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:315:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A==== (.+) ====/ then [:h4, Regexp.last_match[1]] | |
| ^^^^ | |
| lib/shoes/ui/help.rb:316:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A=== (.+) ===/ then [:h3, Regexp.last_match[1]] | |
| ^^^^ | |
| lib/shoes/ui/help.rb:317:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A== (.+) ==/ then [:h2, Regexp.last_match[1]] | |
| ^^^^ | |
| lib/shoes/ui/help.rb:318:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A= (.+) =/ then [:h1, Regexp.last_match[1]] | |
| ^^^^ | |
| lib/shoes/ui/help.rb:319:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A\{COLORS\}/ | |
| ^^^^ | |
| lib/shoes/ui/help.rb:322:77: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| h.div(class: 'color', style: "background: #{color}; color: #{f}") { h.h3 color.to_s; h.p("rgb(%d, %d, %d)" % [v.red, v.green, v.blue]) } | |
| ^ | |
| lib/shoes/ui/help.rb:322:81: C: Metrics/LineLength: Line is too long. [162/80] | |
| h.div(class: 'color', style: "background: #{color}; color: #{f}") { h.h3 color.to_s; h.p("rgb(%d, %d, %d)" % [v.red, v.green, v.blue]) } | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:322:134: C: Style/FormatString: Favor [33mformat[0m over [33mString#%[0m. | |
| h.div(class: 'color', style: "background: #{color}; color: #{f}") { h.h3 color.to_s; h.p("rgb(%d, %d, %d)" % [v.red, v.green, v.blue]) } | |
| ^ | |
| lib/shoes/ui/help.rb:324:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A\{SAMPLES\}/ | |
| ^^^^ | |
| lib/shoes/ui/help.rb:329:81: C: Metrics/LineLength: Line is too long. [154/80] | |
| h.text '<a href="snapshots/%s.png"><img src="snapshots/%s.png" alt="%s" border=0 width=50 height=50></a>' % [name, name, name] | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:329:135: C: Style/FormatString: Favor [33mformat[0m over [33mString#%[0m. | |
| h.text '<a href="snapshots/%s.png"><img src="snapshots/%s.png" alt="%s" border=0 width=50 height=50></a>' % [name, name, name] | |
| ^ | |
| lib/shoes/ui/help.rb:332:23: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when /\A \* (.+)/m | |
| ^^^^ | |
| lib/shoes/ui/help.rb:333:81: C: Metrics/LineLength: Line is too long. [107/80] | |
| h.ul { Regexp.last_match[1].split(/^ \* /).each { |x| h << man.manual_p(x) } }; nil | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:333:103: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| h.ul { Regexp.last_match[1].split(/^ \* /).each { |x| h << man.manual_p(x) } }; nil | |
| ^ | |
| lib/shoes/ui/help.rb:346:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| n ? (sig, val = m[0...n - 1], m[n - 1..-1]) : (sig, val = m, nil) | |
| ^ | |
| lib/shoes/ui/help.rb:359:51: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| h.p(class: 'next') { h.text "Next: "; h.a(href: "#{next_file[0]}.html") { h.text next_title[1] } } if next_title | |
| ^ | |
| lib/shoes/ui/help.rb:359:81: C: Metrics/LineLength: Line is too long. [126/80] | |
| h.p(class: 'next') { h.text "Next: "; h.a(href: "#{next_file[0]}.html") { h.text next_title[1] } } if next_title | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:367:21: C: Style/UnlessElse: Do not use [33munless[0m with [33melse[0m. Rewrite these with the positive case first. | |
| unless m.is_a?(Array) | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:392:55: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| toc.push(TOC_LIST[r.first + 1..r.last].to_a.map &:first) if r.include?(num) | |
| ^ | |
| lib/shoes/ui/help.rb:392:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| toc.push(TOC_LIST[r.first + 1..r.last].to_a.map &:first) if r.include?(num) | |
| ^ | |
| lib/shoes/ui/help.rb:397:3: C: Metrics/AbcSize: Assignment Branch Condition size for manual_p is too high. [30.17/15] | |
| def manual_p(str) | |
| ^^^ | |
| lib/shoes/ui/help.rb:397:3: C: Metrics/MethodLength: Method has too many lines. [19/10] | |
| def manual_p(str) | |
| ^^^ | |
| lib/shoes/ui/help.rb:399:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| .gsub(/&/, '&').gsub(/>/, '>').gsub(/>/, '<').gsub(/"/, '"') | |
| ^ | |
| lib/shoes/ui/help.rb:402:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| .gsub(/'''(.+?)'''/m, '<strong>\1</strong>').gsub(/''(.+?)''/m, '<em>\1</em>') | |
| ^^^^ | |
| lib/shoes/ui/help.rb:403:13: C: Style/RegexpLiteral: Use %r for regular expressions matching more than 1 '/' character. | |
| .gsub(/\[\[((http|https):\/\/\S+?)\]\]/m, '<a href="\1" target="_new">\1</a>') | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:403:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| .gsub(/\[\[((http|https):\/\/\S+?)\]\]/m, '<a href="\1" target="_new">\1</a>') | |
| ^^^^ | |
| lib/shoes/ui/help.rb:404:13: C: Style/RegexpLiteral: Use %r for regular expressions matching more than 1 '/' character. | |
| .gsub(/\[\[((http|https):\/\/\S+?) (.+?)\]\]/m, '<a href="\1" target="_new">\3</a>') | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:404:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| .gsub(/\[\[((http|https):\/\/\S+?) (.+?)\]\]/m, '<a href="\1" target="_new">\3</a>') | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:412:7: C: Style/MultilineBlockChain: Avoid multi-line chains of blocks. | |
| end | |
| ^^^ | |
| lib/shoes/ui/help.rb:419:3: C: Metrics/AbcSize: Assignment Branch Condition size for mk_search_page is too high. [21.42/15] | |
| def mk_search_page | |
| ^^^ | |
| lib/shoes/ui/help.rb:419:3: C: Metrics/MethodLength: Method has too many lines. [19/10] | |
| def mk_search_page | |
| ^^^ | |
| lib/shoes/ui/help.rb:424:7: W: Lint/UselessAssignment: Useless assignment to variable - [33mpnum[0m. Use [33m_[0m or [33m_pnum[0m as a variable name to indicate that it won't be used. | |
| pnum, docs_title, docs_description, docs_methods = get_title_and_desc(25) | |
| ^^^^ | |
| lib/shoes/ui/help.rb:424:13: W: Lint/UselessAssignment: Useless assignment to variable - [33mdocs_title[0m. Use [33m_[0m or [33m_docs_title[0m as a variable name to indicate that it won't be used. | |
| pnum, docs_title, docs_description, docs_methods = get_title_and_desc(25) | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:424:43: W: Lint/UselessAssignment: Useless assignment to variable - [33mdocs_methods[0m. Use [33m_[0m or [33m_docs_methods[0m as a variable name to indicate that it won't be used. | |
| pnum, docs_title, docs_description, docs_methods = get_title_and_desc(25) | |
| ^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:425:7: W: Lint/UselessAssignment: Useless assignment to variable - [33mparas[0m. | |
| paras = mk_paras docs_description | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:442:3: C: Metrics/AbcSize: Assignment Branch Condition size for search is too high. [19.44/15] | |
| def search(term) | |
| ^^^ | |
| lib/shoes/ui/help.rb:442:3: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def search(term) | |
| ^^^ | |
| lib/shoes/ui/help.rb:445:7: W: Lint/UselessAssignment: Useless assignment to variable - [33mpnum[0m. Use [33m_[0m or [33m_pnum[0m as a variable name to indicate that it won't be used. | |
| pnum, docs_title, docs_description, docs_methods = get_title_and_desc(pnum) | |
| ^^^^ | |
| lib/shoes/ui/help.rb:445:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| pnum, docs_title, docs_description, docs_methods = get_title_and_desc(pnum) | |
| ^ | |
| lib/shoes/ui/help.rb:447:81: C: Metrics/LineLength: Line is too long. [138/80] | |
| descs << [chapter, section, docs_title, paras] if paras.map { |txt| txt.gsub(CODE_RE, '').gsub(IMAGE_RE, '') }.join(' ').index(term) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:450:81: C: Metrics/LineLength: Line is too long. [133/80] | |
| methods << [chapter, section, docs_title, docs_method] if m.index(term) || d.gsub(CODE_RE, '').gsub(IMAGE_RE, '').index(term) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:456:3: C: Metrics/AbcSize: Assignment Branch Condition size for show_search_result is too high. [47.11/15] | |
| def show_search_result(term, descs, methods) | |
| ^^^ | |
| lib/shoes/ui/help.rb:456:3: C: Metrics/MethodLength: Method has too many lines. [28/10] | |
| def show_search_result(term, descs, methods) | |
| ^^^ | |
| lib/shoes/ui/help.rb:464:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| para "#{DOCS[chapter][0]}: #{docs_title.sub('The', '').split(' ').first}: ", | |
| ^^^^^^ | |
| lib/shoes/ui/help.rb:465:66: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| link(docs_method[0]) { @f.clear { title docs_title; s.show_methods [docs_method], term } }, NL | |
| ^ | |
| lib/shoes/ui/help.rb:465:81: C: Metrics/LineLength: Line is too long. [109/80] | |
| link(docs_method[0]) { @f.clear { title docs_title; s.show_methods [docs_method], term } }, NL | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:473:78: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| tagline link(fg(docs_title, white)) { @f.clear { title docs_title; s.show_page paras, true, term } }, width: 320 | |
| ^ | |
| lib/shoes/ui/help.rb:473:81: C: Metrics/LineLength: Line is too long. [124/80] | |
| tagline link(fg(docs_title, white)) { @f.clear { title docs_title; s.show_page paras, true, term } }, width: 320 | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:474:81: C: Metrics/LineLength: Line is too long. [94/80] | |
| inscription "Sub-Section under #{DOCS[chapter][0]}", stroke: lightgray, width: 180 | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:477:79: C: Style/Semicolon: Do not use semicolons to terminate expressions. | |
| subtitle link(fg(docs_title, white)) { @f.clear { title docs_title; s.show_page paras, true, term } }, width: 320 | |
| ^ | |
| lib/shoes/ui/help.rb:477:81: C: Metrics/LineLength: Line is too long. [125/80] | |
| subtitle link(fg(docs_title, white)) { @f.clear { title docs_title; s.show_page paras, true, term } }, width: 320 | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:502:3: C: Metrics/MethodLength: Method has too many lines. [12/10] | |
| def decoration(datas, re, &blk) | |
| ^^^ | |
| lib/shoes/ui/help.rb:508:81: C: Metrics/LineLength: Line is too long. [94/80] | |
| txts = [data[0...n], blk[md[1]], decoration([data[n + md[0].length..-1]], re, &blk)] | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/ui/help.rb:528:10: C: Style/GlobalVars: Do not introduce global variables. | |
| LANG = $lang.downcase[0, 2] | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:529:20: C: Style/GlobalVars: Do not introduce global variables. | |
| DOCS = load_docs($lang =~ /\.txt$/ ? $lang : File.join(DIR, "static/manual-#{LANG}.txt")) | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:529:40: C: Style/GlobalVars: Do not introduce global variables. | |
| DOCS = load_docs($lang =~ /\.txt$/ ? $lang : File.join(DIR, "static/manual-#{LANG}.txt")) | |
| ^^^^^ | |
| lib/shoes/ui/help.rb:529:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| DOCS = load_docs($lang =~ /\.txt$/ ? $lang : File.join(DIR, "static/manual-#{LANG}.txt")) | |
| ^^^^^^^^^^^ | |
| lib/shoes/ui/picker.rb:15:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if File.exist?("Gemfile") | |
| ^^ | |
| lib/shoes/ui/picker.rb:27:81: C: Metrics/LineLength: Line is too long. [94/80] | |
| fail NotImplementedError("Currently can't interactively select a backend. See #929") | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/ui/picker.rb:39:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| File.open(File.expand_path(File.join(bin_dir, "shoes-backend")), "w") do |file| | |
| ^^^^^^^ | |
| lib/shoes/ui/cli.rb:5:3: C: Style/Documentation: Missing top-level class documentation comment. | |
| class CLI | |
| ^^^^^ | |
| lib/shoes/ui/cli.rb:10:5: C: Metrics/AbcSize: Assignment Branch Condition size for parse! is too high. [23.04/15] | |
| def parse!(args) | |
| ^^^ | |
| lib/shoes/ui/cli.rb:10:5: C: Metrics/MethodLength: Method has too many lines. [24/10] | |
| def parse!(args) | |
| ^^^ | |
| lib/shoes/ui/cli.rb:11:35: W: Lint/ShadowingOuterLocalVariable: Shadowing outer local variable - [33mopts[0m. | |
| opts = OptionParser.new do |opts| | |
| ^^^^ | |
| lib/shoes/ui/cli.rb:19:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| opts.on('-p', '--package PACKAGE_TYPE', 'Package as BACKEND:PACKAGE') do |package| | |
| ^^^^^^^^^^ | |
| lib/shoes/ui/cli.rb:21:81: C: Metrics/LineLength: Line is too long. [107/80] | |
| abort("#{opts.program_name}: Can't package as '#{package}'. See '#{opts.program_name} --help'") | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/ui/cli.rb:59:5: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def package(path) | |
| ^^^ | |
| lib/shoes/common/style_normalizer.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class StyleNormalizer | |
| ^^^^^ | |
| lib/shoes/common/style_normalizer.rb:8:11: C: Style/IfUnlessModifier: Favor modifier [33mif[0m usage when having a single-line body. Another good alternative is the usage of control flow [33m&&[0m/[33m||[0m. | |
| if orig_style[s] | |
| ^^ | |
| lib/shoes/common/remove.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Remove | |
| ^^^^^^ | |
| lib/shoes/common/visibility.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Visibility | |
| ^^^^^^ | |
| lib/shoes/common/visibility.rb:10:7: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def hidden? | |
| ^^^ | |
| lib/shoes/common/clickable.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Clickable | |
| ^^^^^^ | |
| lib/shoes/common/clickable.rb:19:7: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def pass_coordinates? | |
| ^^^ | |
| lib/shoes/common/inspect.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Inspect | |
| ^^^^^^ | |
| lib/shoes/common/inspect.rb:10:41: C: Style/FormatString: Favor [33mformat[0m over [33mString#%[0m. | |
| "(#{self.class.name}:#{'0x%08x' % (object_id * 2)})" | |
| ^ | |
| lib/shoes/common/positioning.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Positioning | |
| ^^^^^^ | |
| lib/shoes/common/positioning.rb:4:81: C: Metrics/LineLength: Line is too long. [88/80] | |
| # Moves an element to a specific pixel position. The element is still in the slot, | |
| ^^^^^^^^ | |
| lib/shoes/common/positioning.rb:5:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # but will no longer be stacked or flowed with the other stuff in the slot. | |
| ^ | |
| lib/shoes/common/positioning.rb:20:7: C: Style/AsciiComments: Use only ascii symbols in comments. | |
| # displace(left: a number, top: a number) » self | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/common/positioning.rb:21:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| # Displacing an element moves it. But without changing the layout around it. | |
| ^^^ | |
| lib/shoes/common/registration.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Registration | |
| ^^^^^^ | |
| lib/shoes/common/background_element.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module BackgroundElement | |
| ^^^^^^ | |
| lib/shoes/common/ui_element.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module UIElement | |
| ^^^^^^ | |
| lib/shoes/common/style.rb:13:81: C: Metrics/LineLength: Line is too long. [108/80] | |
| art_styles: [:cap, :click, :fill, :rotate, :stroke, :strokewidth, :transform, :translate], | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/common/style.rb:19:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| :justify, :kerning, :leading, :rise, :size, :stretch, | |
| ^^^^ | |
| lib/shoes/common/style.rb:20:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| :strikecolor, :strikethrough, :stroke, :undercolor, | |
| ^^ | |
| lib/shoes/common/style.rb:31:7: C: Metrics/AbcSize: Assignment Branch Condition size for style_init is too high. [16.4/15] | |
| def style_init(arg_styles, new_styles = {}) | |
| ^^^ | |
| lib/shoes/common/style.rb:33:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| default_element_styles = self.class::STYLES if defined? self.class::STYLES | |
| ^^ | |
| lib/shoes/common/style.rb:38:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| @style.merge!(@app.element_styles[self.class]) if @app.element_styles[self.class] | |
| ^^^^^^^^^ | |
| lib/shoes/common/style.rb:57:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module StyleWith | |
| ^^^^^^ | |
| lib/shoes/common/style.rb:66:9: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def unpack_style_groups(styles) | |
| ^^^ | |
| lib/shoes/common/style.rb:69:43: W: Lint/ShadowingOuterLocalVariable: Shadowing outer local variable - [33mstyle[0m. | |
| STYLE_GROUPS[style].each { |style| @supported_styles << style } | |
| ^^^^^ | |
| lib/shoes/common/style.rb:121:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_dimensions(new_styles) | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/common/state.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module State | |
| ^^^^^^ | |
| lib/shoes/swt/generate-backend.rb:1:1: C: Style/FileName: Use snake_case for source file names. | |
| require 'rbconfig' | |
| ^ | |
| lib/shoes/swt/generate-backend.rb:4:3: C: Style/IfUnlessModifier: Favor modifier [33mif[0m usage when having a single-line body. Another good alternative is the usage of control flow [33m&&[0m/[33m||[0m. | |
| if RbConfig::CONFIG["host_os"] =~ /darwin/ | |
| ^^ | |
| lib/shoes/swt/swt_button.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class SwtButton | |
| ^^^^^ | |
| lib/shoes/swt/link.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Link | |
| ^^^^^ | |
| lib/shoes/swt/star.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Star | |
| ^^^^^ | |
| lib/shoes/swt/star.rb:26:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < Common::Painter | |
| ^^^^^ | |
| lib/shoes/swt/star.rb:35:9: C: Metrics/AbcSize: Assignment Branch Condition size for make_polygon is too high. [23.79/15] | |
| def make_polygon(obj) | |
| ^^^ | |
| lib/shoes/swt/star.rb:42:18: C: Style/EvenOdd: Replace with [33mFixnum#even?[0m. | |
| r = (i % 2 == 0) ? outer : inner | |
| ^^^^^^^^^^ | |
| lib/shoes/swt/star.rb:43:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| polygon << (left + r * ::Math.sin(angle)) << (top + r * ::Math.cos(angle)) | |
| ^^^^^^ | |
| lib/shoes/swt/disposed_protection.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module DisposedProtection | |
| ^^^^^^ | |
| lib/shoes/swt/disposed_protection.rb:9:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class NullObject < BasicObject | |
| ^^^^^ | |
| lib/shoes/swt/shoes_layout.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ShoesLayout < ::Swt::Widgets::Layout | |
| ^^^^^ | |
| lib/shoes/swt/shoes_layout.rb:6:7: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def layout(*_dontcare) | |
| ^^^ | |
| lib/shoes/swt/shoes_layout.rb:32:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| vertical_bar.setMaximum scrollable_height - height + vertical_bar.getThumb | |
| ^^ | |
| lib/shoes/swt/list_box.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ListBox | |
| ^^^^^ | |
| lib/shoes/swt/list_box.rb:15:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| # @param parent [::Swt::Widgets::Composite] The parent element of this button | |
| ^^^ | |
| lib/shoes/swt/list_box.rb:16:7: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def initialize(dsl, parent) | |
| ^^^ | |
| lib/shoes/swt/progress.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Progress | |
| ^^^^^ | |
| lib/shoes/swt/progress.rb:12:7: C: Metrics/AbcSize: Assignment Branch Condition size for initialize is too high. [16.4/15] | |
| def initialize(dsl, parent) | |
| ^^^ | |
| lib/shoes/swt/progress.rb:12:7: C: Metrics/MethodLength: Method has too many lines. [13/10] | |
| def initialize(dsl, parent) | |
| ^^^ | |
| lib/shoes/swt/input_box.rb:57:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class EditLine < InputBox | |
| ^^^^^ | |
| lib/shoes/swt/input_box.rb:66:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class EditBox < InputBox | |
| ^^^^^ | |
| lib/shoes/swt/input_box.rb:67:81: C: Metrics/LineLength: Line is too long. [103/80] | |
| DEFAULT_STYLES = ::Swt::SWT::MULTI | ::Swt::SWT::BORDER | ::Swt::SWT::WRAP | ::Swt::SWT::V_SCROLL | |
| ^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/download.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Download | |
| ^^^^^ | |
| lib/shoes/swt/download.rb:18:7: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def busy? | |
| ^^^ | |
| lib/shoes/swt/text_block.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class TextBlock | |
| ^^^^^ | |
| lib/shoes/swt/text_block.rb:47:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| current_position.y -= last_segment.last_line_height unless @bumped_to_next_line | |
| ^^^^^^^ | |
| lib/shoes/swt/text_block.rb:50:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_absolutes_on_dsl(current_position) | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block.rb:54:81: C: Metrics/LineLength: Line is too long. [84/80] | |
| set_absolutes(@dsl.parent.absolute_left, current_position.next_line_start) | |
| ^^^^ | |
| lib/shoes/swt/text_block.rb:82:11: W: Lint/UselessAssignment: Useless assignment to variable - [33mtotal[0m. Use just operator [33m+[0m. | |
| total += segment.bounds.height | |
| ^^^^^ | |
| lib/shoes/swt/gradient.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Gradient | |
| ^^^^^ | |
| lib/shoes/swt/gradient.rb:32:24: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def apply_as_fill(gc, left, top, width, height, angle = 0) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:37:26: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:45:9: C: Style/SelfAssignment: Use self-assignment shorthand [33m*=[0m. | |
| width = width * 0.5 | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:46:9: C: Style/SelfAssignment: Use self-assignment shorthand [33m*=[0m. | |
| height = height * 0.5 | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:48:81: C: Metrics/LineLength: Line is too long. [98/80] | |
| left, top, width, height = determine_args_based_on_angle(angle, left, top, width, height) | |
| ^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:50:81: C: Metrics/LineLength: Line is too long. [102/80] | |
| pattern = ::Swt::Pattern.new Shoes.display, left, top, width, height, color1.real, color2.real | |
| ^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:60:7: C: Metrics/AbcSize: Assignment Branch Condition size for determine_args_based_on_angle is too high. [47.21/15] | |
| def determine_args_based_on_angle(angle, left, top, width, height) | |
| ^^^ | |
| lib/shoes/swt/gradient.rb:60:7: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for determine_args_based_on_angle is too high. [9/6] | |
| def determine_args_based_on_angle(angle, left, top, width, height) | |
| ^^^ | |
| lib/shoes/swt/gradient.rb:60:7: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def determine_args_based_on_angle(angle, left, top, width, height) | |
| ^^^ | |
| lib/shoes/swt/gradient.rb:60:7: C: Metrics/PerceivedComplexity: Perceived complexity for determine_args_based_on_angle is too high. [10/7] | |
| def determine_args_based_on_angle(angle, left, top, width, height) | |
| ^^^ | |
| lib/shoes/swt/gradient.rb:63:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| args = [left + width + x, top + height - y, left + width - x, top + height + y] | |
| ^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:65:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| args = [left + width + y, top + height + x, left + width - y, top + height - x] | |
| ^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:67:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| args = [left + width - x, top + height + y, left + width + x, top + height - y] | |
| ^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:69:81: C: Metrics/LineLength: Line is too long. [89/80] | |
| args = [left + width - y, top + height - x, left + width + y, top + height + x] | |
| ^^^^^^^^^ | |
| lib/shoes/swt/gradient.rb:74:7: C: Metrics/AbcSize: Assignment Branch Condition size for calculate_x_and_y is too high. [27.48/15] | |
| def calculate_x_and_y(angle, height, width) | |
| ^^^ | |
| lib/shoes/swt/gradient.rb:74:7: C: Metrics/MethodLength: Method has too many lines. [15/10] | |
| def calculate_x_and_y(angle, height, width) | |
| ^^^ | |
| lib/shoes/swt/gradient.rb:84:81: C: Metrics/LineLength: Line is too long. [88/80] | |
| b = (my_height == 0 && my_width == 0) ? 0 : Math.atan(my_height / my_width) | |
| ^^^^^^^^ | |
| lib/shoes/swt/background.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Background | |
| ^^^^^ | |
| lib/shoes/swt/background.rb:34:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < RectPainter | |
| ^^^^^ | |
| lib/shoes/swt/oval.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Oval | |
| ^^^^^ | |
| lib/shoes/swt/oval.rb:30:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < Common::Painter | |
| ^^^^^ | |
| lib/shoes/swt/oval.rb:45:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| graphics_context.draw_oval(@obj.element_left + sw / 2, @obj.element_top + sw / 2, | |
| ^^^^^^^^^^^ | |
| lib/shoes/swt/oval.rb:46:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| @obj.element_width - sw, @obj.element_height - sw) | |
| ^^^^^^^ | |
| lib/shoes/swt/shape.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shape | |
| ^^^^^ | |
| lib/shoes/swt/shape.rb:40:19: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def curve_to(cx1, cy1, cx2, cy2, x, y) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/shape.rb:44:14: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def arc(x, y, width, height, start_angle, arc_angle) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/shape.rb:122:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < Common::Painter | |
| ^^^^^ | |
| lib/shoes/swt/line.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Line | |
| ^^^^^ | |
| lib/shoes/swt/line.rb:40:7: C: Metrics/AbcSize: Assignment Branch Condition size for translate_according_to_enclosing_box is too high. [27.29/15] | |
| def translate_according_to_enclosing_box | |
| ^^^ | |
| lib/shoes/swt/line.rb:46:81: C: Metrics/LineLength: Line is too long. [161/80] | |
| @transform.set_elements @transform_elements[0], @transform_elements[1], @transform_elements[2], @transform_elements[3], dsl.element_left, dsl.element_top | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/line.rb:49:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < Common::Painter | |
| ^^^^^ | |
| lib/shoes/swt/key_listener.rb:3:5: C: Metrics/ClassLength: Class definition is too long. [102/100] | |
| class KeyListener | |
| ^^^^^ | |
| lib/shoes/swt/key_listener.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class KeyListener | |
| ^^^^^ | |
| lib/shoes/swt/key_listener.rb:56:7: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def ignore_event?(event) | |
| ^^^ | |
| lib/shoes/swt/key_listener.rb:90:11: C: Style/PredicateName: Rename [33mis_this_modifier_key?[0m to [33mthis_modifier_key?[0m. | |
| def is_this_modifier_key?(event, key) | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/image.rb:3:5: C: Metrics/ClassLength: Class definition is too long. [101/100] | |
| class Image | |
| ^^^^^ | |
| lib/shoes/swt/image.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Image | |
| ^^^^^ | |
| lib/shoes/swt/image.rb:44:25: C: Style/RegexpLiteral: Use %r for regular expressions matching more than 1 '/' character. | |
| name_or_data =~ /^(http|https):\/\// | |
| ^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/image.rb:84:81: C: Metrics/LineLength: Line is too long. [97/80] | |
| @tmpname = File.join(Dir.tmpdir, "__shoes4_#{Time.now.to_f}.png") unless @tmpname_or_data | |
| ^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/image.rb:122:81: C: Metrics/LineLength: Line is too long. [168/80] | |
| graphics_context.drawImage @real, 0, 0, @full_width, @full_height, dsl.element_left, dsl.element_top, dsl.element_width, dsl.element_height unless @dsl.hidden | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/check.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Check < CheckButton | |
| ^^^^^ | |
| lib/shoes/swt/check.rb:7:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| # @param [::Swt::Widgets::Composite] parent The parent element of this button | |
| ^^^ | |
| lib/shoes/swt/check.rb:8:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @param [Proc] blk The block of code to call when this button is activated | |
| ^ | |
| lib/shoes/swt/button.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Button < SwtButton | |
| ^^^^^ | |
| lib/shoes/swt/button.rb:9:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| # @param [::Swt::Widgets::Composite] parent The parent element of this button | |
| ^^^ | |
| lib/shoes/swt/button.rb:10:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @param [Proc] blk The block of code to call when this button is activated | |
| ^ | |
| lib/shoes/swt/app.rb:2:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Swt | |
| ^^^^^^ | |
| lib/shoes/swt/app.rb:18:5: C: Metrics/ClassLength: Class definition is too long. [210/100] | |
| class App | |
| ^^^^^ | |
| lib/shoes/swt/app.rb:24:7: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def initialize(dsl) | |
| ^^^ | |
| lib/shoes/swt/app.rb:77:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| unless @real.disposed? | |
| ^^^^^^ | |
| lib/shoes/swt/app.rb:91:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if @dsl.top_slot | |
| ^^ | |
| lib/shoes/swt/app.rb:91:9: C: Style/IfUnlessModifier: Favor modifier [33mif[0m usage when having a single-line body. Another good alternative is the usage of control flow [33m&&[0m/[33m||[0m. | |
| if @dsl.top_slot | |
| ^^ | |
| lib/shoes/swt/app.rb:106:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| ::Swt::Clipboard.new(Shoes.display).getContents ::Swt::TextTransfer.getInstance | |
| ^^^^^^^ | |
| lib/shoes/swt/app.rb:128:7: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def started? | |
| ^^^ | |
| lib/shoes/swt/app.rb:161:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| selection_listener = SelectionListener.new(scroll_bar) do |vertical_bar, event| | |
| ^^^^^^^ | |
| lib/shoes/swt/app.rb:175:7: C: Metrics/AbcSize: Assignment Branch Condition size for force_shell_size is too high. [15.52/15] | |
| def force_shell_size | |
| ^^^ | |
| lib/shoes/swt/app.rb:186:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| Dir[File.join(Dir.tmpdir, "__shoes4_*.png")].each { |f| File.delete f } | |
| ^ | |
| lib/shoes/swt/app.rb:209:81: C: Metrics/LineLength: Line is too long. [99/80] | |
| ::Swt::SWT::TRANSPARENT | ::Swt::SWT::NO_RADIO_GROUP) | |
| ^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/app.rb:282:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ShellControlListener | |
| ^^^^^ | |
| lib/shoes/swt/app.rb:287:7: C: Metrics/AbcSize: Assignment Branch Condition size for controlResized is too high. [18.25/15] | |
| def controlResized(event) | |
| ^^^ | |
| lib/shoes/swt/app.rb:302:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class MouseListener | |
| ^^^^^ | |
| lib/shoes/swt/version.rb:2:3: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Swt | |
| ^^^^^^ | |
| lib/shoes/swt/check_button.rb:1:1: C: Style/EndOfLine: Carriage return character detected. | |
| class Shoes | |
| ^^^^^^^^^^^ | |
| lib/shoes/swt/check_button.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class CheckButton < SwtButton | |
| ^^^^^ | |
| lib/shoes/swt/image_pattern.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ImagePattern | |
| ^^^^^ | |
| lib/shoes/swt/image_pattern.rb:22:24: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def apply_as_fill(gc, _left, _top, _width, _height, _angle = 0) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/image_pattern.rb:26:26: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def apply_as_stroke(gc, _left, _top, _width, _height, _angle = 0) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/animation.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Animation | |
| ^^^^^ | |
| lib/shoes/swt/radio_group.rb:27:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| selection_listener = SelectionListener.new radio_button do |selected_radio, _event| | |
| ^^^^^^^^^^^ | |
| lib/shoes/swt/mouse_move_listener.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class MouseMoveListener | |
| ^^^^^ | |
| lib/shoes/swt/mouse_move_listener.rb:50:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| element_visible?(element) && element.in_bounds?(mouse_event.x, mouse_event.y) | |
| ^^^^^ | |
| lib/shoes/swt/timer.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Timer | |
| ^^^^^ | |
| lib/shoes/swt/timer.rb:7:11: C: Style/IfUnlessModifier: Favor modifier [33munless[0m usage when having a single-line body. Another good alternative is the usage of control flow [33m&&[0m/[33m||[0m. | |
| unless app.real.disposed? | |
| ^^^^^^ | |
| lib/shoes/swt/rect_painter.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class RectPainter < Common::Painter | |
| ^^^^^ | |
| lib/shoes/swt/rect_painter.rb:13:7: C: Metrics/AbcSize: Assignment Branch Condition size for draw is too high. [16.03/15] | |
| def draw(gc) | |
| ^^^ | |
| lib/shoes/swt/font.rb:1:1: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shoes | |
| ^^^^^ | |
| lib/shoes/swt/font.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Font | |
| ^^^^^^ | |
| lib/shoes/swt/font.rb:6:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if File.exist? path | |
| ^^ | |
| lib/shoes/swt/font.rb:23:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| ::Shoes::Font.font_paths_from_dir(::Shoes::FONT_DIR).each do |font_path| | |
| ^^ | |
| lib/shoes/swt/radio.rb:12:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| # @param [::Swt::Widgets::Composite] parent The parent element of this button | |
| ^^^ | |
| lib/shoes/swt/radio.rb:13:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @param [Proc] blk The block of code to call when this button is activated | |
| ^ | |
| lib/shoes/swt/border.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Border | |
| ^^^^^ | |
| lib/shoes/swt/border.rb:28:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < RectPainter | |
| ^^^^^ | |
| lib/shoes/swt/redrawing_aspect.rb:11:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class RedrawingAspect | |
| ^^^^^ | |
| lib/shoes/swt/redrawing_aspect.rb:73:7: C: Metrics/AbcSize: Assignment Branch Condition size for add_redraws is too high. [16.06/15] | |
| def add_redraws | |
| ^^^ | |
| lib/shoes/swt/redrawing_aspect.rb:73:7: C: Metrics/MethodLength: Method has too many lines. [14/10] | |
| def add_redraws | |
| ^^^ | |
| lib/shoes/swt/redrawing_aspect.rb:74:36: C: Style/Blocks: Prefer {...} over do...end for single-line blocks. | |
| after_every NEED_TO_UPDATE do update_gui end | |
| ^^ | |
| lib/shoes/swt/redrawing_aspect.rb:102:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| unless app.disposed? | |
| ^^^^^^ | |
| lib/shoes/swt/slot.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Slot | |
| ^^^^^ | |
| lib/shoes/swt/slot.rb:29:29: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| dsl.contents.each &:hide | |
| ^ | |
| lib/shoes/swt/slot.rb:31:29: W: Lint/AmbiguousOperator: Ambiguous block operator. Parenthesize the method arguments if it's surely a block operator, or add a whitespace to the right of the [33m&[0m if it should be a binary AND. | |
| dsl.contents.each &:show | |
| ^ | |
| lib/shoes/swt/color.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Color | |
| ^^^^^ | |
| lib/shoes/swt/color.rb:13:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| @real = ::Swt::Graphics::Color.new(Shoes.display, @dsl.red, @dsl.green, @dsl.blue) | |
| ^^^^^^^^^^ | |
| lib/shoes/swt/color.rb:27:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @param [Swt::Graphics::GC] gc the graphics context on which to apply fill | |
| ^ | |
| lib/shoes/swt/color.rb:28:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| # @note left, top, width, height, and angle are not used in this method, and only | |
| ^^^^^^^ | |
| lib/shoes/swt/color.rb:30:24: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def apply_as_fill(gc, _left = nil, _top = nil, _width = nil, _height = nil, _angle = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/color.rb:30:81: C: Metrics/LineLength: Line is too long. [95/80] | |
| def apply_as_fill(gc, _left = nil, _top = nil, _width = nil, _height = nil, _angle = nil) | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/color.rb:35:81: C: Metrics/LineLength: Line is too long. [83/80] | |
| # @param [Swt::Graphics::GC] gc the graphics context on which to apply stroke | |
| ^^^ | |
| lib/shoes/swt/color.rb:36:26: C: Metrics/ParameterLists: Avoid parameter lists longer than 5 parameters. | |
| def apply_as_stroke(gc, _left = nil, _top = nil, _width = nil, _height = nil, _angle = nil) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/color.rb:36:81: C: Metrics/LineLength: Line is too long. [97/80] | |
| def apply_as_stroke(gc, _left = nil, _top = nil, _width = nil, _height = nil, _angle = nil) | |
| ^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/color.rb:42:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class NullColor | |
| ^^^^^ | |
| lib/shoes/swt/link_segment.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class LinkSegment | |
| ^^^^^ | |
| lib/shoes/swt/link_segment.rb:49:7: C: Metrics/AbcSize: Assignment Branch Condition size for add_regions_for_first_and_last_lines is too high. [20/15] | |
| def add_regions_for_first_and_last_lines(first_line, last_line) | |
| ^^^ | |
| lib/shoes/swt/link_segment.rb:89:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Region | |
| ^^^^^ | |
| lib/shoes/swt/rect.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Rect | |
| ^^^^^ | |
| lib/shoes/swt/sound.rb:14:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Sound | |
| ^^^^^ | |
| lib/shoes/swt/sound.rb:20:7: C: Style/ConstantName: Use SCREAMING_SNAKE_CASE for constants. | |
| BufferSize = 4096 | |
| ^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:32:7: C: Metrics/AbcSize: Assignment Branch Condition size for play is too high. [22.38/15] | |
| def play | |
| ^^^ | |
| lib/shoes/swt/sound.rb:32:7: C: Metrics/MethodLength: Method has too many lines. [18/10] | |
| def play | |
| ^^^ | |
| lib/shoes/swt/sound.rb:40:81: C: Metrics/LineLength: Line is too long. [116/80] | |
| decoded_audio_format, decoded_audio_input_stream = decode_input_stream(audio_format, audio_input_stream) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:54:11: W: Lint/RescueException: Avoid rescuing the [33mException[0m class. Perhaps you meant to rescue [33mStandardError[0m? | |
| rescue Exception => e | |
| ^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:60:7: C: Metrics/MethodLength: Method has too many lines. [14/10] | |
| def decode_input_stream(audio_format, audio_input_stream) | |
| ^^^ | |
| lib/shoes/swt/sound.rb:62:11: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when Java::JavazoomSpiVorbisSampledFile::VorbisEncoding, Java::JavazoomSpiMpegSampledFile::MpegEncoding | |
| ^^^^ | |
| lib/shoes/swt/sound.rb:62:81: C: Metrics/LineLength: Line is too long. [113/80] | |
| when Java::JavazoomSpiVorbisSampledFile::VorbisEncoding, Java::JavazoomSpiMpegSampledFile::MpegEncoding | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:70:81: C: Metrics/LineLength: Line is too long. [108/80] | |
| decoded_audio_input_stream = AudioSystem.getAudioInputStream(decoded_format, audio_input_stream) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:79:7: C: Metrics/AbcSize: Assignment Branch Condition size for rawplay is too high. [16.43/15] | |
| def rawplay(decoded_audio_format, decoded_audio_input_stream) | |
| ^^^ | |
| lib/shoes/swt/sound.rb:79:7: C: Metrics/MethodLength: Method has too many lines. [16/10] | |
| def rawplay(decoded_audio_format, decoded_audio_input_stream) | |
| ^^^ | |
| lib/shoes/swt/sound.rb:85:9: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| unless line.nil? | |
| ^^^^^^ | |
| lib/shoes/swt/sound.rb:89:27: W: Lint/UselessAssignment: Useless assignment to variable - [33mbytes_written[0m. | |
| bytes_read = 0, bytes_written = 0 | |
| ^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:92:81: C: Metrics/LineLength: Line is too long. [94/80] | |
| bytes_read = decoded_audio_input_stream.read(sampled_data, 0, sampled_data.length) | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:95:15: W: Lint/UselessAssignment: Useless assignment to variable - [33mbytes_written[0m. | |
| bytes_written = line.write(sampled_data, 0, bytes_read) | |
| ^^^^^^^^^^^^^ | |
| lib/shoes/swt/sound.rb:109:9: W: Lint/UselessAssignment: Useless assignment to variable - [33mres[0m. | |
| res = nil | |
| ^^^ | |
| lib/shoes/swt/dialog.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Dialog | |
| ^^^^^ | |
| lib/shoes/swt/dialog.rb:21:81: C: Metrics/LineLength: Line is too long. [118/80] | |
| fd = folder ? ::Swt::Widgets::DirectoryDialog.new(shell, style) : ::Swt::Widgets::FileDialog.new(shell, style) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/dialog.rb:31:81: C: Metrics/LineLength: Line is too long. [148/80] | |
| color ? ::Shoes::Color.new(color.red, color.green, color.blue, ::Shoes::Color::OPAQUE) : ::Shoes::Color.new(0, 0, 0, ::Shoes::Color::OPAQUE) | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/arc.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Arc | |
| ^^^^^ | |
| lib/shoes/swt/arc.rb:16:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @param [Shoes::Arc] dsl The DSL object represented by this implementation | |
| ^ | |
| lib/shoes/swt/arc.rb:43:7: W: Lint/UselessAccessModifier: Useless [33mpublic[0m access modifier. | |
| public | |
| ^^^^^^ | |
| lib/shoes/swt/arc.rb:45:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter < Common::Painter | |
| ^^^^^ | |
| lib/shoes/swt/arc.rb:46:9: C: Metrics/AbcSize: Assignment Branch Condition size for fill is too high. [20.05/15] | |
| def fill(graphics_context) | |
| ^^^ | |
| lib/shoes/swt/arc.rb:46:9: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def fill(graphics_context) | |
| ^^^ | |
| lib/shoes/swt/arc.rb:60:9: C: Metrics/AbcSize: Assignment Branch Condition size for draw is too high. [19.44/15] | |
| def draw(graphics_context) | |
| ^^^ | |
| lib/shoes/swt/arc.rb:62:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if @obj.element_left && @obj.element_top && @obj.element_width && @obj.element_height | |
| ^^ | |
| lib/shoes/swt/arc.rb:62:81: C: Metrics/LineLength: Line is too long. [95/80] | |
| if @obj.element_left && @obj.element_top && @obj.element_width && @obj.element_height | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/common/painter.rb:4:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter | |
| ^^^^^ | |
| lib/shoes/swt/common/painter.rb:28:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| puts "SWALLOWED PAINT EXCEPTION ON #{@obj} - go take care of it: " + e.to_s | |
| ^^^^^ | |
| lib/shoes/swt/common/painter.rb:29:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| puts 'Unfortunately we have to swallow it because it causes odd failures :(' | |
| ^^^^^^ | |
| lib/shoes/swt/common/painter.rb:32:9: C: Metrics/AbcSize: Assignment Branch Condition size for paint_object is too high. [26.76/15] | |
| def paint_object(graphics_context) | |
| ^^^ | |
| lib/shoes/swt/common/painter.rb:32:9: C: Metrics/CyclomaticComplexity: Cyclomatic complexity for paint_object is too high. [7/6] | |
| def paint_object(graphics_context) | |
| ^^^ | |
| lib/shoes/swt/common/painter.rb:32:9: C: Metrics/MethodLength: Method has too many lines. [16/10] | |
| def paint_object(graphics_context) | |
| ^^^ | |
| lib/shoes/swt/common/painter.rb:38:13: C: Style/CaseIndentation: Indent [33mwhen[0m as deep as [33mcase[0m. | |
| when ::Shoes::Oval, ::Shoes::Rect | |
| ^^^^ | |
| lib/shoes/swt/common/painter.rb:69:9: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def set_rotate(graphics_context, angle, left, top) | |
| ^^^ | |
| lib/shoes/swt/common/painter.rb:71:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if block_given? | |
| ^^ | |
| lib/shoes/swt/common/painter.rb:86:31: W: Lint/AmbiguousOperator: Ambiguous negative number operator. Parenthesize the method arguments if it's surely a negative number operator, or add a whitespace to the right of the [33m-[0m if it should be a subtraction. | |
| transform.translate -left, -top | |
| ^ | |
| lib/shoes/swt/common/fill.rb:10:81: C: Metrics/LineLength: Line is too long. [91/80] | |
| # @return [Swt::Graphics::Color] The Swt representation of this object's fill color | |
| ^^^^^^^^^^^ | |
| lib/shoes/swt/common/fill.rb:28:9: C: Metrics/AbcSize: Assignment Branch Condition size for apply_fill is too high. [17.38/15] | |
| def apply_fill(context) | |
| ^^^ | |
| lib/shoes/swt/common/fill.rb:29:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if fill | |
| ^^ | |
| lib/shoes/swt/common/fill.rb:30:81: C: Metrics/LineLength: Line is too long. [145/80] | |
| left, top = self.is_a?(Star) ? [element_left - element_width / 2.0, element_top - element_height / 2.0] : [element_left, element_top] | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/common/fill.rb:31:81: C: Metrics/LineLength: Line is too long. [88/80] | |
| fill.apply_as_fill(context, left, top, element_width, element_height, angle) | |
| ^^^^^^^^ | |
| lib/shoes/swt/common/painter_updates_position.rb:4:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module PainterUpdatesPosition | |
| ^^^^^^ | |
| lib/shoes/swt/common/remove.rb:4:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Remove | |
| ^^^^^^ | |
| lib/shoes/swt/common/visibility.rb:4:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Visibility | |
| ^^^^^^ | |
| lib/shoes/swt/common/visibility.rb:6:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if @real && @real.respond_to?(:set_visible) | |
| ^^ | |
| lib/shoes/swt/common/update_position.rb:4:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module UpdatePosition | |
| ^^^^^^ | |
| lib/shoes/swt/common/update_position.rb:8:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| unless @real.disposed? | |
| ^^^^^^ | |
| lib/shoes/swt/common/stroke.rb:10:81: C: Metrics/LineLength: Line is too long. [93/80] | |
| # @return [Swt::Graphics::Color] The Swt representation of this object's stroke color | |
| ^^^^^^^^^^^^^ | |
| lib/shoes/swt/common/stroke.rb:18:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| # @return [Integer] The alpha value of this object's stroke color (0-255) | |
| ^ | |
| lib/shoes/swt/common/stroke.rb:30:9: C: Metrics/AbcSize: Assignment Branch Condition size for apply_stroke is too high. [19.34/15] | |
| def apply_stroke(context) | |
| ^^^ | |
| lib/shoes/swt/common/stroke.rb:31:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if stroke | |
| ^^ | |
| lib/shoes/swt/common/stroke.rb:32:81: C: Metrics/LineLength: Line is too long. [140/80] | |
| l, t = self.is_a?(Star) ? [element_left - element_width / 2.0, element_top - element_height / 2.0] : [element_left, element_top] | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/common/stroke.rb:33:81: C: Metrics/LineLength: Line is too long. [87/80] | |
| stroke.apply_as_stroke(context, l, t, element_width, element_height, angle) | |
| ^^^^^^^ | |
| lib/shoes/swt/common/clickable.rb:4:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Clickable | |
| ^^^^^^ | |
| lib/shoes/swt/common/clickable.rb:41:9: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ClickListener | |
| ^^^^^ | |
| lib/shoes/swt/common/clickable.rb:50:81: C: Metrics/LineLength: Line is too long. [90/80] | |
| return if @clickable_object.respond_to?(:hidden?) && @clickable_object.hidden? | |
| ^^^^^^^^^^ | |
| lib/shoes/swt/common/clickable.rb:51:13: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| if @clickable_object.in_bounds?(mouse_event.x, mouse_event.y) | |
| ^^ | |
| lib/shoes/swt/common/resource.rb:4:7: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Resource | |
| ^^^^^^ | |
| lib/shoes/swt/common/resource.rb:17:13: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_defaults_on_context(graphics_context) | |
| ^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/common/selection_listener.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class SelectionListener | |
| ^^^^^ | |
| lib/shoes/swt/text_block/painter.rb:4:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Painter | |
| ^^^^^ | |
| lib/shoes/swt/text_block/painter.rb:31:9: C: Metrics/MethodLength: Method has too many lines. [11/10] | |
| def default_text_styles | |
| ^^^ | |
| lib/shoes/swt/text_block/text_font_factory.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class TextFontFactory | |
| ^^^^^ | |
| lib/shoes/swt/text_block/text_font_factory.rb:46:25: C: Style/SingleLineBlockParams: Name [33mreduce[0m block params [33m|a, e|[0m. | |
| styles.reduce { |result, s| result | s } | |
| ^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/fitter.rb:4:7: C: Metrics/ClassLength: Class definition is too long. [131/100] | |
| class Fitter | |
| ^^^^^ | |
| lib/shoes/swt/text_block/fitter.rb:4:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Fitter | |
| ^^^^^ | |
| lib/shoes/swt/text_block/fitter.rb:87:11: W: Lint/UselessAssignment: Useless assignment to variable - [33mlayout[0m. | |
| layout = nil | |
| ^^^^^^ | |
| lib/shoes/swt/text_block/fitter.rb:129:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| def position_two_segments(first_layout, second_layout, first_text, height) | |
| ^^ | |
| lib/shoes/swt/text_block/cursor_painter.rb:4:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class CursorPainter | |
| ^^^^^ | |
| lib/shoes/swt/text_block/cursor_painter.rb:20:81: C: Metrics/LineLength: Line is too long. [86/80] | |
| relative_cursor = @collection.relative_text_position(@text_block_dsl.cursor) | |
| ^^^^^^ | |
| lib/shoes/swt/text_block/cursor_painter.rb:29:11: C: Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression. | |
| unless textcursor.left == x && textcursor.top == y | |
| ^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class TextStyleFactory | |
| ^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:31:7: C: Metrics/AbcSize: Assignment Branch Condition size for apply_styles is too high. [20.25/15] | |
| def self.apply_styles(gui_style, dsl_style) | |
| ^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:37:81: C: Metrics/LineLength: Line is too long. [96/80] | |
| gui_style[:font_detail][:size] *= dsl_style[:size_modifier] if dsl_style[:size_modifier] | |
| ^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:45:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| font_styles << ::Swt::SWT::NORMAL if !style[:weight] && !style[:emphasis] | |
| ^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:51:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_rise(style) | |
| ^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:55:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_underline(style) | |
| ^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:56:9: W: Lint/RequireParentheses: Use parentheses in the method call to avoid confusion about precedence. | |
| @gui_style.underline = style[:underline].nil? || style[:underline] == "none" ? false : true | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:56:81: C: Metrics/LineLength: Line is too long. [99/80] | |
| @gui_style.underline = style[:underline].nil? || style[:underline] == "none" ? false : true | |
| ^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:60:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_undercolor(style) | |
| ^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:64:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_strikethrough(style) | |
| ^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:65:9: W: Lint/RequireParentheses: Use parentheses in the method call to avoid confusion about precedence. | |
| @gui_style.strikeout = style[:strikethrough].nil? || style[:strikethrough] == "none" ? false : true | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:65:81: C: Metrics/LineLength: Line is too long. [107/80] | |
| @gui_style.strikeout = style[:strikethrough].nil? || style[:strikethrough] == "none" ? false : true | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:68:11: C: Style/AccessorMethodName: Do not prefix writer method names with [33mset_[0m. | |
| def set_strikecolor(style) | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_style_factory.rb:80:81: C: Metrics/LineLength: Line is too long. [95/80] | |
| color = ::Swt::Color.new(Shoes.display, dsl_color.red, dsl_color.green, dsl_color.blue) | |
| ^^^^^^^^^^^^^^^ | |
| lib/shoes/swt/text_block/text_segment_collection.rb:4:7: C: Metrics/ClassLength: Class definition is too long. [119/100] | |
| class TextSegmentCollection | |
| ^^^^^ | |
| lib/shoes/swt/text_block/text_segment_collection.rb:4:7: C: Style/Documentation: Missing top-level class documentation comment. | |
| class TextSegmentCollection | |
| ^^^^^ | |
| lib/shoes/swt/text_block/text_segment_collection.rb:83:81: C: Metrics/LineLength: Line is too long. [82/80] | |
| # segments apply, and what the relative ranges within each segment to use. | |
| ^^ | |
| lib/shoes/swt/text_block/text_segment_collection.rb:85:46: C: Style/CommentAnnotation: Annotation keywords should be all upper case, followed by a colon and a space, then a note describing the problem. | |
| return [] unless @segments.first # TODO WTF #636 | |
| ^^^^ | |
| lib/shoes/swt/text_block/text_segment_collection.rb:108:81: C: Metrics/LineLength: Line is too long. [81/80] | |
| result << [@segments.last, (0..text_range.count - slice.length - 1)] | |
| ^ | |
| lib/shoes/swt/text_block/text_segment.rb:67:81: C: Metrics/LineLength: Line is too long. [85/80] | |
| style = @style_factory.create_style(font, styles[:fg], styles[:bg], styles) | |
| ^^^^^ | |
| lib/shoes/mock/keyrelease.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Keyrelease | |
| ^^^^^ | |
| lib/shoes/mock/link.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Link | |
| ^^^^^ | |
| lib/shoes/mock/star.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Star | |
| ^^^^^ | |
| lib/shoes/mock/common_methods.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module CommonMethods | |
| ^^^^^^ | |
| lib/shoes/mock/keypress.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Keypress | |
| ^^^^^ | |
| lib/shoes/mock/list_box.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ListBox | |
| ^^^^^ | |
| lib/shoes/mock/progress.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Progress | |
| ^^^^^ | |
| lib/shoes/mock/input_box.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class InputBox | |
| ^^^^^ | |
| lib/shoes/mock/download.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Download | |
| ^^^^^ | |
| lib/shoes/mock/text_block.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class TextBlock | |
| ^^^^^ | |
| lib/shoes/mock/clickable.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Clickable | |
| ^^^^^^ | |
| lib/shoes/mock/background.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Background | |
| ^^^^^ | |
| lib/shoes/mock/oval.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Oval | |
| ^^^^^ | |
| lib/shoes/mock/shape.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Shape | |
| ^^^^^ | |
| lib/shoes/mock/line.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Line | |
| ^^^^^ | |
| lib/shoes/mock/image.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Image | |
| ^^^^^ | |
| lib/shoes/mock/check.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Check | |
| ^^^^^ | |
| lib/shoes/mock/button.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Button | |
| ^^^^^ | |
| lib/shoes/mock/app.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class App | |
| ^^^^^ | |
| lib/shoes/mock/app.rb:28:7: C: Style/TrivialAccessors: Use [33mattr_reader[0m to define trivial reader methods. | |
| def started? | |
| ^^^ | |
| lib/shoes/mock/image_pattern.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class ImagePattern | |
| ^^^^^ | |
| lib/shoes/mock/animation.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Animation | |
| ^^^^^ | |
| lib/shoes/mock/timer.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Timer | |
| ^^^^^ | |
| lib/shoes/mock/font.rb:3:5: C: Style/Documentation: Missing top-level module documentation comment. | |
| module Font | |
| ^^^^^^ | |
| lib/shoes/mock/radio.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Radio | |
| ^^^^^ | |
| lib/shoes/mock/border.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Border | |
| ^^^^^ | |
| lib/shoes/mock/slot.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Slot | |
| ^^^^^ | |
| lib/shoes/mock/rect.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Rect | |
| ^^^^^ | |
| lib/shoes/mock/sound.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Sound | |
| ^^^^^ | |
| lib/shoes/mock/dialog.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Dialog | |
| ^^^^^ | |
| lib/shoes/mock/arc.rb:3:5: C: Style/Documentation: Missing top-level class documentation comment. | |
| class Arc | |
| ^^^^^ | |
| 160 files inspected, 638 offenses detected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since there is now Visual Studio Code https://en.wikipedia.org/wiki/Visual_Studio_Code
one may install a Ruby lint and Rubocop extensions.
These can help do one thing at a time in each file.
One thing that seems common to most Shoes.app code is that they tend to get too many lines.
I can't seem to define anything outside the scope of the main app though. What could be the solution?
Fixing the source code is one thing. But most users are not even aware of Ruby syntax lint.