Created
August 18, 2014 14:07
-
-
Save PragTob/b3376f460d5077e288b7 to your computer and use it in GitHub Desktop.
Shoes4 rubocop
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 164 files | |
WCWCCWWCCCWWCCWCCCWWWCWWCCWCWCWCCCCCWCWWWWWCCWWWWWCWWWWWWWWWCWWWWCWCCCWCC.CCCCCCCCCC.CCCWCC.CCCCWCCCWCWWCWWCCCCWWCWWCWWCCCWWWCCWCWCCC.CWCWCCW.CCWCCCC.CCCCCW.CCCCW.W | |
Offenses: | |
lib/ext/highlighter/common.rb:3:1: C: Missing top-level module documentation comment. | |
module HH::Syntax | |
^^^^^^ | |
lib/ext/highlighter/common.rb:3:8: C: Use nested module/class definitions instead of compact style. | |
module HH::Syntax | |
^^^^^^^^^^ | |
lib/ext/highlighter/common.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/common.rb:9:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/common.rb:19:20: C: Space inside parentheses detected. | |
def initialize( text, group, instruction = :none ) | |
^ | |
lib/ext/highlighter/common.rb:19:53: C: Space inside parentheses detected. | |
def initialize( text, group, instruction = :none ) | |
^ | |
lib/ext/highlighter/common.rb:24:1: C: Extra empty line detected at body end. | |
lib/ext/highlighter/common.rb:32:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/common.rb:42:15: C: Space inside parentheses detected. | |
def start( text, &block ) | |
^ | |
lib/ext/highlighter/common.rb:42:28: C: Space inside parentheses detected. | |
def start( text, &block ) | |
^ | |
lib/ext/highlighter/common.rb:43:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@chunk = "" | |
^^ | |
lib/ext/highlighter/common.rb:46:33: C: Space inside parentheses detected. | |
@text = StringScanner.new( text ) | |
^ | |
lib/ext/highlighter/common.rb:46:38: C: Space inside parentheses detected. | |
@text = StringScanner.new( text ) | |
^ | |
lib/ext/highlighter/common.rb:70:7: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise NotImplementedError, "subclasses must implement #step" | |
^^^^^ | |
lib/ext/highlighter/common.rb:70:34: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
raise NotImplementedError, "subclasses must implement #step" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/common.rb:75:18: C: Space inside parentheses detected. | |
def tokenize( text, &block ) | |
^ | |
lib/ext/highlighter/common.rb:75:31: C: Space inside parentheses detected. | |
def tokenize( text, &block ) | |
^ | |
lib/ext/highlighter/common.rb:84:13: C: Space inside parentheses detected. | |
def set( opts={} ) | |
^ | |
lib/ext/highlighter/common.rb:84:18: C: Surrounding space missing in default value assignment. | |
def set( opts={} ) | |
^ | |
lib/ext/highlighter/common.rb:84:21: C: Space inside parentheses detected. | |
def set( opts={} ) | |
^ | |
lib/ext/highlighter/common.rb:85:22: C: Use hash literal {} instead of Hash.new. | |
( @options ||= Hash.new ).update opts | |
^^^^^^^^ | |
lib/ext/highlighter/common.rb:85:30: C: Space inside parentheses detected. | |
( @options ||= Hash.new ).update opts | |
^ | |
lib/ext/highlighter/common.rb:93:3: C: Indent access modifiers like [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/ext/highlighter/common.rb:98:23: C: Space inside parentheses detected. | |
def self.delegate( sym ) | |
^ | |
lib/ext/highlighter/common.rb:98:27: C: Space inside parentheses detected. | |
def self.delegate( sym ) | |
^ | |
lib/ext/highlighter/common.rb:99:21: C: Space inside parentheses detected. | |
define_method( sym ) { |*a| @text.__send__( sym, *a ) } | |
^ | |
lib/ext/highlighter/common.rb:99:25: C: Space inside parentheses detected. | |
define_method( sym ) { |*a| @text.__send__( sym, *a ) } | |
^ | |
lib/ext/highlighter/common.rb:99:50: C: Space inside parentheses detected. | |
define_method( sym ) { |*a| @text.__send__( sym, *a ) } | |
^ | |
lib/ext/highlighter/common.rb:99:58: C: Space inside parentheses detected. | |
define_method( sym ) { |*a| @text.__send__( sym, *a ) } | |
^ | |
lib/ext/highlighter/common.rb:120:16: C: Space inside parentheses detected. | |
def append( data ) | |
^ | |
lib/ext/highlighter/common.rb:120:21: C: Space inside parentheses detected. | |
def append( data ) | |
^ | |
lib/ext/highlighter/common.rb:131:21: C: Space inside parentheses detected. | |
def start_group( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:131:30: C: Surrounding space missing in default value assignment. | |
def start_group( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:131:34: C: Space inside parentheses detected. | |
def start_group( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:137:22: C: Space inside parentheses detected. | |
def start_region( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:137:31: C: Surrounding space missing in default value assignment. | |
def start_region( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:137:35: C: Space inside parentheses detected. | |
def start_region( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:140:22: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_open ) ) | |
^ | |
lib/ext/highlighter/common.rb:140:33: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_open ) ) | |
^ | |
lib/ext/highlighter/common.rb:140:38: C: Surrounding space missing for operator '||'. | |
@callback.call( Token.new( data||"", @group, :region_open ) ) | |
^^ | |
lib/ext/highlighter/common.rb:140:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@callback.call( Token.new( data||"", @group, :region_open ) ) | |
^^ | |
lib/ext/highlighter/common.rb:140:64: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_open ) ) | |
^ | |
lib/ext/highlighter/common.rb:140:66: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_open ) ) | |
^ | |
lib/ext/highlighter/common.rb:143:20: C: Space inside parentheses detected. | |
def end_region( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:143:29: C: Surrounding space missing in default value assignment. | |
def end_region( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:143:33: C: Space inside parentheses detected. | |
def end_region( gr, data=nil ) | |
^ | |
lib/ext/highlighter/common.rb:146:22: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_close ) ) | |
^ | |
lib/ext/highlighter/common.rb:146:33: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_close ) ) | |
^ | |
lib/ext/highlighter/common.rb:146:38: C: Surrounding space missing for operator '||'. | |
@callback.call( Token.new( data||"", @group, :region_close ) ) | |
^^ | |
lib/ext/highlighter/common.rb:146:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@callback.call( Token.new( data||"", @group, :region_close ) ) | |
^^ | |
lib/ext/highlighter/common.rb:146:65: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_close ) ) | |
^ | |
lib/ext/highlighter/common.rb:146:67: C: Space inside parentheses detected. | |
@callback.call( Token.new( data||"", @group, :region_close ) ) | |
^ | |
lib/ext/highlighter/common.rb:150:22: C: Space inside parentheses detected. | |
@callback.call( Token.new( @chunk, @group ) ) unless @chunk.empty? | |
^ | |
lib/ext/highlighter/common.rb:150:33: C: Space inside parentheses detected. | |
@callback.call( Token.new( @chunk, @group ) ) unless @chunk.empty? | |
^ | |
lib/ext/highlighter/common.rb:150:48: C: Space inside parentheses detected. | |
@callback.call( Token.new( @chunk, @group ) ) unless @chunk.empty? | |
^ | |
lib/ext/highlighter/common.rb:150:50: C: Space inside parentheses detected. | |
@callback.call( Token.new( @chunk, @group ) ) unless @chunk.empty? | |
^ | |
lib/ext/highlighter/common.rb:151:16: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@chunk = "" | |
^^ | |
lib/ext/highlighter/common.rb:154:21: C: Space inside parentheses detected. | |
def subtokenize( syntax, text ) | |
^ | |
lib/ext/highlighter/common.rb:154:34: C: Space inside parentheses detected. | |
def subtokenize( syntax, text ) | |
^ | |
lib/ext/highlighter/common.rb:155:31: C: Space inside parentheses detected. | |
tokenizer = Syntax.load( syntax ) | |
^ | |
lib/ext/highlighter/common.rb:155:38: C: Space inside parentheses detected. | |
tokenizer = Syntax.load( syntax ) | |
^ | |
lib/ext/highlighter/common.rb:158:26: C: Space inside parentheses detected. | |
tokenizer.tokenize( text, &@callback ) | |
^ | |
lib/ext/highlighter/common.rb:158:43: C: Space inside parentheses detected. | |
tokenizer.tokenize( text, &@callback ) | |
^ | |
lib/ext/highlighter/common.rb:162:1: C: Extra blank line detected. | |
lib/ext/highlighter/common.rb:166:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/common.rb:168:18: C: Space inside parentheses detected. | |
def tokenize( text ) | |
^ | |
lib/ext/highlighter/common.rb:168:23: C: Space inside parentheses detected. | |
def tokenize( text ) | |
^ | |
lib/ext/highlighter/common.rb:169:23: C: Space inside parentheses detected. | |
yield Token.new( text, :normal ) | |
^ | |
lib/ext/highlighter/common.rb:169:37: C: Space inside parentheses detected. | |
yield Token.new( text, :normal ) | |
^ | |
lib/ext/highlighter/common.rb:171:1: C: Extra empty line detected at body end. | |
lib/ext/highlighter/common.rb:175:21: C: Space inside parentheses detected. | |
SYNTAX = Hash.new( Default ) | |
^ | |
lib/ext/highlighter/common.rb:175:29: C: Space inside parentheses detected. | |
SYNTAX = Hash.new( Default ) | |
^ | |
lib/ext/highlighter/common.rb:180:12: C: Space inside parentheses detected. | |
def load( syntax ) | |
^ | |
lib/ext/highlighter/common.rb:180:19: C: Space inside parentheses detected. | |
def load( syntax ) | |
^ | |
lib/ext/highlighter/common.rb:183:5: W: Do not suppress exceptions. | |
rescue LoadError | |
^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/common.rb:185:12: C: Space inside square brackets detected. | |
SYNTAX[ syntax ].new | |
^ | |
lib/ext/highlighter/common.rb:185:19: C: Space inside square brackets detected. | |
SYNTAX[ syntax ].new | |
^ | |
lib/ext/highlighter/common.rb:191:50: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
lang_dir = File.join(File.dirname(__FILE__), "syntax", "lang") | |
^^^^^^^^ | |
lib/ext/highlighter/common.rb:191:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
lang_dir = File.join(File.dirname(__FILE__), "syntax", "lang") | |
^^^^^^ | |
lib/ext/highlighter/common.rb:192:62: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Dir["#{lang_dir}/*.rb"].map { |path| File.basename(path, ".rb") } | |
^^^^^ | |
lib/ext/highlighter/common.rb:196:1: C: Extra blank line detected. | |
lib/ext/highlighter/common.rb:196:1: C: Extra empty line detected at body end. | |
lib/ext/highlighter/markup.rb:5:1: C: Missing top-level module documentation comment. | |
module HH::Markup | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:5:8: C: Use nested module/class definitions instead of compact style. | |
module HH::Markup | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:6:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/markup.rb:7:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
TOKENIZER = HH::Syntax.load "ruby" | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:9:5: C: Use the new Ruby 1.9 hash syntax. | |
:comment => {:stroke => "#887"}, | |
^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:9:17: C: Space inside { missing. | |
:comment => {:stroke => "#887"}, | |
^ | |
lib/ext/highlighter/markup.rb:9:18: C: Use the new Ruby 1.9 hash syntax. | |
:comment => {:stroke => "#887"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:9:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:comment => {:stroke => "#887"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:9:35: C: Space inside } missing. | |
:comment => {:stroke => "#887"}, | |
^ | |
lib/ext/highlighter/markup.rb:10:5: C: Use the new Ruby 1.9 hash syntax. | |
:keyword => {:stroke => "#111"}, | |
^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:10:17: C: Space inside { missing. | |
:keyword => {:stroke => "#111"}, | |
^ | |
lib/ext/highlighter/markup.rb:10:18: C: Use the new Ruby 1.9 hash syntax. | |
:keyword => {:stroke => "#111"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:10:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:keyword => {:stroke => "#111"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:10:35: C: Space inside } missing. | |
:keyword => {:stroke => "#111"}, | |
^ | |
lib/ext/highlighter/markup.rb:11:5: C: Use the new Ruby 1.9 hash syntax. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:11:16: C: Space inside { missing. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:11:17: C: Use the new Ruby 1.9 hash syntax. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:11:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:11:36: C: Use the new Ruby 1.9 hash syntax. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:11:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:11:53: C: Space inside } missing. | |
:method => {:stroke => "#C09", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:15:5: C: Use the new Ruby 1.9 hash syntax. | |
:symbol => {:stroke => "#C30"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:15:16: C: Space inside { missing. | |
:symbol => {:stroke => "#C30"}, | |
^ | |
lib/ext/highlighter/markup.rb:15:17: C: Use the new Ruby 1.9 hash syntax. | |
:symbol => {:stroke => "#C30"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:15:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:symbol => {:stroke => "#C30"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:15:34: C: Space inside } missing. | |
:symbol => {:stroke => "#C30"}, | |
^ | |
lib/ext/highlighter/markup.rb:16:5: C: Use the new Ruby 1.9 hash syntax. | |
:string => {:stroke => "#C90"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:16:16: C: Space inside { missing. | |
:string => {:stroke => "#C90"}, | |
^ | |
lib/ext/highlighter/markup.rb:16:17: C: Use the new Ruby 1.9 hash syntax. | |
:string => {:stroke => "#C90"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:16:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:string => {:stroke => "#C90"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:16:34: C: Space inside } missing. | |
:string => {:stroke => "#C90"}, | |
^ | |
lib/ext/highlighter/markup.rb:17:5: C: Use the new Ruby 1.9 hash syntax. | |
:number => {:stroke => "#396" }, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:17:16: C: Space inside { missing. | |
:number => {:stroke => "#396" }, | |
^ | |
lib/ext/highlighter/markup.rb:17:17: C: Use the new Ruby 1.9 hash syntax. | |
:number => {:stroke => "#396" }, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:17:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:number => {:stroke => "#396" }, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:18:5: C: Use the new Ruby 1.9 hash syntax. | |
:regex => {:stroke => "#000", :fill => "#FFC" }, | |
^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:18:15: C: Space inside { missing. | |
:regex => {:stroke => "#000", :fill => "#FFC" }, | |
^ | |
lib/ext/highlighter/markup.rb:18:16: C: Use the new Ruby 1.9 hash syntax. | |
:regex => {:stroke => "#000", :fill => "#FFC" }, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:18:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:regex => {:stroke => "#000", :fill => "#FFC" }, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:18:35: C: Use the new Ruby 1.9 hash syntax. | |
:regex => {:stroke => "#000", :fill => "#FFC" }, | |
^^^^^^^^ | |
lib/ext/highlighter/markup.rb:18:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:regex => {:stroke => "#000", :fill => "#FFC" }, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:20:5: C: Use the new Ruby 1.9 hash syntax. | |
:attribute => {:stroke => "#369" }, | |
^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:20:19: C: Space inside { missing. | |
:attribute => {:stroke => "#369" }, | |
^ | |
lib/ext/highlighter/markup.rb:20:20: C: Use the new Ruby 1.9 hash syntax. | |
:attribute => {:stroke => "#369" }, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:20:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:attribute => {:stroke => "#369" }, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:22:5: C: Use the new Ruby 1.9 hash syntax. | |
:expr => {:stroke => "#722" }, | |
^^^^^^^^ | |
lib/ext/highlighter/markup.rb:22:14: C: Space inside { missing. | |
:expr => {:stroke => "#722" }, | |
^ | |
lib/ext/highlighter/markup.rb:22:15: C: Use the new Ruby 1.9 hash syntax. | |
:expr => {:stroke => "#722" }, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:22:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:expr => {:stroke => "#722" }, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:24:5: C: Use the new Ruby 1.9 hash syntax. | |
:ident => {:stroke => "#994c99"}, | |
^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:24:15: C: Space inside { missing. | |
:ident => {:stroke => "#994c99"}, | |
^ | |
lib/ext/highlighter/markup.rb:24:16: C: Use the new Ruby 1.9 hash syntax. | |
:ident => {:stroke => "#994c99"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:24:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:ident => {:stroke => "#994c99"}, | |
^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:24:36: C: Space inside } missing. | |
:ident => {:stroke => "#994c99"}, | |
^ | |
lib/ext/highlighter/markup.rb:25:5: C: Use the new Ruby 1.9 hash syntax. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:25:18: C: Space inside { missing. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:25:19: C: Use the new Ruby 1.9 hash syntax. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:25:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:25:38: C: Use the new Ruby 1.9 hash syntax. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:25:49: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:25:55: C: Space inside } missing. | |
:constant => {:stroke => "#630", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:26:5: C: Use the new Ruby 1.9 hash syntax. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:26:15: C: Space inside { missing. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:26:16: C: Use the new Ruby 1.9 hash syntax. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:26:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:26:35: C: Use the new Ruby 1.9 hash syntax. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:26:46: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:26:52: C: Space inside } missing. | |
:class => {:stroke => "#630", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:27:5: C: Use the new Ruby 1.9 hash syntax. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:27:18: C: Space inside { missing. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:27:19: C: Use the new Ruby 1.9 hash syntax. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:27:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:27:38: C: Use the new Ruby 1.9 hash syntax. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:27:49: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:27:55: C: Space inside } missing. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:27:56: C: Avoid comma after the last item of a hash. | |
:matching => {:stroke => "#ff0", :weight => "bold"}, | |
^ | |
lib/ext/highlighter/markup.rb:30:1: C: Trailing whitespace detected. | |
lib/ext/highlighter/markup.rb:31:3: C: Cyclomatic complexity for highlight is too high. [12/6] | |
def highlight str, pos=nil, colors=COLORS | |
^^^ | |
lib/ext/highlighter/markup.rb:31:3: C: Method has too many lines. [34/10] | |
def highlight str, pos=nil, colors=COLORS | |
^^^ | |
lib/ext/highlighter/markup.rb:31:3: C: Perceived complexity for highlight is too high. [14/7] | |
def highlight str, pos=nil, colors=COLORS | |
^^^ | |
lib/ext/highlighter/markup.rb:31:17: C: Use def with parentheses when there are parameters. | |
def highlight str, pos=nil, colors=COLORS | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:31:25: C: Surrounding space missing in default value assignment. | |
def highlight str, pos=nil, colors=COLORS | |
^ | |
lib/ext/highlighter/markup.rb:31:37: C: Surrounding space missing in default value assignment. | |
def highlight str, pos=nil, colors=COLORS | |
^ | |
lib/ext/highlighter/markup.rb:37:34: C: Space missing to the left of {. | |
tokens += t.split('').map{|s| HH::Syntax::Token.new(s, :punct)} | |
^ | |
lib/ext/highlighter/markup.rb:37:34: C: Space between { and | missing. | |
tokens += t.split('').map{|s| HH::Syntax::Token.new(s, :punct)} | |
^^ | |
lib/ext/highlighter/markup.rb:37:71: C: Space missing inside }. | |
tokens += t.split('').map{|s| HH::Syntax::Token.new(s, :punct)} | |
^ | |
lib/ext/highlighter/markup.rb:48:11: C: Missing space after #. | |
#span(token, colors[token.group]) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:52:11: C: Missing space after #. | |
#span(token, colors[:any]) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:60:5: C: 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 pos.nil? or pos < 0 | |
^^ | |
lib/ext/highlighter/markup.rb:60:17: C: Use [33m||[0m instead of [33mor[0m. | |
if pos.nil? or pos < 0 | |
^^ | |
lib/ext/highlighter/markup.rb:67:7: C: Missing space after #. | |
#res[token_index] = span(tokens[token_index], colors[:matching]) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:69:81: C: Line is too long. [91/80] | |
res[token_index] = colors[:matching][:fill] ? bg(tmp, colors[:matching][:fill]) : tmp | |
^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:71:9: C: Missing space after #. | |
#res[matching_index] = span(tokens[matching_index], colors[:matching]) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:73:81: C: Line is too long. [96/80] | |
res[matching_index] = colors[:matching][:fill] ? bg(tmp, colors[:matching][:fill]) : tmp | |
^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:80:1: C: Indent access modifiers like [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/ext/highlighter/markup.rb:80:1: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/ext/highlighter/markup.rb:81:3: C: Cyclomatic complexity for matching_token is too high. [8/6] | |
def matching_token(tokens, pos) | |
^^^ | |
lib/ext/highlighter/markup.rb:81:3: C: Method has too many lines. [20/10] | |
def matching_token(tokens, pos) | |
^^^ | |
lib/ext/highlighter/markup.rb:81:3: C: Perceived complexity for matching_token is too high. [9/7] | |
def matching_token(tokens, pos) | |
^^^ | |
lib/ext/highlighter/markup.rb:86:27: C: Use [33m&&[0m instead of [33mand[0m. | |
if token_index.nil? and curr_pos >= pos | |
^^^ | |
lib/ext/highlighter/markup.rb:91:5: C: 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 token_index.nil? then return nil end | |
^^ | |
lib/ext/highlighter/markup.rb:91:5: C: Favor the ternary operator (?:) over if/then/else/end constructs. | |
if token_index.nil? then return nil end | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:93:57: C: Do not use semicolons to terminate expressions. | |
match = matching_token_at_index(tokens, token_index); | |
^ | |
lib/ext/highlighter/markup.rb:94:19: C: Use [33m&&[0m instead of [33mand[0m. | |
if match.nil? and curr_pos == pos and token_index < tokens.size-1 | |
^^^ | |
lib/ext/highlighter/markup.rb:94:39: C: Use [33m&&[0m instead of [33mand[0m. | |
if match.nil? and curr_pos == pos and token_index < tokens.size-1 | |
^^^ | |
lib/ext/highlighter/markup.rb:94:68: C: Surrounding space missing for operator '-'. | |
if match.nil? and curr_pos == pos and token_index < tokens.size-1 | |
^ | |
lib/ext/highlighter/markup.rb:107:1: C: Extra blank line detected. | |
lib/ext/highlighter/markup.rb:108:3: C: Cyclomatic complexity for matching_token_at_index is too high. [9/6] | |
def matching_token_at_index(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:108:3: C: Method has too many lines. [17/10] | |
def matching_token_at_index(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:108:3: C: Perceived complexity for matching_token_at_index is too high. [10/7] | |
def matching_token_at_index(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:110:5: C: 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 starts.nil? | |
^^ | |
lib/ext/highlighter/markup.rb:116:22: C: Use [33m&&[0m instead of [33mand[0m. | |
while index >= 0 and index < tokens.size | |
^^^ | |
lib/ext/highlighter/markup.rb:117:9: C: Annotation keywords should be all upper case, followed by a colon and a space, then a note describing the problem. | |
# TODO separate space in the tokenizer | |
^^^^ | |
lib/ext/highlighter/markup.rb:119:27: C: Use [33m&&[0m instead of [33mand[0m. | |
if ends.include?(t) and not as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:119:31: C: Use [33m![0m instead of [33mnot[0m. | |
if ends.include?(t) and not as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:122:32: C: Use [33m&&[0m instead of [33mand[0m. | |
elsif starts.include?(t) and not as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:122:36: C: Use [33m![0m instead of [33mnot[0m. | |
elsif starts.include?(t) and not as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:128:5: C: Redundant [33mreturn[0m detected. | |
return nil | |
^^^^^^ | |
lib/ext/highlighter/markup.rb:132:3: C: Method has too many lines. [22/10] | |
def matching_tokens(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:133:7: C: Annotation keywords should be all upper case, followed by a colon and a space, then a note describing the problem. | |
# TODO separate space in the tokenizer | |
^^^^ | |
lib/ext/highlighter/markup.rb:143:7: C: 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 as_modifier?(tokens, index) | |
^^ | |
lib/ext/highlighter/markup.rb:159:3: C: Cyclomatic complexity for as_modifier? is too high. [7/6] | |
def as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:159:3: C: Method has too many lines. [16/10] | |
def as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:159:3: C: Perceived complexity for as_modifier? is too high. [8/7] | |
def as_modifier?(tokens, index) | |
^^^ | |
lib/ext/highlighter/markup.rb:160:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/markup.rb:161:5: C: 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 not MODIFIERS.include? tokens[index].gsub(/\s/, '') | |
^^ | |
lib/ext/highlighter/markup.rb:161:5: C: Favor [33munless[0m over [33mif[0m for negative conditions. | |
if not MODIFIERS.include? tokens[index].gsub(/\s/, '') | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:161:8: C: Use [33m![0m instead of [33mnot[0m. | |
if not MODIFIERS.include? tokens[index].gsub(/\s/, '') | |
^^^ | |
lib/ext/highlighter/markup.rb:164:1: C: Trailing whitespace detected. | |
lib/ext/highlighter/markup.rb:167:33: C: Use [33m&&[0m instead of [33mand[0m. | |
index -= 1 while index >= 0 and tokens[index] =~ /\A[ \t]*\z/ | |
^^^ | |
lib/ext/highlighter/markup.rb:180:7: C: Use [33m![0m instead of [33mnot[0m. | |
not NON_TERMINATING.include?(punc) | |
^^^ | |
lib/ext/highlighter/markup.rb:187:1: C: Extra blank line detected. | |
lib/ext/highlighter/markup.rb:191:15: C: Avoid comma after the last item of a hash. | |
'[' => ']', | |
^ | |
lib/ext/highlighter/markup.rb:194:3: C: Missing space after #. | |
#close_bracket = {} | |
^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:195:3: C: Missing space after #. | |
#OPEN_BRACKETS.each{|open, close| opens_bracket[close] = open} | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:196:3: C: Missing space after #. | |
#CLOSE_BRACKETS = opens_bracket | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/markup.rb:201:15: C: Avoid comma after the last item of a hash. | |
']' => '[', | |
^ | |
lib/ext/highlighter/markup.rb:206:16: C: Use [33m%w[0m or [33m%W[0m for array of words. | |
OPEN_BLOCK = [ | |
^ | |
lib/ext/highlighter/markup.rb:219:15: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
MODIFIERS = %w[if unless while until] | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:2:1: C: Missing top-level module documentation comment. | |
module HH::Syntax | |
^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:2:8: C: Use nested module/class definitions instead of compact style. | |
module HH::Syntax | |
^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:3:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/lang/ruby.rb:7:3: C: Class definition is too long. [267/100] | |
class Ruby < Tokenizer | |
^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:8:1: C: Extra empty line detected at body beginning. | |
lib/ext/highlighter/lang/ruby.rb:11:7: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
%w{if then elsif else end begin do rescue ensure while for | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:24:5: C: Cyclomatic complexity for step is too high. [51/6] | |
def step | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:24:5: C: Method has too many lines. [152/10] | |
def step | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:24:5: C: Perceived complexity for step is too high. [42/7] | |
def step | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:26:9: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when bol? && check( /=begin/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:26:28: C: Space inside parentheses detected. | |
when bol? && check( /=begin/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:26:37: C: Space inside parentheses detected. | |
when bol? && check( /=begin/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:27:23: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /^=end#{EOL}/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:27:45: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /^=end#{EOL}/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:27:59: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /^=end#{EOL}/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:27:61: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /^=end#{EOL}/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:28:9: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when bol? && check( /__END__#{EOL}/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:28:28: C: Space inside parentheses detected. | |
when bol? && check( /__END__#{EOL}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:28:44: C: Space inside parentheses detected. | |
when bol? && check( /__END__#{EOL}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:29:23: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /\Z/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:29:45: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /\Z/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:29:50: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /\Z/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:29:52: C: Space inside parentheses detected. | |
start_group( :comment, scan_until( /\Z/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:31:9: C: Use 2 (not 0) spaces for indentation. | |
case | |
lib/ext/highlighter/lang/ruby.rb:32:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /def\s+/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:32:22: C: Space inside parentheses detected. | |
when check( /def\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:32:31: C: Space inside parentheses detected. | |
when check( /def\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:33:40: C: Space inside parentheses detected. | |
start_group :keyword, scan( /def\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:33:49: C: Space inside parentheses detected. | |
start_group :keyword, scan( /def\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:34:46: C: Space inside parentheses detected. | |
start_group :method, scan_until( /(?=[;(\s]|#{EOL})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:34:66: C: Space inside parentheses detected. | |
start_group :method, scan_until( /(?=[;(\s]|#{EOL})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:35:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /class\s+/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:35:22: C: Space inside parentheses detected. | |
when check( /class\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:35:33: C: Space inside parentheses detected. | |
when check( /class\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:36:40: C: Space inside parentheses detected. | |
start_group :keyword, scan( /class\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:36:51: C: Space inside parentheses detected. | |
start_group :keyword, scan( /class\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:37:45: C: Space inside parentheses detected. | |
start_group :class, scan_until( /(?=[;\s<]|#{EOL})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:37:65: C: Space inside parentheses detected. | |
start_group :class, scan_until( /(?=[;\s<]|#{EOL})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:38:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /module\s+/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:38:22: C: Space inside parentheses detected. | |
when check( /module\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:38:34: C: Space inside parentheses detected. | |
when check( /module\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:39:40: C: Space inside parentheses detected. | |
start_group :keyword, scan( /module\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:39:52: C: Space inside parentheses detected. | |
start_group :keyword, scan( /module\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:40:46: C: Space inside parentheses detected. | |
start_group :module, scan_until( /(?=[;\s]|#{EOL})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:40:65: C: Space inside parentheses detected. | |
start_group :module, scan_until( /(?=[;\s]|#{EOL})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:41:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /::/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:41:22: C: Space inside parentheses detected. | |
when check( /::/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:41:27: C: Space inside parentheses detected. | |
when check( /::/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:43:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /:"/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:43:22: C: Space inside parentheses detected. | |
when check( /:"/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:43:27: C: Space inside parentheses detected. | |
when check( /:"/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:45:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
scan_delimited_region :symbol, :symbol, "", true | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:47:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /:'/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:47:22: C: Space inside parentheses detected. | |
when check( /:'/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:47:27: C: Space inside parentheses detected. | |
when check( /:'/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:49:53: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
scan_delimited_region :symbol, :symbol, "", false | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:51:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when scan( /:[_a-zA-Z@$][$@\w]*[=!?]?/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:51:21: C: Space inside parentheses detected. | |
when scan( /:[_a-zA-Z@$][$@\w]*[=!?]?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:51:49: C: Space inside parentheses detected. | |
when scan( /:[_a-zA-Z@$][$@\w]*[=!?]?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:54:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when scan( /\?(\\[^\n\r]|[^\\\n\r\s])/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:54:21: C: Space inside parentheses detected. | |
when scan( /\?(\\[^\n\r]|[^\\\n\r\s])/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:54:49: C: Space inside parentheses detected. | |
when scan( /\?(\\[^\n\r]|[^\\\n\r\s])/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:57:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when check( /(__FILE__|__LINE__|true|false|nil|self)[?!]?/ ) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:57:22: C: Space inside parentheses detected. | |
when check( /(__FILE__|__LINE__|true|false|nil|self)[?!]?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:57:69: C: Space inside parentheses detected. | |
when check( /(__FILE__|__LINE__|true|false|nil|self)[?!]?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:58:44: C: Do not use the character literal - use string literal instead. | |
if @selector || matched[-1] == ?? || matched[-1] == ?! | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:58:65: C: Do not use the character literal - use string literal instead. | |
if @selector || matched[-1] == ?? || matched[-1] == ?! | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:60:17: C: Align the parameters of a method call if they span more than one line. | |
scan(/(__FILE__|__LINE__|true|false|nil|self)[?!]?/) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:63:17: C: Align the parameters of a method call if they span more than one line. | |
scan(/(__FILE__|__LINE__|true|false|nil|self)/) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:67:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when scan(/0([bB][01]+|[oO][0-7]+|[dD][0-9]+|[xX][0-9a-fA-F]+)/) | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:72:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "%r" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:72:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%r" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:73:60: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :regex, scan( /../ ), true | |
^ | |
lib/ext/highlighter/lang/ruby.rb:73:65: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :regex, scan( /../ ), true | |
^ | |
lib/ext/highlighter/lang/ruby.rb:75:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "%w", "%q" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:75:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%w", "%q" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:75:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%w", "%q" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:76:61: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :string, scan( /../ ), false | |
^ | |
lib/ext/highlighter/lang/ruby.rb:76:66: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :string, scan( /../ ), false | |
^ | |
lib/ext/highlighter/lang/ruby.rb:78:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "%s" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:78:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%s" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:79:61: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :symbol, scan( /../ ), false | |
^ | |
lib/ext/highlighter/lang/ruby.rb:79:66: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :symbol, scan( /../ ), false | |
^ | |
lib/ext/highlighter/lang/ruby.rb:81:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "%W", "%Q", "%x" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:81:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%W", "%Q", "%x" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:81:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%W", "%Q", "%x" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:81:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "%W", "%Q", "%x" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:82:61: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :string, scan( /../ ), true | |
^ | |
lib/ext/highlighter/lang/ruby.rb:82:66: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :string, scan( /../ ), true | |
^ | |
lib/ext/highlighter/lang/ruby.rb:84:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /%[^\sa-zA-Z0-9]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:85:61: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :string, scan( /./ ), true | |
^ | |
lib/ext/highlighter/lang/ruby.rb:85:65: C: Space inside parentheses detected. | |
scan_delimited_region :punct, :string, scan( /./ ), true | |
^ | |
lib/ext/highlighter/lang/ruby.rb:87:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "<<" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:87:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "<<" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:88:38: C: Space missing after comma. | |
saw_word = ( chunk[-1,1] =~ /[\w!?]/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:88:53: C: Space inside parentheses detected. | |
saw_word = ( chunk[-1,1] =~ /[\w!?]/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:89:42: C: Space inside parentheses detected. | |
start_group :punct, scan( /<</ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:89:47: C: Space inside parentheses detected. | |
start_group :punct, scan( /<</ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:90:17: C: Avoid more than 3 levels of block nesting. | |
if saw_word | |
^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:95:36: C: Space inside parentheses detected. | |
float_right = scan( /-/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:95:40: C: Space inside parentheses detected. | |
float_right = scan( /-/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:96:17: C: Avoid more than 3 levels of block nesting. | |
append "-" if float_right | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:96:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
append "-" if float_right | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:97:17: C: Avoid more than 3 levels of block nesting. | |
if ( type = scan( /['"]/ ) ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:97:34: C: Space inside parentheses detected. | |
if ( type = scan( /['"]/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:97:41: C: Space inside parentheses detected. | |
if ( type = scan( /['"]/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:97:43: C: Space inside parentheses detected. | |
if ( type = scan( /['"]/ ) ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:99:38: C: Space inside parentheses detected. | |
delim = scan_until( /(?=#{type})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:99:52: C: Space inside parentheses detected. | |
delim = scan_until( /(?=#{type})/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:101:39: C: Space inside parentheses detected. | |
append scan_until( /\Z/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:101:44: C: Space inside parentheses detected. | |
append scan_until( /\Z/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:105:32: C: Space inside parentheses detected. | |
delim = scan( /\w+/ ) or return | |
^ | |
lib/ext/highlighter/lang/ruby.rb:105:38: C: Space inside parentheses detected. | |
delim = scan( /\w+/ ) or return | |
^ | |
lib/ext/highlighter/lang/ruby.rb:105:41: C: Use [33m||[0m instead of [33mor[0m. | |
delim = scan( /\w+/ ) or return | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:108:17: C: Avoid more than 3 levels of block nesting. | |
start_group :punct, scan( /#{type}/ ) if type | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:108:42: C: Space inside parentheses detected. | |
start_group :punct, scan( /#{type}/ ) if type | |
^ | |
lib/ext/highlighter/lang/ruby.rb:108:52: C: Space inside parentheses detected. | |
start_group :punct, scan( /#{type}/ ) if type | |
^ | |
lib/ext/highlighter/lang/ruby.rb:109:31: C: Space inside square brackets detected. | |
@heredocs << [ float_right, type, delim ] | |
^ | |
lib/ext/highlighter/lang/ruby.rb:109:56: C: Space inside square brackets detected. | |
@heredocs << [ float_right, type, delim ] | |
^ | |
lib/ext/highlighter/lang/ruby.rb:112:17: C: Avoid more than 3 levels of block nesting. | |
case peek(1) | |
^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:113:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[\n\r]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:114:21: C: Never use [33munless[0m with [33melse[0m. Rewrite these with the positive case first. | |
unless @heredocs.empty? | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:117:49: C: Space inside parentheses detected. | |
start_group :normal, scan( /\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:117:55: C: Space inside parentheses detected. | |
start_group :normal, scan( /\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:120:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\s/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:121:47: C: Space inside parentheses detected. | |
start_group :normal, scan( /\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:121:53: C: Space inside parentheses detected. | |
start_group :normal, scan( /\s+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:122:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "#" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:122:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "#" | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:123:48: C: Space inside parentheses detected. | |
start_group :comment, scan( /#[^\n\r]*/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:123:60: C: Space inside parentheses detected. | |
start_group :comment, scan( /#[^\n\r]*/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:124:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[A-Z]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:125:70: C: Space inside parentheses detected. | |
start_group @selector ? :ident : :constant, scan( /\w+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:125:76: C: Space inside parentheses detected. | |
start_group @selector ? :ident : :constant, scan( /\w+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:127:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[a-z_]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:128:33: C: Space inside parentheses detected. | |
word = scan( /\w+[?!]?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:128:44: C: Space inside parentheses detected. | |
word = scan( /\w+[?!]?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:129:56: C: Space inside parentheses detected. | |
if !@selector && KEYWORDS.include?( word ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:129:61: C: Space inside parentheses detected. | |
if !@selector && KEYWORDS.include?( word ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:133:23: W: Place the condition on the same line as [33melsif[0m. | |
start_group :ident, word | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:137:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\d/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:139:23: C: Align the parameters of a method call if they span more than one line. | |
scan( /[\d_]+(\.[\d_]+)?([eE][\d_]+)?/ ) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:139:28: C: Space inside parentheses detected. | |
scan( /[\d_]+(\.[\d_]+)?([eE][\d_]+)?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:139:61: C: Space inside parentheses detected. | |
scan( /[\d_]+(\.[\d_]+)?([eE][\d_]+)?/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:141:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when '"' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:142:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
scan_delimited_region :punct, :string, "", true | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:144:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when '/' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:146:48: C: Use %r only for regular expressions matching more than 1 '/' character. | |
start_group :punct, scan(%r{/}) | |
^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:149:61: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
scan_delimited_region :punct, :regex, "", true | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:152:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "'" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:153:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
scan_delimited_region :punct, :string, "", false | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:155:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "." | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:155:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "." | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:156:33: C: Space inside parentheses detected. | |
dots = scan( /\.{1,3}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:156:43: C: Space inside parentheses detected. | |
dots = scan( /\.{1,3}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:158:51: C: Space inside parentheses detected. | |
@selector = ( dots.length == 1 ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:159:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[@]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:160:50: C: Space inside parentheses detected. | |
start_group :attribute, scan( /@{1,2}\w*/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:160:62: C: Space inside parentheses detected. | |
start_group :attribute, scan( /@{1,2}\w*/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:162:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[$]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:164:47: C: Space inside parentheses detected. | |
start_group :global, scan( /\w+|./ ) if check(/./) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:164:55: C: Space inside parentheses detected. | |
start_group :global, scan( /\w+|./ ) if check(/./) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:166:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[-!?*\/+=<>(\[\{}:;,&|%]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:169:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[)\]]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:200:7: C: Cyclomatic complexity for scan_delimited_region is too high. [28/6] | |
def scan_delimited_region( delim_group, inner_group, starter, exprs, | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:200:7: C: Method has too many lines. [95/10] | |
def scan_delimited_region( delim_group, inner_group, starter, exprs, | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:200:7: C: Perceived complexity for scan_delimited_region is too high. [26/7] | |
def scan_delimited_region( delim_group, inner_group, starter, exprs, | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:200:7: C: Inconsistent indentation detected. | |
def scan_delimited_region( delim_group, inner_group, starter, exprs, | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:200:32: C: Avoid parameter lists longer than 5 parameters. | |
def scan_delimited_region( delim_group, inner_group, starter, exprs, | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:200:33: C: Space inside parentheses detected. | |
def scan_delimited_region( delim_group, inner_group, starter, exprs, | |
^ | |
lib/ext/highlighter/lang/ruby.rb:201:14: C: Surrounding space missing in default value assignment. | |
delim=nil, heredoc=false ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:201:27: C: Surrounding space missing in default value assignment. | |
delim=nil, heredoc=false ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:201:33: C: Space inside parentheses detected. | |
delim=nil, heredoc=false ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:202:7: C: Incorrect indentation detected (column 6 instead of 8). | |
# begin | |
^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:203:9: C: Favor [33munless[0m over [33mif[0m for negative conditions. | |
if !delim | |
^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:205:24: C: Space inside parentheses detected. | |
delim = scan( /./ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:205:28: C: Space inside parentheses detected. | |
delim = scan( /./ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:209:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when '{' then '}' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:210:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when '(' then ')' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:211:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when '[' then ']' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:212:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when '<' then '>' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:219:17: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
items = "\\\\|" | |
^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:221:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
items << "(^" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:227:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
items << "|#(\\$|@@?|\\{)" if exprs | |
^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:228:28: C: Space inside parentheses detected. | |
items = Regexp.new( items ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:228:34: C: Space inside parentheses detected. | |
items = Regexp.new( items ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:232:30: C: Space inside parentheses detected. | |
match = scan_until( items ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:232:36: C: Space inside parentheses detected. | |
match = scan_until( items ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:234:49: C: Space inside parentheses detected. | |
start_group inner_group, scan_until( /\Z/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:234:54: C: Space inside parentheses detected. | |
start_group inner_group, scan_until( /\Z/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:240:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "\\" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:240:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "\\" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:241:17: C: Never use [33munless[0m with [33melse[0m. Rewrite these with the positive case first. | |
unless exprs | |
^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:242:19: C: Avoid more than 3 levels of block nesting. | |
case peek(1) | |
^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:243:21: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "'" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:246:21: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when "\\" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:246:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
when "\\" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:248:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
start_group :escape, "\\\\" | |
^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:250:48: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
start_group inner_group, "\\" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:253:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
start_group :escape, "\\" | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:256:19: C: Avoid more than 3 levels of block nesting. | |
case c | |
^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:257:21: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when 'x' | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:258:35: C: Space inside parentheses detected. | |
append scan( /[a-fA-F0-9]{1,2}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:258:54: C: Space inside parentheses detected. | |
append scan( /[a-fA-F0-9]{1,2}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:259:21: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /[0-7]/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:260:35: C: Space inside parentheses detected. | |
append scan( /[0-7]{0,2}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:260:48: C: Space inside parentheses detected. | |
append scan( /[0-7]{0,2}/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:263:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when delim | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:267:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /^#/ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:272:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when ?{ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:272:24: C: Do not use the character literal - use string literal instead. | |
when ?{ | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:274:31: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
content = "" | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:275:21: C: Avoid more than 3 levels of block nesting. | |
while depth > 0 | |
^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:277:38: C: Space inside parentheses detected. | |
c = scan_until( /[\{}]/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:277:46: C: Space inside parentheses detected. | |
c = scan_until( /[\{}]/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:279:47: C: Space inside parentheses detected. | |
content << scan_until( /\Z/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:279:52: C: Space inside parentheses detected. | |
content << scan_until( /\Z/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:282:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
depth += ( matched == "{" ? 1 : -1 ) | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:282:59: C: Space inside parentheses detected. | |
depth += ( matched == "{" ? 1 : -1 ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:287:21: C: Avoid more than 3 levels of block nesting. | |
if do_highlight | |
^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:288:35: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
subtokenize "ruby", content | |
^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:289:42: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
start_group :expr, "}" | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:291:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
append content + "}" | |
^^^ | |
lib/ext/highlighter/lang/ruby.rb:293:19: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when ?$, ?@ | |
^^^^ | |
lib/ext/highlighter/lang/ruby.rb:293:24: C: Do not use the character literal - use string literal instead. | |
when ?$, ?@ | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:293:28: C: Do not use the character literal - use string literal instead. | |
when ?$, ?@ | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:294:33: C: Space inside parentheses detected. | |
append scan( /\w+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:294:39: C: Space inside parentheses detected. | |
append scan( /\w+/ ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:297:20: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
else raise "unexpected match on #{matched}" | |
^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:308:7: C: Inconsistent indentation detected. | |
def scan_heredoc(float, type, delim) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:309:31: C: Space inside parentheses detected. | |
scan_delimited_region( :constant, :string, "", type != "'", | |
^ | |
lib/ext/highlighter/lang/ruby.rb:309:52: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
scan_delimited_region( :constant, :string, "", type != "'", | |
^^ | |
lib/ext/highlighter/lang/ruby.rb:310:11: C: Align the parameters of a method call if they span more than one line. | |
delim, float ? :float : :flush ) | |
^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:310:41: C: Space inside parentheses detected. | |
delim, float ? :float : :flush ) | |
^ | |
lib/ext/highlighter/lang/ruby.rb:314:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
SYNTAX["ruby"] = Ruby | |
^^^^^^ | |
lib/ext/highlighter/lang/ruby.rb:315:1: C: Extra empty line detected at body end. | |
lib/ext/highlighter.rb:1:1: C: Missing top-level module documentation comment. | |
module ::HH end | |
^^^^^^ | |
lib/ext/highlighter.rb:1:8: C: Use nested module/class definitions instead of compact style. | |
module ::HH end | |
^^^^ | |
lib/shoes/gradient.rb:2:3: C: Missing top-level class documentation comment. | |
class Gradient | |
^^^^^ | |
lib/shoes/gradient.rb:17:34: C: Redundant [33mself[0m detected. | |
other.is_a?(self.class) && self.to_s == other.to_s | |
^^^^^^^^^ | |
lib/shoes/list_box.rb:2:3: C: Missing top-level class documentation comment. | |
class ListBox | |
^^^^^ | |
lib/shoes/list_box.rb:7:14: C: Space inside { missing. | |
STYLES = {width: 200, height: 20, items: [""]} | |
^ | |
lib/shoes/list_box.rb:7:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
STYLES = {width: 200, height: 20, items: [""]} | |
^^ | |
lib/shoes/list_box.rb:7:50: C: Space inside } missing. | |
STYLES = {width: 200, height: 20, items: [""]} | |
^ | |
lib/shoes/list_box.rb:21:7: C: Redundant [33mself[0m detected. | |
self.change &blk if blk | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/list_box.rb:21:19: W: 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. | |
self.change &blk if blk | |
^ | |
lib/shoes/list_box.rb:23:41: C: [33mHash#has_key?[0m is deprecated in favor of [33mHash#key?[0m. | |
choose(@style[:choose]) if @style.has_key?(:choose) | |
^^^^^^^^ | |
lib/shoes/list_box.rb:43:1: C: Trailing whitespace detected. | |
lib/shoes/list_box.rb:45:1: C: Trailing whitespace detected. | |
lib/shoes/text_block.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/text_block.rb:2:12: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
CENTER = "center".freeze | |
^^^^^^^^ | |
lib/shoes/text_block.rb:3:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
DEFAULT_TEXTBLOCK_FONT = "Arial" | |
^^^^^^^ | |
lib/shoes/text_block.rb:5:3: C: Missing top-level class documentation comment. | |
class TextBlock | |
^^^^^ | |
lib/shoes/text_block.rb:11:16: C: Put one space between the method name and the first argument. | |
attr_reader :gui, :parent, :text, :contents, :app, :text_styles, :dimensions | |
^^^ | |
lib/shoes/text_block.rb:11:81: C: Line is too long. [82/80] | |
attr_reader :gui, :parent, :text, :contents, :app, :text_styles, :dimensions | |
^^ | |
lib/shoes/text_block.rb:14:14: C: Space inside { missing. | |
STYLES = {font: "Arial"} # used in TextBlock specs only | |
^ | |
lib/shoes/text_block.rb:14:21: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
STYLES = {font: "Arial"} # used in TextBlock specs only | |
^^^^^^^ | |
lib/shoes/text_block.rb:14:28: C: Space inside } missing. | |
STYLES = {font: "Arial"} # used in TextBlock specs only | |
^ | |
lib/shoes/text_block.rb:39:15: W: 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:45:20: W: 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:53:7: C: Redundant [33mself[0m detected. | |
self.text | |
^^^^^^^^^ | |
lib/shoes/text_block.rb:56:44: C: Surrounding space missing in default value assignment. | |
def contents_alignment(current_position=nil) | |
^ | |
lib/shoes/text_block.rb:68:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def has_textcursor? | |
^^^ | |
lib/shoes/text_block.rb:68:9: C: Rename [33mhas_textcursor?[0m to [33mtextcursor?[0m. | |
def has_textcursor? | |
^^^^^^^^^^^^^^^ | |
lib/shoes/text_block.rb:86:5: C: Method has too many lines. [12/10] | |
def gather_text_styles(parent, texts, styles={}, start_point=0) | |
^^^ | |
lib/shoes/text_block.rb:86:49: C: Surrounding space missing in default value assignment. | |
def gather_text_styles(parent, texts, styles={}, start_point=0) | |
^ | |
lib/shoes/text_block.rb:86:65: C: Surrounding space missing in default value assignment. | |
def gather_text_styles(parent, texts, styles={}, start_point=0) | |
^ | |
lib/shoes/text_block.rb:102:53: C: Missing space after #. | |
parse_font_style style[:font] if style[:font] #if is needed for the specs | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/text_block.rb:109:42: C: Space missing after comma. | |
font_family = type.gsub(style_regex,'').gsub(size_regex,''). | |
^ | |
lib/shoes/text_block.rb:109:62: C: Space missing after comma. | |
font_family = type.gsub(style_regex,'').gsub(size_regex,''). | |
^ | |
lib/shoes/text_block.rb:109:66: C: Place the . on the next line, together with the method name. | |
font_family = type.gsub(style_regex,'').gsub(size_regex,''). | |
^ | |
lib/shoes/text_block.rb:110:58: C: Space missing after comma. | |
split(',').map { |x| x.strip.gsub(/["]/,'') } | |
^ | |
lib/shoes/text_block.rb:112:71: C: Use [33m&&[0m instead of [33mand[0m. | |
@style[:font] = font_family.first unless (font_family.size == 1 and | |
^^^ | |
lib/shoes/text_block.rb:113:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
font_family[0] == "") or font_family.size == 0 | |
^^ | |
lib/shoes/text_block.rb:113:31: C: Use [33m||[0m instead of [33mor[0m. | |
font_family[0] == "") or font_family.size == 0 | |
^^ | |
lib/shoes/text_block.rb:123:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Banner" => { size: 48 }, | |
^^^^^^^^ | |
lib/shoes/text_block.rb:124:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Title" => { size: 34 }, | |
^^^^^^^ | |
lib/shoes/text_block.rb:125:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Subtitle" => { size: 26 }, | |
^^^^^^^^^^ | |
lib/shoes/text_block.rb:126:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Tagline" => { size: 18 }, | |
^^^^^^^^^ | |
lib/shoes/text_block.rb:127:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Caption" => { size: 14 }, | |
^^^^^^^^^ | |
lib/shoes/text_block.rb:128:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Para" => { size: 12 }, | |
^^^^^^ | |
lib/shoes/text_block.rb:129:5: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"Inscription" => { size: 10 } | |
^^^^^^^^^^^^^ | |
lib/shoes/text_block.rb:132:7: C: Redundant [33mself[0m detected. | |
self.const_set("STYLES", { font: "Arial", fill: nil }.merge(styles)) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/text_block.rb:132:22: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
self.const_set("STYLES", { font: "Arial", fill: nil }.merge(styles)) | |
^^^^^^^^ | |
lib/shoes/text_block.rb:132:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
self.const_set("STYLES", { font: "Arial", fill: nil }.merge(styles)) | |
^^^^^^^ | |
lib/shoes/text_block.rb:136:1: C: Extra empty line detected at body end. | |
lib/shoes/slot_contents.rb:2:3: C: Missing top-level class documentation comment. | |
class SlotContents < SimpleDelegator | |
^^^^^ | |
lib/shoes/slot_contents.rb:37:81: C: Line is too long. [106/80] | |
super.insert(-2, " @size=#{size} @prepending=#{@prepending} @prepending_index=#{@prepending_index}") | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/slot_contents.rb:40:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/animation.rb:2:3: C: Missing top-level class documentation comment. | |
class Animation | |
^^^^^ | |
lib/shoes/animation.rb:33:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def stopped? | |
^^^ | |
lib/shoes/animation.rb:38:5: C: Use 2 (not 1) spaces for indentation. | |
@stopped = !@stopped | |
^ | |
lib/shoes/animation.rb:45:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def removed? | |
^^^ | |
lib/shoes/line.rb:2:3: C: Missing top-level class documentation comment. | |
class Line | |
^^^^^ | |
lib/shoes/line.rb:10:1: C: Extra blank line detected. | |
lib/shoes/line.rb:11:5: C: Method has too many lines. [12/10] | |
def initialize(app, parent, point_a, point_b, opts = {}, blk = nil) | |
^^^ | |
lib/shoes/line.rb:11:19: C: Avoid parameter lists longer than 5 parameters. | |
def initialize(app, parent, point_a, point_b, opts = {}, blk = nil) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:5:1: C: Missing top-level class documentation comment. | |
class Array | |
^^^^^ | |
lib/shoes/ui/help.rb:6:9: C: Use def with parentheses when there are parameters. | |
def / len | |
^^^ | |
lib/shoes/ui/help.rb:6:9: C: When defining the [33m/[0m operator, name its argument [33mother[0m. | |
def / len | |
^^^ | |
lib/shoes/ui/help.rb:26:1: C: Class definition is too long. [460/100] | |
class Manual < Shoes | |
^^^^^ | |
lib/shoes/ui/help.rb:26:1: C: Missing top-level class documentation comment. | |
class Manual < Shoes | |
^^^^^ | |
lib/shoes/ui/help.rb:32:13: C: Use def with parentheses when there are parameters. | |
def index pnum = 0 | |
^^^^^^^^ | |
lib/shoes/ui/help.rb:33:5: C: Missing space after #. | |
#font LANG == 'ja' ? 'MS UI Gothic' : 'Arial' | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:34:5: C: Missing space after #. | |
#style Link, underline: false, weight: 'bold' | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:35:5: C: Missing space after #. | |
#style LinkHover, stroke: '#06E' | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:37:14: C: Do not use semicolons to terminate expressions. | |
TOC.clear; TOC_LIST.clear | |
^ | |
lib/shoes/ui/help.rb:38:27: C: Space missing to the left of {. | |
table_of_contents.each{|toc| TOC << toc} | |
^ | |
lib/shoes/ui/help.rb:38:27: C: Space between { and | missing. | |
table_of_contents.each{|toc| TOC << toc} | |
^^ | |
lib/shoes/ui/help.rb:38:44: C: Space missing inside }. | |
table_of_contents.each{|toc| TOC << toc} | |
^ | |
lib/shoes/ui/help.rb:39:45: C: Space inside parentheses detected. | |
pnum == '999' ? mk_search_page : manual( *get_title_and_desc(pnum.to_i) ) | |
^ | |
lib/shoes/ui/help.rb:39:76: C: Space inside parentheses detected. | |
pnum == '999' ? mk_search_page : manual( *get_title_and_desc(pnum.to_i) ) | |
^ | |
lib/shoes/ui/help.rb:42:26: C: Use def with parentheses when there are parameters. | |
def get_title_and_desc pnum | |
^^^^ | |
lib/shoes/ui/help.rb:47:7: C: Align the elements of an array literal if they span more than one line. | |
DOCS[chapter][1][:sections][section][1][:description], | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:48:7: C: Align the elements of an array literal if they span more than one line. | |
DOCS[chapter][1][:sections][section][1][:methods]] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:57:81: C: Line is too long. [90/80] | |
title = section ? DOCS[chapter][1][:sections][section][1][:title] : DOCS[chapter][0] | |
^^^^^^^^^^ | |
lib/shoes/ui/help.rb:60:36: C: Space missing to the left of {. | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^ | |
lib/shoes/ui/help.rb:60:37: C: Space missing inside {. | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^ | |
lib/shoes/ui/help.rb:60:60: C: Space missing inside }. | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^ | |
lib/shoes/ui/help.rb:60:81: C: Line is too long. [127/80] | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:60:96: C: Space missing to the left of {. | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^ | |
lib/shoes/ui/help.rb:60:97: C: Space missing inside {. | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^ | |
lib/shoes/ui/help.rb:60:120: C: Space missing inside }. | |
section ? [' ', link(title){visit "/manual/#{pnum}"}, "\n"] : [link(fg(title, magenta)){visit "/manual/#{pnum}"}, "\n"] | |
^ | |
lib/shoes/ui/help.rb:64:3: C: Method has too many lines. [13/10] | |
def manual pnum, docs_title, docs_description, docs_methods | |
^^^ | |
lib/shoes/ui/help.rb:64:14: C: Use def with parentheses when there are parameters. | |
def manual pnum, docs_title, docs_description, docs_methods | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:72:25: C: Space missing to the left of {. | |
para link('top'){visit "/manual/0"}, " ", | |
^ | |
lib/shoes/ui/help.rb:72:26: C: Space missing inside {. | |
para link('top'){visit "/manual/0"}, " ", | |
^ | |
lib/shoes/ui/help.rb:72:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
para link('top'){visit "/manual/0"}, " ", | |
^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:72:43: C: Space missing inside }. | |
para link('top'){visit "/manual/0"}, " ", | |
^ | |
lib/shoes/ui/help.rb:72:46: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
para link('top'){visit "/manual/0"}, " ", | |
^^^^ | |
lib/shoes/ui/help.rb:73:11: C: Align the parameters of a method call if they span more than one line. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:73:23: C: Space missing to the left of {. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:73:24: C: Space missing inside {. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:73:46: C: Surrounding space missing for operator '-'. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:73:49: C: Surrounding space missing for operator '%'. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:73:56: C: Space missing inside }. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:73:59: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
link('prev'){visit "/manual/#{(pnum-1)%PEND}"}, " ", | |
^^^^ | |
lib/shoes/ui/help.rb:74:11: C: Align the parameters of a method call if they span more than one line. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:74:23: C: Space missing to the left of {. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:74:24: C: Space missing inside {. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:74:46: C: Surrounding space missing for operator '+'. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:74:49: C: Surrounding space missing for operator '%'. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:74:56: C: Space missing inside }. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^ | |
lib/shoes/ui/help.rb:74:59: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
link('next'){visit "/manual/#{(pnum+1)%PEND}"}, " ", | |
^^^^ | |
lib/shoes/ui/help.rb:75:11: C: Align the parameters of a method call if they span more than one line. | |
link('end'){visit "/manual/#{PEND-1}"} | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:75:22: C: Space missing to the left of {. | |
link('end'){visit "/manual/#{PEND-1}"} | |
^ | |
lib/shoes/ui/help.rb:75:23: C: Space missing inside {. | |
link('end'){visit "/manual/#{PEND-1}"} | |
^ | |
lib/shoes/ui/help.rb:75:44: C: Surrounding space missing for operator '-'. | |
link('end'){visit "/manual/#{PEND-1}"} | |
^ | |
lib/shoes/ui/help.rb:75:48: C: Space missing inside }. | |
link('end'){visit "/manual/#{PEND-1}"} | |
^ | |
lib/shoes/ui/help.rb:80:19: C: Use def with parentheses when there are parameters. | |
def show_header docs_title | |
^^^^^^^^^^ | |
lib/shoes/ui/help.rb:87:81: C: 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: Method has too many lines. [11/10] | |
def show_toc | |
^^^ | |
lib/shoes/ui/help.rb:96:73: C: Space missing to the left of {. | |
inscription "Not findng it?\n", 'Try ', link(fg 'Search', white){visit '/manual/999'}, '!', align: 'center', stroke: lightgray | |
^ | |
lib/shoes/ui/help.rb:96:74: C: Space missing inside {. | |
inscription "Not findng it?\n", 'Try ', link(fg 'Search', white){visit '/manual/999'}, '!', align: 'center', stroke: lightgray | |
^ | |
lib/shoes/ui/help.rb:96:81: C: Line is too long. [134/80] | |
inscription "Not findng it?\n", 'Try ', link(fg 'Search', white){visit '/manual/999'}, '!', align: 'center', stroke: lightgray | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:96:93: C: Space missing inside }. | |
inscription "Not findng it?\n", 'Try ', link(fg 'Search', white){visit '/manual/999'}, '!', align: 'center', stroke: lightgray | |
^ | |
lib/shoes/ui/help.rb:98:24: C: Space missing to the left of {. | |
stack(height: 10){} | |
^ | |
lib/shoes/ui/help.rb:99:12: W: 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:100:37: C: Space missing to the left of {. | |
para link(fg 'to_html', green){s.html_manual} | |
^ | |
lib/shoes/ui/help.rb:100:38: C: Space missing inside {. | |
para link(fg 'to_html', green){s.html_manual} | |
^ | |
lib/shoes/ui/help.rb:100:51: C: Space missing inside }. | |
para link(fg 'to_html', green){s.html_manual} | |
^ | |
lib/shoes/ui/help.rb:104:3: C: Method has too many lines. [13/10] | |
def show_methods docs_methods, term = nil | |
^^^ | |
lib/shoes/ui/help.rb:104:20: C: Use def with parentheses when there are parameters. | |
def show_methods docs_methods, term = nil | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:110:81: C: 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: Method has too many lines. [31/10] | |
def show_page paras, intro = false, term = nil | |
^^^ | |
lib/shoes/ui/help.rb:120:17: C: Use def with parentheses when there are parameters. | |
def show_page paras, intro = false, term = nil | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:127:11: W: Do not use prefix [33m_[0m for a variable that is used. | |
_code = lines[n...-1].join(NL+' ') | |
^^^^^ | |
lib/shoes/ui/help.rb:127:40: C: Surrounding space missing for operator '+'. | |
_code = lines[n...-1].join(NL+' ') | |
^ | |
lib/shoes/ui/help.rb:130:54: C: Space missing to the left of {. | |
inscription link(fg('Run this', magenta)){eval s.mk_executable(_code), TOPLEVEL_BINDING}, ' ', align: 'right' | |
^ | |
lib/shoes/ui/help.rb:130:55: W: 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:55: C: Space missing inside {. | |
inscription link(fg('Run this', magenta)){eval s.mk_executable(_code), TOPLEVEL_BINDING}, ' ', align: 'right' | |
^ | |
lib/shoes/ui/help.rb:130:81: C: Line is too long. [122/80] | |
inscription link(fg('Run this', magenta)){eval s.mk_executable(_code), TOPLEVEL_BINDING}, ' ', align: 'right' | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:130:100: C: Space missing inside }. | |
inscription link(fg('Run this', magenta)){eval s.mk_executable(_code), TOPLEVEL_BINDING}, ' ', align: 'right' | |
^ | |
lib/shoes/ui/help.rb:134:20: W: 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:53: C: Space missing to the left of {. | |
para *highlight(' ' + _code, nil).map{|e| code e}, NL * 2, margin: [-10, 10, 0, 20] | |
^ | |
lib/shoes/ui/help.rb:134:53: C: Space between { and | missing. | |
para *highlight(' ' + _code, nil).map{|e| code e}, NL * 2, margin: [-10, 10, 0, 20] | |
^^ | |
lib/shoes/ui/help.rb:134:64: C: Space missing inside }. | |
para *highlight(' ' + _code, nil).map{|e| code e}, NL * 2, margin: [-10, 10, 0, 20] | |
^ | |
lib/shoes/ui/help.rb:134:81: C: Line is too long. [98/80] | |
para *highlight(' ' + _code, nil).map{|e| code e}, NL * 2, margin: [-10, 10, 0, 20] | |
^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:144:9: C: Avoid the use of Perl-style backrefs. | |
$1.split(/^ \* /).each do |txt| | |
^^ | |
lib/shoes/ui/help.rb:146:27: C: Space missing to the left of {. | |
flow(width: 510){show_paragraph txt, intro, i, term} | |
^ | |
lib/shoes/ui/help.rb:146:28: C: Space missing inside {. | |
flow(width: 510){show_paragraph txt, intro, i, term} | |
^ | |
lib/shoes/ui/help.rb:146:62: C: Space missing inside }. | |
flow(width: 510){show_paragraph txt, intro, i, term} | |
^ | |
lib/shoes/ui/help.rb:155:3: C: 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: Method has too many lines. [16/10] | |
def show_paragraph txt, intro, i, term = nil | |
^^^ | |
lib/shoes/ui/help.rb:155:22: C: Use def with parentheses when there are parameters. | |
def show_paragraph txt, intro, i, term = nil | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:157:44: C: Space missing to the left of {. | |
txts = txt.split(/(\[\[\S+?\]\])/m).map{|s| s.split(/(\[\[\S+? .+?\]\])/m)}.flatten | |
^ | |
lib/shoes/ui/help.rb:157:44: C: Space between { and | missing. | |
txts = txt.split(/(\[\[\S+?\]\])/m).map{|s| s.split(/(\[\[\S+? .+?\]\])/m)}.flatten | |
^^ | |
lib/shoes/ui/help.rb:157:79: C: Space missing inside }. | |
txts = txt.split(/(\[\[\S+?\]\])/m).map{|s| s.split(/(\[\[\S+? .+?\]\])/m)}.flatten | |
^ | |
lib/shoes/ui/help.rb:157:81: C: Line is too long. [87/80] | |
txts = txt.split(/(\[\[\S+?\]\])/m).map{|s| s.split(/(\[\[\S+? .+?\]\])/m)}.flatten | |
^^^^^^^ | |
lib/shoes/ui/help.rb:159:28: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A==== (.+) ====/; caption *marker($1, term), size: 24 | |
^ | |
lib/shoes/ui/help.rb:159:38: W: 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==== (.+) ====/; caption *marker($1, term), size: 24 | |
^ | |
lib/shoes/ui/help.rb:159:46: C: Avoid the use of Perl-style backrefs. | |
when /\A==== (.+) ====/; caption *marker($1, term), size: 24 | |
^^ | |
lib/shoes/ui/help.rb:160:26: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A=== (.+) ===/; tagline *marker($1, term), size: 12, weight: 'bold' | |
^ | |
lib/shoes/ui/help.rb:160:36: W: 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=== (.+) ===/; tagline *marker($1, term), size: 12, weight: 'bold' | |
^ | |
lib/shoes/ui/help.rb:160:44: C: Avoid the use of Perl-style backrefs. | |
when /\A=== (.+) ===/; tagline *marker($1, term), size: 12, weight: 'bold' | |
^^ | |
lib/shoes/ui/help.rb:161:24: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A== (.+) ==/; subtitle *marker($1, term) | |
^ | |
lib/shoes/ui/help.rb:161:35: W: 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== (.+) ==/; subtitle *marker($1, term) | |
^ | |
lib/shoes/ui/help.rb:161:43: C: Avoid the use of Perl-style backrefs. | |
when /\A== (.+) ==/; subtitle *marker($1, term) | |
^^ | |
lib/shoes/ui/help.rb:162:22: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A= (.+) =/; title *marker($1, term) | |
^ | |
lib/shoes/ui/help.rb:162:30: W: 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= (.+) =/; title *marker($1, term) | |
^ | |
lib/shoes/ui/help.rb:162:38: C: Avoid the use of Perl-style backrefs. | |
when /\A= (.+) =/; title *marker($1, term) | |
^^ | |
lib/shoes/ui/help.rb:163:24: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A\{COLORS\}/; flow{color_page} | |
^ | |
lib/shoes/ui/help.rb:163:30: C: Space missing to the left of {. | |
when /\A\{COLORS\}/; flow{color_page} | |
^ | |
lib/shoes/ui/help.rb:163:31: C: Space missing inside {. | |
when /\A\{COLORS\}/; flow{color_page} | |
^ | |
lib/shoes/ui/help.rb:163:41: C: Space missing inside }. | |
when /\A\{COLORS\}/; flow{color_page} | |
^ | |
lib/shoes/ui/help.rb:164:25: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A\{SAMPLES\}/; flow{sample_page} | |
^ | |
lib/shoes/ui/help.rb:164:31: C: Space missing to the left of {. | |
when /\A\{SAMPLES\}/; flow{sample_page} | |
^ | |
lib/shoes/ui/help.rb:164:32: C: Space missing inside {. | |
when /\A\{SAMPLES\}/; flow{sample_page} | |
^ | |
lib/shoes/ui/help.rb:164:43: C: Space missing inside }. | |
when /\A\{SAMPLES\}/; flow{sample_page} | |
^ | |
lib/shoes/ui/help.rb:166:12: W: 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 and i.zero?) ? {size: 16} : '' | |
^ | |
lib/shoes/ui/help.rb:166:63: C: Use [33m&&[0m instead of [33mand[0m. | |
para *mk_deco(mk_links(txts, term).flatten), NL, (intro and i.zero?) ? {size: 16} : '' | |
^^^ | |
lib/shoes/ui/help.rb:166:78: C: Space inside { missing. | |
para *mk_deco(mk_links(txts, term).flatten), NL, (intro and i.zero?) ? {size: 16} : '' | |
^ | |
lib/shoes/ui/help.rb:166:81: C: Line is too long. [92/80] | |
para *mk_deco(mk_links(txts, term).flatten), NL, (intro and i.zero?) ? {size: 16} : '' | |
^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:166:87: C: Space inside } missing. | |
para *mk_deco(mk_links(txts, term).flatten), NL, (intro and i.zero?) ? {size: 16} : '' | |
^ | |
lib/shoes/ui/help.rb:168:40: C: Avoid the use of Perl-style backrefs. | |
image File.join(DIR, "static/#{$3}"), eval("{#{$2 or "margin_left: 50"}}") | |
^^ | |
lib/shoes/ui/help.rb:168:47: W: The use of [33meval[0m is a serious security risk. | |
image File.join(DIR, "static/#{$3}"), eval("{#{$2 or "margin_left: 50"}}") | |
^^^^ | |
lib/shoes/ui/help.rb:168:56: C: Avoid the use of Perl-style backrefs. | |
image File.join(DIR, "static/#{$3}"), eval("{#{$2 or "margin_left: 50"}}") | |
^^ | |
lib/shoes/ui/help.rb:168:59: C: Use [33m||[0m instead of [33mor[0m. | |
image File.join(DIR, "static/#{$3}"), eval("{#{$2 or "margin_left: 50"}}") | |
^^ | |
lib/shoes/ui/help.rb:168:62: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
image File.join(DIR, "static/#{$3}"), eval("{#{$2 or "margin_left: 50"}}") | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:168:81: C: Line is too long. [82/80] | |
image File.join(DIR, "static/#{$3}"), eval("{#{$2 or "margin_left: 50"}}") | |
^^ | |
lib/shoes/ui/help.rb:174:16: C: Use def with parentheses when there are parameters. | |
def mk_links txts, term = nil | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:175:13: C: Space missing to the left of {. | |
txts.map{|txt| txt.gsub(IMAGE_RE, '')}. | |
^ | |
lib/shoes/ui/help.rb:175:13: C: Space between { and | missing. | |
txts.map{|txt| txt.gsub(IMAGE_RE, '')}. | |
^^ | |
lib/shoes/ui/help.rb:175:42: C: Space missing inside }. | |
txts.map{|txt| txt.gsub(IMAGE_RE, '')}. | |
^ | |
lib/shoes/ui/help.rb:175:43: C: Place the . on the next line, together with the method name. | |
txts.map{|txt| txt.gsub(IMAGE_RE, '')}. | |
^ | |
lib/shoes/ui/help.rb:176:10: C: Space missing to the left of {. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:10: C: Space between { and | missing. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^^ | |
lib/shoes/ui/help.rb:176:49: C: Avoid the use of Perl-style backrefs. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^^ | |
lib/shoes/ui/help.rb:176:62: C: Do not use semicolons to terminate expressions. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:73: W: 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 = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:81: C: Line is too long. [141/80] | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:176:95: C: Space missing to the left of {. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:96: C: Space missing inside {. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:132: C: Space missing inside }. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:140: C: Space missing inside }. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:176:141: C: Place the . on the next line, together with the method name. | |
map{|txt| txt =~ /\[\[(\S+?)\]\]/m ? (t = $1.split('.'); link(ins *marker(t.last, term)){visit "/manual/#{find_pnum t.first}"}) : txt}. | |
^ | |
lib/shoes/ui/help.rb:177:10: C: Avoid using {...} for multi-line blocks. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^ | |
lib/shoes/ui/help.rb:177:17: C: Block body expression is on the same line as the block start. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:177:57: C: Avoid the use of Perl-style backrefs. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^^ | |
lib/shoes/ui/help.rb:177:59: C: Do not use semicolons to terminate expressions. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^ | |
lib/shoes/ui/help.rb:177:70: W: 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 ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^ | |
lib/shoes/ui/help.rb:177:78: C: Avoid the use of Perl-style backrefs. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^^ | |
lib/shoes/ui/help.rb:177:81: C: Line is too long. [147/80] | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:177:88: C: Space missing to the left of {. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^ | |
lib/shoes/ui/help.rb:177:89: C: Space missing inside {. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^ | |
lib/shoes/ui/help.rb:177:95: C: Ternary operators must not be nested. Prefer [33mif[0m/[33melse[0m constructs instead. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:177:144: C: Space missing inside }. | |
map{|txt| txt =~ /\[\[(\S+?) (.+?)\]\]/m ? (url = $1; link(ins *marker($2, term)){visit url =~ /^http/ ? url : "/manual/#{find_pnum url}"}) : | |
^ | |
lib/shoes/ui/help.rb:178:8: C: 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:178:52: C: Expression at 178, 52 should be on its own line. | |
(txt.is_a?(String) ? marker(txt, term) : txt)} | |
^ | |
lib/shoes/ui/help.rb:181:16: C: Use def with parentheses when there are parameters. | |
def mk_paras str | |
^^^ | |
lib/shoes/ui/help.rb:185:21: C: Use def with parentheses when there are parameters. | |
def mk_executable code | |
^^^^ | |
lib/shoes/ui/help.rb:193:3: C: Method has too many lines. [11/10] | |
def color_page | |
^^^ | |
lib/shoes/ui/help.rb:200:9: C: Missing space after #. | |
#para fg(strong(color), c), align: 'center' | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:212:81: C: 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:213:46: C: Space missing to the left of {. | |
Dir.chdir(File.join DIR, 'samples'){instance_eval(IO.read(file),file,0)} | |
^ | |
lib/shoes/ui/help.rb:213:47: C: Space missing inside {. | |
Dir.chdir(File.join DIR, 'samples'){instance_eval(IO.read(file),file,0)} | |
^ | |
lib/shoes/ui/help.rb:213:74: C: Space missing after comma. | |
Dir.chdir(File.join DIR, 'samples'){instance_eval(IO.read(file),file,0)} | |
^ | |
lib/shoes/ui/help.rb:213:79: C: Space missing after comma. | |
Dir.chdir(File.join DIR, 'samples'){instance_eval(IO.read(file),file,0)} | |
^ | |
lib/shoes/ui/help.rb:213:81: C: Line is too long. [82/80] | |
Dir.chdir(File.join DIR, 'samples'){instance_eval(IO.read(file),file,0)} | |
^^ | |
lib/shoes/ui/help.rb:213:82: C: Space missing inside }. | |
Dir.chdir(File.join DIR, 'samples'){instance_eval(IO.read(file),file,0)} | |
^ | |
lib/shoes/ui/help.rb:223:51: C: Avoid using {...} for multi-line blocks. | |
dummy_name = orig_name.sub(/sample(.*)\.rb/){ | |
^ | |
lib/shoes/ui/help.rb:224:25: C: Avoid the use of Perl-style backrefs. | |
first, second = $1.split('-') | |
^^ | |
lib/shoes/ui/help.rb:225:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"%02d%s%s" % [first.to_i, ('-' if second), second] | |
^^^^^^^^^^ | |
lib/shoes/ui/help.rb:225:20: C: Favor [33mformat[0m over [33mString#%[0m. | |
"%02d%s%s" % [first.to_i, ('-' if second), second] | |
^ | |
lib/shoes/ui/help.rb:228:18: W: 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:231:17: C: Use def with parentheses when there are parameters. | |
def find_pnum page | |
^^^^ | |
lib/shoes/ui/help.rb:234:14: W: 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:239:3: C: Method has too many lines. [13/10] | |
def self.load_docs path | |
^^^ | |
lib/shoes/ui/help.rb:239:22: C: Use def with parentheses when there are parameters. | |
def self.load_docs path | |
^^^^ | |
lib/shoes/ui/help.rb:240:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
str = IO.read(path).force_encoding("UTF-8") | |
^^^^^^^ | |
lib/shoes/ui/help.rb:241:36: C: Surrounding space missing for operator '/'. | |
(str.split(/^= (.+?) =/)[1..-1]/2).map do |k, v| | |
^ | |
lib/shoes/ui/help.rb:243:32: C: Surrounding space missing for operator '/'. | |
sections = (sparts[1..-1]/2).map do |k2, v2| | |
^ | |
lib/shoes/ui/help.rb:246:9: W: Useless assignment to variable - [33mmeth_plain[0m. | |
meth_plain = meth[0].gsub(IMAGE_RE, '') | |
^^^^^^^^^^ | |
lib/shoes/ui/help.rb:247:13: C: Space inside { missing. | |
h = {title: k2, section: k, description: meth[0], methods: (meth[1..-1]/2)} | |
^ | |
lib/shoes/ui/help.rb:247:80: C: Surrounding space missing for operator '/'. | |
h = {title: k2, section: k, description: meth[0], methods: (meth[1..-1]/2)} | |
^ | |
lib/shoes/ui/help.rb:247:81: C: Line is too long. [83/80] | |
h = {title: k2, section: k, description: meth[0], methods: (meth[1..-1]/2)} | |
^^^ | |
lib/shoes/ui/help.rb:247:83: C: Space inside } missing. | |
h = {title: k2, section: k, description: meth[0], methods: (meth[1..-1]/2)} | |
^ | |
lib/shoes/ui/help.rb:250:11: C: Space inside { missing. | |
h = {description: sparts[0], sections: sections, class: "toc" + k.downcase.gsub(/\W+/, '')} | |
^ | |
lib/shoes/ui/help.rb:250:63: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h = {description: sparts[0], sections: sections, class: "toc" + k.downcase.gsub(/\W+/, '')} | |
^^^^^ | |
lib/shoes/ui/help.rb:250:81: C: Line is too long. [97/80] | |
h = {description: sparts[0], sections: sections, class: "toc" + k.downcase.gsub(/\W+/, '')} | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:250:97: C: Space inside } missing. | |
h = {description: sparts[0], sections: sections, class: "toc" + k.downcase.gsub(/\W+/, '')} | |
^ | |
lib/shoes/ui/help.rb:255:28: C: Use def with parentheses when there are parameters. | |
def self.mk_page_numbers docs | |
^^^^ | |
lib/shoes/ui/help.rb:266:3: C: Method has too many lines. [15/10] | |
def html_manual | |
^^^ | |
lib/shoes/ui/help.rb:271:5: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
%w[shoes-icon.png shoes-manual-apps.png manual.css code_highlighter.js code_highlighter_ruby.js]. | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:271:81: C: Line is too long. [101/80] | |
%w[shoes-icon.png shoes-manual-apps.png manual.css code_highlighter.js code_highlighter_ruby.js]. | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:271:101: C: Place the . on the next line, together with the method name. | |
%w[shoes-icon.png shoes-manual-apps.png manual.css code_highlighter.js code_highlighter_ruby.js]. | |
^ | |
lib/shoes/ui/help.rb:272:11: C: Space missing to the left of {. | |
each{|x| FileUtils.cp "#{DIR}/static/#{x}", "#{dir}/static"} | |
^ | |
lib/shoes/ui/help.rb:272:11: C: Space between { and | missing. | |
each{|x| FileUtils.cp "#{DIR}/static/#{x}", "#{dir}/static"} | |
^^ | |
lib/shoes/ui/help.rb:272:66: C: Space missing inside }. | |
each{|x| FileUtils.cp "#{DIR}/static/#{x}", "#{dir}/static"} | |
^ | |
lib/shoes/ui/help.rb:273:48: C: Space missing to the left of {. | |
Dir[File.join DIR, 'static/man-*.png'].each{|x| FileUtils.cp x, "#{dir}/static"} | |
^ | |
lib/shoes/ui/help.rb:273:48: C: Space between { and | missing. | |
Dir[File.join DIR, 'static/man-*.png'].each{|x| FileUtils.cp x, "#{dir}/static"} | |
^^ | |
lib/shoes/ui/help.rb:273:81: C: Line is too long. [84/80] | |
Dir[File.join DIR, 'static/man-*.png'].each{|x| FileUtils.cp x, "#{dir}/static"} | |
^^^^ | |
lib/shoes/ui/help.rb:273:84: C: Space missing inside }. | |
Dir[File.join DIR, 'static/man-*.png'].each{|x| FileUtils.cp x, "#{dir}/static"} | |
^ | |
lib/shoes/ui/help.rb:274:53: C: Space missing to the left of {. | |
Dir[File.join DIR, 'snapshots/sample*.png'].each{|x| FileUtils.cp x, "#{dir}/snapshots"} | |
^ | |
lib/shoes/ui/help.rb:274:53: C: Space between { and | missing. | |
Dir[File.join DIR, 'snapshots/sample*.png'].each{|x| FileUtils.cp x, "#{dir}/snapshots"} | |
^^ | |
lib/shoes/ui/help.rb:274:81: C: Line is too long. [92/80] | |
Dir[File.join DIR, 'snapshots/sample*.png'].each{|x| FileUtils.cp x, "#{dir}/snapshots"} | |
^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:274:92: C: Space missing inside }. | |
Dir[File.join DIR, 'snapshots/sample*.png'].each{|x| FileUtils.cp x, "#{dir}/snapshots"} | |
^ | |
lib/shoes/ui/help.rb:279:56: C: Surrounding space missing for operator '+'. | |
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:279:81: C: Line is too long. [106/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:279:81: C: Surrounding space missing for operator '+'. | |
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:285:3: C: 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:285:3: C: Method has too many lines. [92/10] | |
def mk_html title, desc, methods, next_file, next_title, menu | |
^^^ | |
lib/shoes/ui/help.rb:285:3: C: 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:285:15: C: Avoid parameter lists longer than 5 parameters. | |
def mk_html title, desc, methods, next_file, next_title, menu | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:285:15: C: Use def with parentheses when there are parameters. | |
def mk_html title, desc, methods, next_file, next_title, menu | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:288:14: C: Use the new Ruby 1.9 hash syntax. | |
h.html(:lang => Manual::LANG) do | |
^^^^^^^^ | |
lib/shoes/ui/help.rb:292:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.script type: "text/javascript", src: "static/code_highlighter.js" | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:292:50: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.script type: "text/javascript", src: "static/code_highlighter.js" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:293:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.script type: "text/javascript", src: "static/code_highlighter_ruby.js" | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:293:50: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.script type: "text/javascript", src: "static/code_highlighter_ruby.js" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:293:81: C: Line is too long. [82/80] | |
h.script type: "text/javascript", src: "static/code_highlighter_ruby.js" | |
^^ | |
lib/shoes/ui/help.rb:294:25: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.style type: "text/css" do | |
^^^^^^^^^^ | |
lib/shoes/ui/help.rb:305:21: C: Use the new Ruby 1.9 hash syntax. | |
h.div(:class => 'intro') { h << man.manual_p(paras.shift) } | |
^^^^^^^^^ | |
lib/shoes/ui/help.rb:310:26: C: Space missing to the left of {. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^ | |
lib/shoes/ui/help.rb:310:27: C: Space missing inside {. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^ | |
lib/shoes/ui/help.rb:310:46: C: Space missing to the left of {. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^ | |
lib/shoes/ui/help.rb:310:47: C: Space missing inside {. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^ | |
lib/shoes/ui/help.rb:310:54: C: Avoid the use of Perl-style backrefs. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^^ | |
lib/shoes/ui/help.rb:310:76: C: Space missing inside }. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^ | |
lib/shoes/ui/help.rb:310:77: C: Space missing inside }. | |
h.pre{h.code(class: 'rb'){h.text $1.gsub(/^\s*?\n/, '')}} | |
^ | |
lib/shoes/ui/help.rb:313:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A==== (.+) ====/; [:h4, $1] | |
^^^^ | |
lib/shoes/ui/help.rb:313:46: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A==== (.+) ====/; [:h4, $1] | |
^ | |
lib/shoes/ui/help.rb:313:54: C: Avoid the use of Perl-style backrefs. | |
when /\A==== (.+) ====/; [:h4, $1] | |
^^ | |
lib/shoes/ui/help.rb:314:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A=== (.+) ===/; [:h3, $1] | |
^^^^ | |
lib/shoes/ui/help.rb:314:44: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A=== (.+) ===/; [:h3, $1] | |
^ | |
lib/shoes/ui/help.rb:314:52: C: Avoid the use of Perl-style backrefs. | |
when /\A=== (.+) ===/; [:h3, $1] | |
^^ | |
lib/shoes/ui/help.rb:315:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A== (.+) ==/; [:h2, $1] | |
^^^^ | |
lib/shoes/ui/help.rb:315:42: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A== (.+) ==/; [:h2, $1] | |
^ | |
lib/shoes/ui/help.rb:315:50: C: Avoid the use of Perl-style backrefs. | |
when /\A== (.+) ==/; [:h2, $1] | |
^^ | |
lib/shoes/ui/help.rb:316:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A= (.+) =/; [:h1, $1] | |
^^^^ | |
lib/shoes/ui/help.rb:316:40: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when /\A= (.+) =/; [:h1, $1] | |
^ | |
lib/shoes/ui/help.rb:316:48: C: Avoid the use of Perl-style backrefs. | |
when /\A= (.+) =/; [:h1, $1] | |
^^ | |
lib/shoes/ui/help.rb:317:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A\{COLORS\}/ | |
^^^^ | |
lib/shoes/ui/help.rb:319:41: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
f = v.dark? ? "white" : "black" | |
^^^^^^^ | |
lib/shoes/ui/help.rb:319:51: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
f = v.dark? ? "white" : "black" | |
^^^^^^^ | |
lib/shoes/ui/help.rb:320:77: C: 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:320:81: C: Line is too long. [160/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:320:92: C: Space missing to the left of {. | |
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:320:115: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
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:320:133: C: 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:320:160: C: Space missing inside }. | |
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:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A\{SAMPLES\}/ | |
^^^^ | |
lib/shoes/ui/help.rb:325:33: C: Space inside parentheses detected. | |
h.div( :class => 'sample') do | |
^ | |
lib/shoes/ui/help.rb:325:34: C: Use the new Ruby 1.9 hash syntax. | |
h.div( :class => 'sample') do | |
^^^^^^^^^ | |
lib/shoes/ui/help.rb:327:81: C: 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:327:135: C: 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:330:23: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when /\A \* (.+)/m | |
^^^^ | |
lib/shoes/ui/help.rb:331:31: C: Avoid the use of Perl-style backrefs. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^^ | |
lib/shoes/ui/help.rb:331:31: C: Space missing inside {. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^ | |
lib/shoes/ui/help.rb:331:53: C: Space missing to the left of {. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^ | |
lib/shoes/ui/help.rb:331:53: C: Space between { and | missing. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^^ | |
lib/shoes/ui/help.rb:331:80: C: Space missing inside }. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^ | |
lib/shoes/ui/help.rb:331:81: C: Line is too long. [86/80] | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^^^^^^ | |
lib/shoes/ui/help.rb:331:81: C: Space found before semicolon. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^ | |
lib/shoes/ui/help.rb:331:82: C: Do not use semicolons to terminate expressions. | |
h.ul {$1.split(/^ \* /).each{|x| h << man.manual_p(x) }} ; nil | |
^ | |
lib/shoes/ui/help.rb:335:32: C: Space missing to the left of {. | |
h.send(cmd){ h << man.manual_p(str) } if cmd.is_a?(Symbol) | |
^ | |
lib/shoes/ui/help.rb:344:40: C: Surrounding space missing for operator '-'. | |
n ? (sig, val = m[0...n-1], m[n-1..-1]) : (sig, val = m, nil) | |
^ | |
lib/shoes/ui/help.rb:344:48: C: Surrounding space missing for operator '-'. | |
n ? (sig, val = m[0...n-1], m[n-1..-1]) : (sig, val = m, nil) | |
^ | |
lib/shoes/ui/help.rb:357:33: C: Space missing to the left of {. | |
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:357:34: C: Space missing inside {. | |
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:357:41: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
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:357:49: C: 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:357:81: C: Line is too long. [123/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:357:109: C: Space missing inside }. | |
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:360:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.img src: "static/shoes-icon.png" | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:362:21: C: Space missing to the left of {. | |
h.li{h.a(class:'prime', href: "./") { h.text "HELP" }} | |
^ | |
lib/shoes/ui/help.rb:362:22: C: Space missing inside {. | |
h.li{h.a(class:'prime', href: "./") { h.text "HELP" }} | |
^ | |
lib/shoes/ui/help.rb:362:31: C: Space missing after colon. | |
h.li{h.a(class:'prime', href: "./") { h.text "HELP" }} | |
^ | |
lib/shoes/ui/help.rb:362:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.li{h.a(class:'prime', href: "./") { h.text "HELP" }} | |
^^^^ | |
lib/shoes/ui/help.rb:362:62: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
h.li{h.a(class:'prime', href: "./") { h.text "HELP" }} | |
^^^^^^ | |
lib/shoes/ui/help.rb:362:70: C: Space missing inside }. | |
h.li{h.a(class:'prime', href: "./") { h.text "HELP" }} | |
^ | |
lib/shoes/ui/help.rb:365:21: C: Never use [33munless[0m with [33melse[0m. Rewrite these with the positive case first. | |
unless m.is_a?(Array) | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:366:47: C: Space missing inside {. | |
h.a(href: "#{m}.html") {h.text m} | |
^ | |
lib/shoes/ui/help.rb:366:55: C: Space missing inside }. | |
h.a(href: "#{m}.html") {h.text m} | |
^ | |
lib/shoes/ui/help.rb:370:31: C: Space missing to the left of {. | |
h.li{h.a(href: "#{sm}.html") {h.text sm}} | |
^ | |
lib/shoes/ui/help.rb:370:32: C: Space missing inside {. | |
h.li{h.a(href: "#{sm}.html") {h.text sm}} | |
^ | |
lib/shoes/ui/help.rb:370:57: C: Space missing inside {. | |
h.li{h.a(href: "#{sm}.html") {h.text sm}} | |
^ | |
lib/shoes/ui/help.rb:370:66: C: Space missing inside }. | |
h.li{h.a(href: "#{sm}.html") {h.text sm}} | |
^ | |
lib/shoes/ui/help.rb:370:67: C: Space missing inside }. | |
h.li{h.a(href: "#{sm}.html") {h.text sm}} | |
^ | |
lib/shoes/ui/help.rb:372:23: W: [33mend[0m at 372, 22 is not aligned with [33mh.ul(class: 'sub') do[0m at 368, 24 | |
end | |
^^^ | |
lib/shoes/ui/help.rb:386:23: C: Use def with parentheses when there are parameters. | |
def mk_sidebar_list num | |
^^^ | |
lib/shoes/ui/help.rb:390:32: C: Surrounding space missing for operator '+'. | |
toc.push(TOC_LIST[r.first+1..r.last].to_a.map &:first) if r.include?(num) | |
^ | |
lib/shoes/ui/help.rb:390:53: W: 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:395:3: C: Method has too many lines. [19/10] | |
def manual_p str | |
^^^ | |
lib/shoes/ui/help.rb:395:16: C: Use def with parentheses when there are parameters. | |
def manual_p str | |
^^^ | |
lib/shoes/ui/help.rb:396:24: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
str.gsub(/\n+\s*/, " "). | |
^^^ | |
lib/shoes/ui/help.rb:396:28: C: Place the . on the next line, together with the method name. | |
str.gsub(/\n+\s*/, " "). | |
^ | |
lib/shoes/ui/help.rb:397:81: C: Line is too long. [81/80] | |
gsub(/&/, '&').gsub(/>/, '>').gsub(/>/, '<').gsub(/"/, '"'). | |
^ | |
lib/shoes/ui/help.rb:397:81: C: Place the . on the next line, together with the method name. | |
gsub(/&/, '&').gsub(/>/, '>').gsub(/>/, '<').gsub(/"/, '"'). | |
^ | |
lib/shoes/ui/help.rb:398:74: C: Place the . on the next line, together with the method name. | |
gsub(/`(.+?)`/m, '<code>\1</code>').gsub(/\[\[BR\]\]/i, "<br />\n"). | |
^ | |
lib/shoes/ui/help.rb:399:31: C: Place the . on the next line, together with the method name. | |
gsub(/\^(.+?)\^/m, '\1'). | |
^ | |
lib/shoes/ui/help.rb:400:81: C: Line is too long. [84/80] | |
gsub(/'''(.+?)'''/m, '<strong>\1</strong>').gsub(/''(.+?)''/m, '<em>\1</em>'). | |
^^^^ | |
lib/shoes/ui/help.rb:400:84: C: Place the . on the next line, together with the method name. | |
gsub(/'''(.+?)'''/m, '<strong>\1</strong>').gsub(/''(.+?)''/m, '<em>\1</em>'). | |
^ | |
lib/shoes/ui/help.rb:401:12: C: 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:401:81: C: Line is too long. [84/80] | |
gsub(/\[\[((http|https):\/\/\S+?)\]\]/m, '<a href="\1" target="_new">\1</a>'). | |
^^^^ | |
lib/shoes/ui/help.rb:401:84: C: Place the . on the next line, together with the method name. | |
gsub(/\[\[((http|https):\/\/\S+?)\]\]/m, '<a href="\1" target="_new">\1</a>'). | |
^ | |
lib/shoes/ui/help.rb:402:12: C: 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:402:81: C: Line is too long. [90/80] | |
gsub(/\[\[((http|https):\/\/\S+?) (.+?)\]\]/m, '<a href="\1" target="_new">\3</a>'). | |
^^^^^^^^^^ | |
lib/shoes/ui/help.rb:402:90: C: Place the . on the next line, together with the method name. | |
gsub(/\[\[((http|https):\/\/\S+?) (.+?)\]\]/m, '<a href="\1" target="_new">\3</a>'). | |
^ | |
lib/shoes/ui/help.rb:404:18: C: Avoid the use of Perl-style backrefs. | |
ms, mn = $1.split(".", 2) | |
^^ | |
lib/shoes/ui/help.rb:404:27: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
ms, mn = $1.split(".", 2) | |
^^^ | |
lib/shoes/ui/help.rb:410:7: C: Avoid multi-line chains of blocks. | |
end. | |
^^^^ | |
lib/shoes/ui/help.rb:410:10: C: Place the . on the next line, together with the method name. | |
end. | |
^ | |
lib/shoes/ui/help.rb:411:64: C: Place the . on the next line, together with the method name. | |
gsub(/\[\[(\S+?) (.+?)\]\]/m, '<a href="\1.html">\2</a>'). | |
^ | |
lib/shoes/ui/help.rb:413:33: C: Avoid the use of Perl-style backrefs. | |
'<img src="' + "static/#$2" + '" />' | |
^^ | |
lib/shoes/ui/help.rb:413:33: C: Replace interpolated variable [33m$2[0m with expression [33m#{$2}[0m. | |
'<img src="' + "static/#$2" + '" />' | |
^^ | |
lib/shoes/ui/help.rb:417:3: C: Method has too many lines. [19/10] | |
def mk_search_page | |
^^^ | |
lib/shoes/ui/help.rb:422:7: W: 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:422:13: W: 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:422:43: W: 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:423:7: W: Useless assignment to variable - [33mparas[0m. | |
paras = mk_paras docs_description | |
^^^^^ | |
lib/shoes/ui/help.rb:431:21: C: Space missing to the left of {. | |
@f.clear{s.show_search_result term, descs, methods} | |
^ | |
lib/shoes/ui/help.rb:431:22: C: Space missing inside {. | |
@f.clear{s.show_search_result term, descs, methods} | |
^ | |
lib/shoes/ui/help.rb:431:63: C: Space missing inside }. | |
@f.clear{s.show_search_result term, descs, methods} | |
^ | |
lib/shoes/ui/help.rb:434:26: C: Space missing to the left of {. | |
stack(height: 20){} | |
^ | |
lib/shoes/ui/help.rb:435:18: C: Space missing to the left of {. | |
@f = flow{} | |
^ | |
lib/shoes/ui/help.rb:440:3: C: Method has too many lines. [11/10] | |
def search term | |
^^^ | |
lib/shoes/ui/help.rb:440:14: C: Use def with parentheses when there are parameters. | |
def search term | |
^^^^ | |
lib/shoes/ui/help.rb:443:7: W: 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:443:81: C: Line is too long. [81/80] | |
pnum, docs_title, docs_description, docs_methods = get_title_and_desc(pnum) | |
^ | |
lib/shoes/ui/help.rb:445:66: C: Space missing to the left of {. | |
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:445:66: C: Space between { and | missing. | |
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:445:81: C: Line is too long. [135/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:445:113: C: Space missing inside }. | |
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:448:81: C: Line is too long. [133/80] | |
methods << [chapter, section, docs_title, docs_method] if m.index(term) or d.gsub(CODE_RE, '').gsub(IMAGE_RE, '').index(term) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:448:81: C: Use [33m||[0m instead of [33mor[0m. | |
methods << [chapter, section, docs_title, docs_method] if m.index(term) or d.gsub(CODE_RE, '').gsub(IMAGE_RE, '').index(term) | |
^^ | |
lib/shoes/ui/help.rb:451:5: C: Redundant [33mreturn[0m detected. | |
return descs, methods | |
^^^^^^ | |
lib/shoes/ui/help.rb:454:3: C: Method has too many lines. [28/10] | |
def show_search_result term, descs, methods | |
^^^ | |
lib/shoes/ui/help.rb:454:26: C: Use def with parentheses when there are parameters. | |
def show_search_result term, descs, methods | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:456:21: C: Use [33m&&[0m instead of [33mand[0m. | |
if descs.empty? and methods.empty? | |
^^^ | |
lib/shoes/ui/help.rb:459:34: W: Unused block argument - [33msection[0m. If it's necessary, use [33m_[0m or [33m_section[0m as an argument name to indicate that it won't be used. | |
methods.each do |(chapter, section, docs_title, docs_method)| | |
^^^^^^^ | |
lib/shoes/ui/help.rb:462:81: C: Line is too long. [86/80] | |
para "#{DOCS[chapter][0]}: #{docs_title.sub('The', '').split(' ').first}: ", | |
^^^^^^ | |
lib/shoes/ui/help.rb:463:13: C: Align the parameters of a method call if they span more than one line. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:463:33: C: Space missing to the left of {. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^ | |
lib/shoes/ui/help.rb:463:34: C: Space missing inside {. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^ | |
lib/shoes/ui/help.rb:463:42: C: Space missing to the left of {. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^ | |
lib/shoes/ui/help.rb:463:43: C: Space missing inside {. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^ | |
lib/shoes/ui/help.rb:463:59: C: 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:463:81: C: Line is too long. [100/80] | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:463:95: C: Space missing inside }. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^ | |
lib/shoes/ui/help.rb:463:96: C: Space missing inside }. | |
link(docs_method[0]){@f.clear{title docs_title; s.show_methods [docs_method], term}}, NL | |
^ | |
lib/shoes/ui/help.rb:465:25: C: Space missing to the left of {. | |
stack(height: 2){} | |
^ | |
lib/shoes/ui/help.rb:471:48: C: Space missing to the left of {. | |
tagline link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:471:49: C: Space missing inside {. | |
tagline link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:471:57: C: Space missing to the left of {. | |
tagline link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:471:58: C: Space missing inside {. | |
tagline link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:471:74: C: 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:471:81: C: Line is too long. [118/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:471:105: C: Space missing inside }. | |
tagline link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:471:106: C: Space missing inside }. | |
tagline link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:472:81: C: Line is too long. [94/80] | |
inscription "Sub-Section under #{DOCS[chapter][0]}", stroke: lightgray, width: 180 | |
^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:475:49: C: Space missing to the left of {. | |
subtitle link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:475:50: C: Space missing inside {. | |
subtitle link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:475:58: C: Space missing to the left of {. | |
subtitle link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:475:59: C: Space missing inside {. | |
subtitle link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:475:75: C: 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:475:81: C: Line is too long. [119/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:475:106: C: Space missing inside }. | |
subtitle link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:475:107: C: Space missing inside }. | |
subtitle link(fg(docs_title, white)){@f.clear{title docs_title; s.show_page paras, true, term}}, width: 320 | |
^ | |
lib/shoes/ui/help.rb:479:25: C: Space missing to the left of {. | |
stack(height: 2){} | |
^ | |
lib/shoes/ui/help.rb:485:14: C: Use def with parentheses when there are parameters. | |
def marker txt, term | |
^^^^^^^^^ | |
lib/shoes/ui/help.rb:487:32: C: Space missing to the left of {. | |
tmp = txt.split(term).map{|s| [s, bg(term, yellow)]}.flatten | |
^ | |
lib/shoes/ui/help.rb:487:32: C: Space between { and | missing. | |
tmp = txt.split(term).map{|s| [s, bg(term, yellow)]}.flatten | |
^^ | |
lib/shoes/ui/help.rb:487:58: C: Space missing inside }. | |
tmp = txt.split(term).map{|s| [s, bg(term, yellow)]}.flatten | |
^ | |
lib/shoes/ui/help.rb:494:15: C: Use def with parentheses when there are parameters. | |
def mk_deco datas | |
^^^^^ | |
lib/shoes/ui/help.rb:495:42: C: Space missing to the left of {. | |
datas = decoration(datas, /`(.+?)`/m){|s| fg code(s), rgb(255, 30, 0)} | |
^ | |
lib/shoes/ui/help.rb:495:42: C: Space between { and | missing. | |
datas = decoration(datas, /`(.+?)`/m){|s| fg code(s), rgb(255, 30, 0)} | |
^^ | |
lib/shoes/ui/help.rb:495:74: C: Space missing inside }. | |
datas = decoration(datas, /`(.+?)`/m){|s| fg code(s), rgb(255, 30, 0)} | |
^ | |
lib/shoes/ui/help.rb:496:46: C: Space missing to the left of {. | |
datas = decoration(datas, /'''(.+?)'''/m){|s| strong s} | |
^ | |
lib/shoes/ui/help.rb:496:46: C: Space between { and | missing. | |
datas = decoration(datas, /'''(.+?)'''/m){|s| strong s} | |
^^ | |
lib/shoes/ui/help.rb:496:59: C: Space missing inside }. | |
datas = decoration(datas, /'''(.+?)'''/m){|s| strong s} | |
^ | |
lib/shoes/ui/help.rb:497:36: C: Space missing to the left of {. | |
decoration(datas, /''(.+?)''/m){|s| em s} | |
^ | |
lib/shoes/ui/help.rb:497:36: C: Space between { and | missing. | |
decoration(datas, /''(.+?)''/m){|s| em s} | |
^^ | |
lib/shoes/ui/help.rb:497:45: C: Space missing inside }. | |
decoration(datas, /''(.+?)''/m){|s| em s} | |
^ | |
lib/shoes/ui/help.rb:500:3: C: Method has too many lines. [12/10] | |
def decoration datas, re, &blk | |
^^^ | |
lib/shoes/ui/help.rb:500:18: C: Use def with parentheses when there are parameters. | |
def decoration datas, re, &blk | |
^^^^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:506:62: C: Surrounding space missing for operator '+'. | |
txts = [data[0...n], blk[md[1]], decoration([data[n+md[0].length..-1]], re, &blk)] | |
^ | |
lib/shoes/ui/help.rb:506:81: C: Line is too long. [92/80] | |
txts = [data[0...n], blk[md[1]], decoration([data[n+md[0].length..-1]], re, &blk)] | |
^^^^^^^^^^^^ | |
lib/shoes/ui/help.rb:518:15: C: Space missing after colon. | |
flow width:1.0 do | |
^ | |
lib/shoes/ui/help.rb:526:10: C: Do not introduce global variables. | |
LANG = $lang.downcase[0, 2] | |
^^^^^ | |
lib/shoes/ui/help.rb:527:20: C: Do not introduce global variables. | |
DOCS = load_docs($lang =~ /\.txt$/ ? $lang : File.join(DIR, "static/manual-#{LANG}.txt")) | |
^^^^^ | |
lib/shoes/ui/help.rb:527:40: C: Do not introduce global variables. | |
DOCS = load_docs($lang =~ /\.txt$/ ? $lang : File.join(DIR, "static/manual-#{LANG}.txt")) | |
^^^^^ | |
lib/shoes/ui/help.rb:527:81: C: Line is too long. [91/80] | |
DOCS = load_docs($lang =~ /\.txt$/ ? $lang : File.join(DIR, "static/manual-#{LANG}.txt")) | |
^^^^^^^^^^^ | |
lib/shoes/ui/cli.rb:5:3: C: Missing top-level class documentation comment. | |
class CLI | |
^^^^^ | |
lib/shoes/ui/cli.rb:10:5: C: Method has too many lines. [20/10] | |
def parse!(args) | |
^^^ | |
lib/shoes/ui/cli.rb:11:35: W: Shadowing outer local variable - [33mopts[0m. | |
opts = OptionParser.new do |opts| | |
^^^^ | |
lib/shoes/ui/cli.rb:19:81: C: 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: 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:35:23: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33mpackage_types(*)[0m if you want the method to accept any arguments but don't care about them. | |
def package_types(opts) | |
^^^^ | |
lib/shoes/ui/cli.rb:53:5: C: Method has too many lines. [11/10] | |
def package(path) | |
^^^ | |
lib/shoes/ui/manual.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/ui/manual.rb:2:24: C: Use def with parentheses when there are parameters. | |
def self.show_manual lang='English' | |
^^^^^^^^^^^^^^ | |
lib/shoes/ui/manual.rb:2:28: C: Surrounding space missing in default value assignment. | |
def self.show_manual lang='English' | |
^ | |
lib/shoes/ui/manual.rb:3:5: C: Do not introduce global variables. | |
$lang = lang | |
^^^^^ | |
lib/shoes/button.rb:2:3: C: Missing top-level class documentation comment. | |
class Button | |
^^^^^ | |
lib/shoes/button.rb:26:1: C: Trailing whitespace detected. | |
lib/shoes/button.rb:31:1: C: Extra empty line detected at body end. | |
lib/shoes/internal_app.rb:9:3: C: Class definition is too long. [164/100] | |
class InternalApp | |
^^^^^ | |
lib/shoes/internal_app.rb:14:25: C: Use the new Ruby 1.9 hash syntax. | |
DEFAULT_OPTIONS = { :width => 600, | |
^^^^^^^^^^^^^^ | |
lib/shoes/internal_app.rb:15:25: C: Use the new Ruby 1.9 hash syntax. | |
:height => 500, | |
^^^^^^^^^^^^^^ | |
lib/shoes/internal_app.rb:16:25: C: Use the new Ruby 1.9 hash syntax. | |
:title => "Shoes 4", | |
^^^^^^^^^^^^^^ | |
lib/shoes/internal_app.rb:16:40: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
:title => "Shoes 4", | |
^^^^^^^^^ | |
lib/shoes/internal_app.rb:17:25: C: Use the new Ruby 1.9 hash syntax. | |
:resizable => true, | |
^^^^^^^^^^^^^^ | |
lib/shoes/internal_app.rb:18:25: C: Use the new Ruby 1.9 hash syntax. | |
:background => Shoes::COLORS.fetch(:shoes_background) }.freeze | |
^^^^^^^^^^^^^^ | |
lib/shoes/internal_app.rb:18:81: C: Line is too long. [86/80] | |
:background => Shoes::COLORS.fetch(:shoes_background) }.freeze | |
^^^^^^ | |
lib/shoes/internal_app.rb:45:26: W: 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:68:16: C: Use def with parentheses when there are parameters. | |
def rotate angle=nil | |
^^^^^^^^^ | |
lib/shoes/internal_app.rb:68:21: C: Surrounding space missing in default value assignment. | |
def rotate angle=nil | |
^ | |
lib/shoes/internal_app.rb:72:1: C: Extra blank line detected. | |
lib/shoes/internal_app.rb:73:19: W: Unused method argument - [33mchild[0m. If it's necessary, use [33m_[0m or [33m_child[0m as an argument name to indicate that it won't be used. You can also write as [33madd_child(*)[0m if you want the method to accept any arguments but don't care about them. | |
def add_child(child) | |
^^^^^ | |
lib/shoes/internal_app.rb:83:20: W: Unused method argument - [33mx[0m. If it's necessary, use [33m_[0m or [33m_x[0m as an argument name to indicate that it won't be used. You can also write as [33min_bounds?(*)[0m if you want the method to accept any arguments but don't care about them. | |
def in_bounds?(x, y) | |
^ | |
lib/shoes/internal_app.rb:83:23: W: Unused method argument - [33my[0m. If it's necessary, use [33m_[0m or [33m_y[0m as an argument name to indicate that it won't be used. You can also write as [33min_bounds?(*)[0m if you want the method to accept any arguments but don't care about them. | |
def in_bounds?(x, y) | |
^ | |
lib/shoes/internal_app.rb:98:7: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
unless mouse_hover_controls.include? element | |
^^^^^^ | |
lib/shoes/internal_app.rb:136:25: W: 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:156:7: C: Redundant [33mself[0m detected. | |
self.global_keypresses[key] = blk | |
^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/internal_app.rb:159:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/internal_app.rb:165:24: W: 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:168:5: C: Method has too many lines. [12/10] | |
def create_execution_block(blk) | |
^^^ | |
lib/shoes/internal_app.rb:170:25: C: Use [33mproc[0m instead of [33mProc.new[0m. | |
execution_blk = Proc.new do | |
^^^^^^^^ | |
lib/shoes/internal_app.rb:174:25: C: Use [33mproc[0m instead of [33mProc.new[0m. | |
execution_blk = Proc.new do | |
^^^^^^^^ | |
lib/shoes/internal_app.rb:195:9: C: Do not prefix writer method names with [33mset_[0m. | |
def set_attributes_from_options(opts) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt.rb:6:1: C: Missing top-level module documentation comment. | |
module Swt | |
^^^^^^ | |
lib/shoes/swt.rb:11:3: C: Missing top-level module documentation comment. | |
module Events | |
^^^^^^ | |
lib/shoes/swt.rb:16:3: C: Missing top-level module documentation comment. | |
module Widgets | |
^^^^^^ | |
lib/shoes/swt.rb:21:3: C: Missing top-level module documentation comment. | |
module Graphics | |
^^^^^^ | |
lib/shoes/swt.rb:28:3: C: Missing top-level module documentation comment. | |
module Swt | |
^^^^^^ | |
lib/shoes/swt.rb:31:5: C: Missing top-level module documentation comment. | |
module Shoes | |
^^^^^^ | |
lib/shoes/swt.rb:32:24: C: Surrounding space missing in default value assignment. | |
def self.app(opts={}, &blk) | |
^ | |
lib/shoes/swt.rb:34:28: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Shoes.logger.debug "Exiting Shoes.app" | |
^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt.rb:45:62: C: Space missing to the left of {. | |
::Swt::Widgets::Display.new.getFontList(nil, true).each{|f| ::Shoes::FONTS << f.getName} | |
^ | |
lib/shoes/swt.rb:45:62: C: Space between { and | missing. | |
::Swt::Widgets::Display.new.getFontList(nil, true).each{|f| ::Shoes::FONTS << f.getName} | |
^^ | |
lib/shoes/swt.rb:45:81: C: Line is too long. [94/80] | |
::Swt::Widgets::Display.new.getFontList(nil, true).each{|f| ::Shoes::FONTS << f.getName} | |
^^^^^^^^^^^^^^ | |
lib/shoes/swt.rb:45:94: C: Space missing inside }. | |
::Swt::Widgets::Display.new.getFontList(nil, true).each{|f| ::Shoes::FONTS << f.getName} | |
^ | |
lib/shoes/swt.rb:115:48: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
require 'shoes/swt/tooling/leak_hunter' if ENV["LEAK_HUNTER"] | |
^^^^^^^^^^^^^ | |
lib/shoes/check_button.rb:1:1: C: Carriage return character detected. | |
class Shoes | |
^^^^^^^^^^^ | |
lib/shoes/check_button.rb:2:3: C: Missing top-level class documentation comment. | |
class CheckButton | |
^^^^^ | |
lib/shoes/check_button.rb:38:1: C: Extra empty line detected at body end. | |
lib/shoes/check_button.rb:41:28: C: Space found before semicolon. | |
class Check < CheckButton ; end | |
^ | |
lib/shoes/check_button.rb:43:1: C: Extra blank line detected. | |
lib/shoes/check_button.rb:43:1: C: Extra empty line detected at body end. | |
lib/shoes/star.rb:2:3: C: Missing top-level class documentation comment. | |
class Star | |
^^^^^ | |
lib/shoes/star.rb:10:5: C: Method has too many lines. [12/10] | |
def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
^^^ | |
lib/shoes/star.rb:10:19: C: Avoid parameter lists longer than 5 parameters. | |
def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/star.rb:10:81: C: Line is too long. [88/80] | |
def initialize(app, parent, left, top, points, outer, inner, styles = {}, blk = nil) | |
^^^^^^^^ | |
lib/shoes/star.rb:15:20: C: Surrounding space missing for operator '*'. | |
width = outer*2 | |
^ | |
lib/shoes/star.rb:22:60: C: Surrounding space missing for operator '*'. | |
inner_dimensions = AbsoluteDimensions.new 0, 0, inner*2, 0 | |
^ | |
lib/shoes/star.rb:40:22: C: Use [33m&&[0m instead of [33mand[0m. | |
left - dx <= x and x <= right - dx and top - dy <= y and y <= bottom - dy | |
^^^ | |
lib/shoes/star.rb:40:42: C: Use [33m&&[0m instead of [33mand[0m. | |
left - dx <= x and x <= right - dx and top - dy <= y and y <= bottom - dy | |
^^^ | |
lib/shoes/star.rb:40:60: C: Use [33m&&[0m instead of [33mand[0m. | |
left - dx <= x and x <= right - dx and top - dy <= y and y <= bottom - dy | |
^^^ | |
lib/shoes/star.rb:42:1: C: Extra empty line detected at body end. | |
lib/shoes/text.rb:2:3: C: Missing top-level class documentation comment. | |
class Text | |
^^^^^ | |
lib/shoes/text.rb:5:20: C: Use def with parentheses when there are parameters. | |
def initialize texts, color=nil | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/text.rb:5:32: C: Surrounding space missing in default value assignment. | |
def initialize texts, color=nil | |
^ | |
lib/shoes/text.rb:17:24: C: Use [33m%[0m instead of [33m%Q[0m. | |
super.insert(-2, %Q| "#{to_s}"|) | |
^^^ | |
lib/shoes/text.rb:17:24: C: [33m%Q[0m-literals should be delimited by [33m([0m and [33m)[0m | |
super.insert(-2, %Q| "#{to_s}"|) | |
^^^^^^^^^^^^^^ | |
lib/shoes/text.rb:17:31: W: Use [33mself[0m instead of [33mObject#to_s[0m in interpolation. | |
super.insert(-2, %Q| "#{to_s}"|) | |
^^^^ | |
lib/shoes/widget.rb:32:16: C: Put one space between the method name and the first argument. | |
attr_writer :app | |
^^^ | |
lib/shoes/widget.rb:44:5: C: Method has too many lines. [11/10] | |
def self.inherited(klass, &blk) | |
^^^ | |
lib/shoes/widget.rb:44:32: W: Unused method argument - [33mblk[0m. If it's necessary, use [33m_[0m or [33m_blk[0m as an argument name to indicate that it won't be used. | |
def self.inherited(klass, &blk) | |
^^^ | |
lib/shoes/widget.rb:47:46: W: Shadowing outer local variable - [33mblk[0m. | |
define_method(dsl_method) do |*args, &blk| | |
^^^^ | |
lib/shoes/widget.rb:70:1: C: Extra blank line detected. | |
lib/shoes/widget.rb:71:5: W: Useless [33mprivate[0m access modifier. | |
private | |
^^^^^^^ | |
lib/shoes/widget.rb:71:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/widget.rb:73:36: C: Place the . on the next line, together with the method name. | |
klass.to_s[/(^|::)(\w+)$/, 2]. | |
^ | |
lib/shoes/widget.rb:74:36: C: Space missing after comma. | |
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). | |
^ | |
lib/shoes/widget.rb:74:45: C: Place the . on the next line, together with the method name. | |
gsub(/([A-Z]+)([A-Z][a-z])/,'\1_\2'). | |
^ | |
lib/shoes/widget.rb:75:32: C: Space missing after comma. | |
gsub(/([a-z\d])([A-Z])/,'\1_\2').downcase | |
^ | |
lib/shoes/slot.rb:2:3: C: Class definition is too long. [203/100] | |
class Slot | |
^^^^^ | |
lib/shoes/slot.rb:2:3: C: Missing top-level class documentation comment. | |
class Slot | |
^^^^^ | |
lib/shoes/slot.rb:25:5: C: Method has too many lines. [11/10] | |
def init_attributes(app, parent, styles, blk) | |
^^^ | |
lib/shoes/slot.rb:53:20: C: Use def with parentheses when there are parameters. | |
def eval_block blk | |
^^^ | |
lib/shoes/slot.rb:78:29: C: Surrounding space missing in default value assignment. | |
def contents_alignment(_=nil) | |
^ | |
lib/shoes/slot.rb:83:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def hovered? | |
^^^ | |
lib/shoes/slot.rb:113:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def scroll_top | |
^^^ | |
lib/shoes/slot.rb:117:5: C: Use [33mattr_writer[0m to define trivial writer methods. | |
def scroll_top=(position) | |
^^^ | |
lib/shoes/slot.rb:122:16: C: Missing space after #. | |
@app.app #return the Shoes::App not the internal app | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:126:81: C: 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:129:5: C: Keep a blank line before and after [33mprotected[0m. | |
protected | |
^^^^^^^^^ | |
lib/shoes/slot.rb:147:81: C: Line is too long. [93/80] | |
element.contents_alignment(current_position) if element.respond_to? :contents_alignment | |
^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:155:26: W: Unused method argument - [33melement[0m. If it's necessary, use [33m_[0m or [33m_element[0m as an argument name to indicate that it won't be used. You can also write as [33mposition_element(*)[0m if you want the method to accept any arguments but don't care about them. | |
def position_element(element, current_position) | |
^^^^^^^ | |
lib/shoes/slot.rb:155:35: W: Unused method argument - [33mcurrent_position[0m. If it's necessary, use [33m_[0m or [33m_current_position[0m as an argument name to indicate that it won't be used. You can also write as [33mposition_element(*)[0m if you want the method to accept any arguments but don't care about them. | |
def position_element(element, current_position) | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:156:7: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise 'position_element is a subclass responsibility' | |
^^^^^ | |
lib/shoes/slot.rb:167:38: C: Redundant [33mself[0m detected. | |
position_x(self.element_left, element), | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:192:30: C: Use def with parentheses when there are parameters. | |
def next_line_start_from element | |
^^^^^^^ | |
lib/shoes/slot.rb:208:9: C: Redundant [33mself[0m detected. | |
self.absolute_right - (element.right + element.width) | |
^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:226:9: C: Redundant [33mself[0m detected. | |
self.absolute_bottom - (element.bottom + element.height) | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:232:81: C: Line is too long. [82/80] | |
fitting_width = element.fitting_width if element.respond_to?(:fitting_width) | |
^^ | |
lib/shoes/slot.rb:243:46: C: Place the . on the next line, together with the method name. | |
max_bottom = contents.reject(&:hidden?). | |
^ | |
lib/shoes/slot.rb:244:51: C: Place the . on the next line, together with the method name. | |
map(&:absolute_bottom). | |
^ | |
lib/shoes/slot.rb:253:9: C: Rename [33mhas_variable_height?[0m to [33mvariable_height?[0m. | |
def has_variable_height? | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/slot.rb:254:7: C: Use [33m![0m instead of [33mnot[0m. | |
not @fixed_height | |
^^^ | |
lib/shoes/slot.rb:258:3: C: Missing top-level class documentation comment. | |
class Flow < Slot | |
^^^^^ | |
lib/shoes/slot.rb:268:3: C: Missing top-level class documentation comment. | |
class Stack < Slot | |
^^^^^ | |
lib/shoes/image_pattern.rb:2:3: C: Missing top-level class documentation comment. | |
class ImagePattern | |
^^^^^ | |
lib/shoes/image_pattern.rb:5:20: C: Use def with parentheses when there are parameters. | |
def initialize path | |
^^^^ | |
lib/shoes/progress.rb:2:3: C: Missing top-level class documentation comment. | |
class Progress | |
^^^^^ | |
lib/shoes/progress.rb:8:14: C: Space inside { missing. | |
STYLES = {fraction: 0.0} | |
^ | |
lib/shoes/progress.rb:8:28: C: Space inside } missing. | |
STYLES = {fraction: 0.0} | |
^ | |
lib/shoes/progress.rb:10:46: W: Unused method argument - [33mblk[0m. If it's necessary, use [33m_[0m or [33m_blk[0m as an argument name to indicate that it won't be used. | |
def initialize(app, parent, styles = {}, blk = nil) | |
^^^ | |
lib/shoes/color.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/color.rb:2:3: C: Missing top-level class documentation comment. | |
class Color | |
^^^^^ | |
lib/shoes/color.rb:13:5: C: Method has too many lines. [20/10] | |
def initialize(*args)#red, green, blue, alpha = OPAQUE) | |
^^^ | |
lib/shoes/color.rb:13:26: C: Missing space after #. | |
def initialize(*args)#red, green, blue, alpha = OPAQUE) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/color.rb:13:26: C: Put a space before an end-of-line comment. | |
def initialize(*args)#red, green, blue, alpha = OPAQUE) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/color.rb:27:9: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, message | |
^^^^^ | |
lib/shoes/color.rb:75:14: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
format "#%02x%02x%02x", @red, @green, @blue | |
^^^^^^^^^^^^^^^ | |
lib/shoes/color.rb:83:28: W: Use [33mself[0m instead of [33mObject#to_s[0m in interpolation. | |
super.insert(-2, " #{to_s} alpha:#{@alpha}") | |
^^^^ | |
lib/shoes/color.rb:86:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/color.rb:94:36: C: Use def with parentheses when there are parameters. | |
def raise_class_mismatch_error other | |
^^^^^ | |
lib/shoes/color.rb:95:7: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, | |
^^^^^ | |
lib/shoes/color.rb:99:26: C: Use def with parentheses when there are parameters. | |
def same_base_color? other | |
^^^^^ | |
lib/shoes/color.rb:113:5: C: Missing top-level class documentation comment. | |
class HexConverter | |
^^^^^ | |
lib/shoes/color.rb:115:33: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
@hex = validate(hex) || raise(ArgumentError, "Bad hex color: #{hex}") | |
^^^^^ | |
lib/shoes/color.rb:123:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/color.rb:141:5: C: Missing top-level module documentation comment. | |
module DSLHelpers | |
^^^^^^ | |
lib/shoes/color.rb:142:7: C: Cyclomatic complexity for pattern is too high. [7/6] | |
def pattern(*args) | |
^^^ | |
lib/shoes/color.rb:142:7: C: Method has too many lines. [17/10] | |
def pattern(*args) | |
^^^ | |
lib/shoes/color.rb:146:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when String | |
^^^^ | |
lib/shoes/color.rb:148:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when Shoes::Color | |
^^^^ | |
lib/shoes/color.rb:150:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when Range, Shoes::Gradient | |
^^^^ | |
lib/shoes/color.rb:152:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when Shoes::ImagePattern | |
^^^^ | |
lib/shoes/color.rb:155:15: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, "Bad pattern: #{arg.inspect}" | |
^^^^^ | |
lib/shoes/color.rb:185:7: C: Method has too many lines. [17/10] | |
def gradient(*args) | |
^^^ | |
lib/shoes/color.rb:187:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when 1 | |
^^^^ | |
lib/shoes/color.rb:190:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when Gradient | |
^^^^ | |
lib/shoes/color.rb:192:15: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when Range | |
^^^^ | |
lib/shoes/color.rb:195:17: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, "Can't make gradient out of #{arg.inspect}" | |
^^^^^ | |
lib/shoes/color.rb:197:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when 2 | |
^^^^ | |
lib/shoes/color.rb:200:13: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, "Wrong number of arguments (#{args.length} for 1 or 2)" | |
^^^^^ | |
lib/shoes/color.rb:200:81: C: Line is too long. [88/80] | |
raise ArgumentError, "Wrong number of arguments (#{args.length} for 1 or 2)" | |
^^^^^^^^ | |
lib/shoes/color.rb:213:1: C: Extra empty line detected at body end. | |
lib/shoes/color.rb:219:3: C: Missing top-level module documentation comment. | |
module DSL | |
^^^^^^ | |
lib/shoes/color.rb:368:41: C: Avoid comma after the last item of an array. | |
[:shoes_background, 237, 237, 237], | |
^ | |
lib/shoes/color.rb:385:1: C: Extra empty line detected at body end. | |
lib/shoes/not_implemented_error.rb:4:4: C: Final newline missing. | |
end | |
lib/shoes/key_event.rb:2:3: C: Missing top-level class documentation comment. | |
class KeyEvent | |
^^^^^ | |
lib/shoes/key_event.rb:15:28: C: Space found before semicolon. | |
class Keypress < KeyEvent ; end | |
^ | |
lib/shoes/key_event.rb:16:30: C: Space found before semicolon. | |
class Keyrelease < KeyEvent ; end | |
^ | |
lib/shoes/logger/ruby.rb:5:5: C: Missing top-level class documentation comment. | |
class Ruby < SimpleDelegator | |
^^^^^ | |
lib/shoes/logger/ruby.rb:6:28: C: Surrounding space missing in default value assignment. | |
def initialize(device=STDERR) | |
^ | |
lib/shoes/logger/ruby.rb:9:47: W: Unused block argument - [33mdatetime[0m. If it's necessary, use [33m_[0m or [33m_datetime[0m as an argument name to indicate that it won't be used. | |
logger.formatter = proc do |severity, datetime, progname, message| | |
^^^^^^^^ | |
lib/shoes/logger/ruby.rb:9:57: W: Unused block argument - [33mprogname[0m. If it's necessary, use [33m_[0m or [33m_progname[0m as an argument name to indicate that it won't be used. | |
logger.formatter = proc do |severity, datetime, progname, message| | |
^^^^^^^^ | |
lib/shoes/logger/ruby.rb:10:22: C: Favor [33mformat[0m over [33mString#%[0m. | |
"%s: %s\n" % [severity, message] | |
^ | |
lib/shoes/arc.rb:2:3: C: Missing top-level class documentation comment. | |
class Arc | |
^^^^^ | |
lib/shoes/arc.rb:8:81: C: Line is too long. [83/80] | |
style_with :angle1, :angle2, :art_styles, :center, :dimensions, :radius, :wedge | |
^^^ | |
lib/shoes/arc.rb:9:14: C: Space inside { missing. | |
STYLES = {wedge: false} | |
^ | |
lib/shoes/arc.rb:9:27: C: Space inside } missing. | |
STYLES = {wedge: false} | |
^ | |
lib/shoes/arc.rb:11:19: C: 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: Line is too long. [97/80] | |
def initialize(app, parent, left, top, width, height, angle1, angle2, styles = {}, blk = nil) | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/arc.rb:14:81: C: Line is too long. [84/80] | |
@dimensions = Dimensions.new parent, left, top, width, height, styles | |
^^^^ | |
lib/shoes/sound.rb:2:3: C: Missing top-level class documentation comment. | |
class Sound | |
^^^^^ | |
lib/shoes/sound.rb:5:38: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. | |
def initialize(parent, filepath, opts={}, &blk) | |
^^^^ | |
lib/shoes/sound.rb:5:42: C: Surrounding space missing in default value assignment. | |
def initialize(parent, filepath, opts={}, &blk) | |
^ | |
lib/shoes/sound.rb:5:48: W: Unused method argument - [33mblk[0m. If it's necessary, use [33m_[0m or [33m_blk[0m as an argument name to indicate that it won't be used. | |
def initialize(parent, filepath, opts={}, &blk) | |
^^^ | |
lib/shoes/radio.rb:1:1: C: Carriage return character detected. | |
class Shoes | |
^^^^^^^^^^^ | |
lib/shoes/radio.rb:2:3: C: Missing top-level class documentation comment. | |
class Radio < CheckButton | |
^^^^^ | |
lib/shoes/radio.rb:3:1: C: Trailing whitespace detected. | |
lib/shoes/radio.rb:13:7: C: Redundant [33mself[0m detected. | |
self.gui.group = value | |
^^^^^^^^ | |
lib/shoes/download.rb:2:3: C: Missing top-level class documentation comment. | |
class HttpResponse | |
^^^^^ | |
lib/shoes/download.rb:12:3: C: Missing top-level class documentation comment. | |
class Download | |
^^^^^ | |
lib/shoes/download.rb:13:1: C: Extra empty line detected at body beginning. | |
lib/shoes/download.rb:17:20: W: Unused method argument - [33mapp[0m. If it's necessary, use [33m_[0m or [33m_app[0m as an argument name to indicate that it won't be used. | |
def initialize(app, parent, url, opts = {}, &blk) | |
^^^ | |
lib/shoes/download.rb:17:25: W: Unused method argument - [33mparent[0m. If it's necessary, use [33m_[0m or [33m_parent[0m as an argument name to indicate that it won't be used. | |
def initialize(app, parent, url, opts = {}, &blk) | |
^^^^^^ | |
lib/shoes/download.rb:33:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def started? | |
^^^ | |
lib/shoes/download.rb:37:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def finished? | |
^^^ | |
lib/shoes/download.rb:55:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def length | |
^^^ | |
lib/shoes/download.rb:59:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/download.rb:60:5: C: Method has too many lines. [13/10] | |
def start_download | |
^^^ | |
lib/shoes/download.rb:87:19: C: Redundant [33mself[0m detected. | |
(size - self.transferred) > (content_length / UPDATE_STEPS) && | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/download.rb:89:9: C: Use 2 (not 4) spaces for indentation. | |
@gui.busy = true | |
^^^^ | |
lib/shoes/download.rb:96:25: W: Unused method argument - [33mdownload_data[0m. If it's necessary, use [33m_[0m or [33m_download_data[0m as an argument name to indicate that it won't be used. You can also write as [33mfinish_download(*)[0m if you want the method to accept any arguments but don't care about them. | |
def finish_download(download_data) | |
^^^^^^^^^^^^^ | |
lib/shoes/download.rb:99:7: C: Missing space after #. | |
#In case backend didn't catch the 100% | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/link.rb:2:3: C: Missing top-level class documentation comment. | |
class Link < Span | |
^^^^^ | |
lib/shoes/link.rb:3:1: C: Extra empty line detected at body beginning. | |
lib/shoes/link.rb:27:17: C: Use [33mproc[0m instead of [33mProc.new[0m. | |
blk = Proc.new { app.app.visit(style[:click]) } | |
^^^^^^^^ | |
lib/shoes/span.rb:2:3: C: Missing top-level class documentation comment. | |
class Span < Text | |
^^^^^ | |
lib/shoes/span.rb:3:33: C: Surrounding space missing in default value assignment. | |
def initialize(texts, styles={}) | |
^ | |
lib/shoes/configuration.rb:2:3: C: Missing top-level class documentation comment. | |
class Configuration | |
^^^^^ | |
lib/shoes/configuration.rb:18:24: C: Space between { and | missing. | |
if caller.any? {|path| path =~ /rspec/} | |
^^ | |
lib/shoes/configuration.rb:18:47: C: Space missing inside }. | |
if caller.any? {|path| path =~ /rspec/} | |
^ | |
lib/shoes/configuration.rb:33:11: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise "Can't switch backend to Shoes::#{name.capitalize}, Shoes::#{backend_name.capitalize} backend already loaded." | |
^^^^^ | |
lib/shoes/configuration.rb:33:81: C: Line is too long. [126/80] | |
raise "Can't switch backend to Shoes::#{name.capitalize}, Shoes::#{backend_name.capitalize} backend already loaded." | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/configuration.rb:45:52: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
class_name = shoes_object.class.name.split("::").last | |
^^^^ | |
lib/shoes/configuration.rb:46:9: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, "#{shoes_object} does not have a backend class defined for #{backend}" unless self.backend.const_defined?(class_name) | |
^^^^^ | |
lib/shoes/configuration.rb:46:81: C: Line is too long. [146/80] | |
raise ArgumentError, "#{shoes_object} does not have a backend class defined for #{backend}" unless self.backend.const_defined?(class_name) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/configuration.rb:46:108: C: Redundant [33mself[0m detected. | |
raise ArgumentError, "#{shoes_object} does not have a backend class defined for #{backend}" unless self.backend.const_defined?(class_name) | |
^^^^^^^^^^^^ | |
lib/shoes/configuration.rb:47:9: C: Redundant [33mself[0m detected. | |
self.backend.const_get(class_name) | |
^^^^^^^^^^^^ | |
lib/shoes/configuration.rb:50:81: C: Line is too long. [81/80] | |
# Creates an appropriate backend object, passing along additional arguments | |
^ | |
lib/shoes/configuration.rb:55:92: C: Line is too long. [92/80] | |
# Shoes.configuration.backend_for(button, args) # => <Shoes::Swt::Button:0x12345678> | |
^ | |
lib/shoes/configuration.rb:62:81: C: Line is too long. [91/80] | |
backend_factory(shoes_object).call(shoes_object, shoes_object.app.gui, *args, &blk) | |
^^^^^^^^^^^ | |
lib/shoes/configuration.rb:80:48: C: Redundant [33mself[0m detected. | |
@logger_instance ||= Shoes::Logger.get(self.logger).new | |
^^^^^^^^^^^ | |
lib/shoes/oval.rb:2:3: C: Missing top-level class documentation comment. | |
class Oval | |
^^^^^ | |
lib/shoes/oval.rb:10:19: C: 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: Line is too long. [81/80] | |
def initialize(app, parent, left, top, width, height, styles = {}, blk = nil) | |
^ | |
lib/shoes/oval.rb:13:81: C: Line is too long. [84/80] | |
@dimensions = AbsoluteDimensions.new left, top, width, height, styles | |
^^^^ | |
lib/shoes/dimension.rb:2:3: C: Class definition is too long. [161/100] | |
class Dimension | |
^^^^^ | |
lib/shoes/dimension.rb:2:3: C: Missing top-level class documentation comment. | |
class Dimension | |
^^^^^ | |
lib/shoes/dimension.rb:8:81: C: Line is too long. [81/80] | |
# bottom values. Because right is not left + width but rather left + width -1 | |
^ | |
lib/shoes/dimension.rb:79:7: C: Use [33m![0m instead of [33mnot[0m. | |
not @start.nil? | |
^^^ | |
lib/shoes/dimension.rb:83:7: C: Use [33m![0m instead of [33mnot[0m. | |
not @end.nil? | |
^^^ | |
lib/shoes/dimension.rb:122:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/dimension.rb:130:9: C: Rename [33mis_relative?[0m to [33mrelative?[0m. | |
def is_relative?(result) | |
^^^^^^^^^^^^ | |
lib/shoes/dimension.rb:144:9: C: Rename [33mis_string?[0m to [33mstring?[0m. | |
def is_string?(result) | |
^^^^^^^^^^ | |
lib/shoes/dimension.rb:148:9: C: Rename [33mis_negative?[0m to [33mnegative?[0m. | |
def is_negative?(result) | |
^^^^^^^^^^^^ | |
lib/shoes/dimension.rb:159:34: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
match = result.gsub(/\s+/, "").match(PERCENT_REGEX) | |
^^ | |
lib/shoes/dimension.rb:205:5: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def start_as_center? | |
^^^ | |
lib/shoes/dimension.rb:219:3: C: Missing top-level class documentation comment. | |
class ParentDimension < Dimension | |
^^^^^ | |
lib/shoes/dimension.rb:233:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/shape.rb:2:3: C: Missing top-level class documentation comment. | |
class Shape | |
^^^^^ | |
lib/shoes/shape.rb:14:5: C: Method has too many lines. [11/10] | |
def initialize(app, parent, opts = {}, blk = nil) | |
^^^ | |
lib/shoes/shape.rb:30:21: W: 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. | |
instance_eval &@blk unless @blk.nil? | |
^ | |
lib/shoes/shape.rb:87:17: C: Avoid parameter lists longer than 5 parameters. | |
def curve_to(cx1, cy1, cx2, cy2, x, y) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/shape.rb:101:81: C: 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:103:12: C: Avoid parameter lists longer than 5 parameters. | |
def arc(x, y, width, height, start_angle, arc_angle) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/shape.rb:104:27: C: Surrounding space missing for operator '-'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:33: C: Surrounding space missing for operator '/'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:38: C: Surrounding space missing for operator '-'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:45: C: Surrounding space missing for operator '/'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:50: C: Surrounding space missing for operator '+'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:56: C: Surrounding space missing for operator '/'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:61: C: Surrounding space missing for operator '+'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:104:68: C: Surrounding space missing for operator '/'. | |
update_bounds_rect(x-width/2, y-height/2, x+width/2, y+height/2) | |
^ | |
lib/shoes/shape.rb:110:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/shape.rb:120:21: C: Space inside parentheses detected. | |
update_bounds( [x1, x2], [y1, y2] ) | |
^ | |
lib/shoes/shape.rb:120:40: C: Space inside parentheses detected. | |
update_bounds( [x1, x2], [y1, y2] ) | |
^ | |
lib/shoes/shape.rb:150:33: W: 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/app.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/app.rb:6:81: C: 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: Line is too long. [84/80] | |
# @param blk [Proc] The block containing the DSL instructions for the actual app. | |
^^^^ | |
lib/shoes/app.rb:18:20: C: Surrounding space missing in default value assignment. | |
def self.app(opts={}, &blk) | |
^ | |
lib/shoes/app.rb:22:1: C: Extra blank line detected. | |
lib/shoes/app.rb:37:81: C: 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:40:81: C: Line is too long. [84/80] | |
# @option opts [Boolean] :resizable (true) Whether the window is resizable | |
^^^^ | |
lib/shoes/app.rb:41:81: C: Line is too long. [95/80] | |
# @option opts [Boolean] :fullscreen (false) Whether the app should start in fullscreen | |
^^^^^^^^^^^^^^^ | |
lib/shoes/app.rb:43:81: C: Line is too long. [81/80] | |
# @option opts [Fixnum] :height (500) The height of the app window | |
^ | |
lib/shoes/app.rb:46:24: C: Surrounding space missing in default value assignment. | |
def initialize(opts={}, &blk) | |
^ | |
lib/shoes/app.rb:59:23: C: Surrounding space missing in default value assignment. | |
def window(options={}, &block) | |
^ | |
lib/shoes/app.rb:102:81: C: Line is too long. [89/80] | |
Shoes::DSL.public_instance_methods) - DELEGATE_BLACKLIST).freeze | |
^^^^^^^^^ | |
lib/shoes/app.rb:104:1: C: Extra empty line detected at body end. | |
lib/shoes/mock/list_box.rb:3:5: C: Missing top-level class documentation comment. | |
class ListBox | |
^^^^^ | |
lib/shoes/mock/list_box.rb:6:24: W: Unused method argument - [33mv[0m. If it's necessary, use [33m_[0m or [33m_v[0m as an argument name to indicate that it won't be used. You can also write as [33mupdate_items(*)[0m if you want the method to accept any arguments but don't care about them. | |
def update_items(v) | |
^ | |
lib/shoes/mock/list_box.rb:9:19: W: Unused method argument - [33mvalue[0m. If it's necessary, use [33m_[0m or [33m_value[0m as an argument name to indicate that it won't be used. You can also write as [33menabled(*)[0m if you want the method to accept any arguments but don't care about them. | |
def enabled(value) | |
^^^^^ | |
lib/shoes/mock/list_box.rb:12:18: W: Unused method argument - [33mstring[0m. If it's necessary, use [33m_[0m or [33m_string[0m as an argument name to indicate that it won't be used. You can also write as [33mchoose(*)[0m if you want the method to accept any arguments but don't care about them. | |
def choose(string) | |
^^^^^^ | |
lib/shoes/mock/text_block.rb:3:5: C: Missing top-level class documentation comment. | |
class TextBlock | |
^^^^^ | |
lib/shoes/mock/text_block.rb:11:19: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33mredraw(*)[0m if you want the method to accept any arguments but don't care about them. | |
def redraw(*opts); end | |
^^^^ | |
lib/shoes/mock/text_block.rb:13:20: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33mreplace(*)[0m if you want the method to accept any arguments but don't care about them. | |
def replace(*opts) | |
^^^^ | |
lib/shoes/mock/text_block.rb:16:17: C: Space missing after semicolon. | |
def remove;end | |
^ | |
lib/shoes/mock/text_block.rb:24:36: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33madjust_current_position(*)[0m if you want the method to accept any arguments but don't care about them. | |
def adjust_current_position(*args);end | |
^^^^ | |
lib/shoes/mock/text_block.rb:24:41: C: Space missing after semicolon. | |
def adjust_current_position(*args);end | |
^ | |
lib/shoes/mock/animation.rb:3:5: C: Missing top-level class documentation comment. | |
class Animation | |
^^^^^ | |
lib/shoes/mock/animation.rb:4:23: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(*opts) | |
^^^^ | |
lib/shoes/mock/line.rb:3:5: C: Missing top-level class documentation comment. | |
class Line | |
^^^^^ | |
lib/shoes/mock/line.rb:6:22: W: Unused method argument - [33mdsl[0m. If it's necessary, use [33m_[0m or [33m_dsl[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^ | |
lib/shoes/mock/line.rb:6:27: W: Unused method argument - [33mapp[0m. If it's necessary, use [33m_[0m or [33m_app[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^ | |
lib/shoes/mock/line.rb:6:32: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^^ | |
lib/shoes/mock/line.rb:9:1: C: Extra blank line detected. | |
lib/shoes/mock/line.rb:10:16: W: Unused method argument - [33mx[0m. If it's necessary, use [33m_[0m or [33m_x[0m as an argument name to indicate that it won't be used. You can also write as [33mmove(*)[0m if you want the method to accept any arguments but don't care about them. | |
def move(x, y) | |
^ | |
lib/shoes/mock/line.rb:10:19: W: Unused method argument - [33my[0m. If it's necessary, use [33m_[0m or [33m_y[0m as an argument name to indicate that it won't be used. You can also write as [33mmove(*)[0m if you want the method to accept any arguments but don't care about them. | |
def move(x, y) | |
^ | |
lib/shoes/mock/button.rb:3:5: C: Missing top-level class documentation comment. | |
class Button | |
^^^^^ | |
lib/shoes/mock/button.rb:6:19: W: Unused method argument - [33mvalue[0m. If it's necessary, use [33m_[0m or [33m_value[0m as an argument name to indicate that it won't be used. You can also write as [33menabled(*)[0m if you want the method to accept any arguments but don't care about them. | |
def enabled(value) | |
^^^^^ | |
lib/shoes/mock/star.rb:3:5: C: Missing top-level class documentation comment. | |
class Star | |
^^^^^ | |
lib/shoes/mock/slot.rb:3:5: C: Missing top-level class documentation comment. | |
class Slot | |
^^^^^ | |
lib/shoes/mock/slot.rb:4:22: C: Use def with parentheses when there are parameters. | |
def initialize dsl, parent | |
^^^^^^^^^^^ | |
lib/shoes/mock/image_pattern.rb:3:5: C: Missing top-level class documentation comment. | |
class ImagePattern | |
^^^^^ | |
lib/shoes/mock/image_pattern.rb:4:22: W: Unused method argument - [33mpath[0m. If it's necessary, use [33m_[0m or [33m_path[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(path) | |
^^^^ | |
lib/shoes/mock/image_pattern.rb:5:1: C: Extra empty line detected at body beginning. | |
lib/shoes/mock/progress.rb:3:5: C: Missing top-level class documentation comment. | |
class Progress | |
^^^^^ | |
lib/shoes/mock/progress.rb:6:21: W: Unused method argument - [33mfraction[0m. If it's necessary, use [33m_[0m or [33m_fraction[0m as an argument name to indicate that it won't be used. You can also write as [33mfraction=(*)[0m if you want the method to accept any arguments but don't care about them. | |
def fraction=(fraction) | |
^^^^^^^^ | |
lib/shoes/mock/arc.rb:3:5: C: Missing top-level class documentation comment. | |
class Arc | |
^^^^^ | |
lib/shoes/mock/arc.rb:4:22: W: Unused method argument - [33mdsl[0m. If it's necessary, use [33m_[0m or [33m_dsl[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^ | |
lib/shoes/mock/arc.rb:4:27: W: Unused method argument - [33mapp[0m. If it's necessary, use [33m_[0m or [33m_app[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^ | |
lib/shoes/mock/arc.rb:4:32: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^^ | |
lib/shoes/mock/sound.rb:3:5: C: Missing top-level class documentation comment. | |
class Sound | |
^^^^^ | |
lib/shoes/mock/sound.rb:4:22: W: Unused method argument - [33mdsl[0m. If it's necessary, use [33m_[0m or [33m_dsl[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl) | |
^^^ | |
lib/shoes/mock/radio.rb:3:5: C: Missing top-level class documentation comment. | |
class Radio | |
^^^^^ | |
lib/shoes/mock/radio.rb:7:23: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(*opts) | |
^^^^ | |
lib/shoes/mock/radio.rb:14:21: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33mchecked=(*)[0m if you want the method to accept any arguments but don't care about them. | |
def checked=(*opts) | |
^^^^ | |
lib/shoes/mock/radio.rb:20:19: W: Unused method argument - [33mvalue[0m. If it's necessary, use [33m_[0m or [33m_value[0m as an argument name to indicate that it won't be used. You can also write as [33menabled(*)[0m if you want the method to accept any arguments but don't care about them. | |
def enabled(value) | |
^^^^^ | |
lib/shoes/mock/radio.rb:22:1: C: Trailing whitespace detected. | |
lib/shoes/mock/radio.rb:23:18: W: Unused method argument - [33mvalue[0m. If it's necessary, use [33m_[0m or [33m_value[0m as an argument name to indicate that it won't be used. You can also write as [33mgroup=(*)[0m if you want the method to accept any arguments but don't care about them. | |
def group=(value) | |
^^^^^ | |
lib/shoes/mock/download.rb:3:5: C: Missing top-level class documentation comment. | |
class Download | |
^^^^^ | |
lib/shoes/mock/download.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/mock/download.rb:15:1: C: Extra empty line detected at body end. | |
lib/shoes/mock/check.rb:3:5: C: Missing top-level class documentation comment. | |
class Check | |
^^^^^ | |
lib/shoes/mock/check.rb:7:23: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(*opts) | |
^^^^ | |
lib/shoes/mock/check.rb:14:21: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33mchecked=(*)[0m if you want the method to accept any arguments but don't care about them. | |
def checked=(*opts) | |
^^^^ | |
lib/shoes/mock/check.rb:20:19: W: Unused method argument - [33mvalue[0m. If it's necessary, use [33m_[0m or [33m_value[0m as an argument name to indicate that it won't be used. You can also write as [33menabled(*)[0m if you want the method to accept any arguments but don't care about them. | |
def enabled(value) | |
^^^^^ | |
lib/shoes/mock/check.rb:22:1: C: Trailing whitespace detected. | |
lib/shoes/mock/link.rb:3:5: C: Missing top-level class documentation comment. | |
class Link | |
^^^^^ | |
lib/shoes/mock/link.rb:6:22: W: Unused method argument - [33mdsl[0m. If it's necessary, use [33m_[0m or [33m_dsl[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^ | |
lib/shoes/mock/link.rb:6:27: W: Unused method argument - [33mapp[0m. If it's necessary, use [33m_[0m or [33m_app[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^ | |
lib/shoes/mock/link.rb:6:32: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app, opts = {}) | |
^^^^ | |
lib/shoes/mock/link.rb:9:17: W: Unused method argument - [33mblk[0m. If it's necessary, use [33m_[0m or [33m_blk[0m as an argument name to indicate that it won't be used. You can also write as [33mclick(*)[0m if you want the method to accept any arguments but don't care about them. | |
def click(blk) | |
^^^ | |
lib/shoes/mock/link.rb:14:1: C: 1 trailing blank lines detected. | |
lib/shoes/mock/oval.rb:3:5: C: Missing top-level class documentation comment. | |
class Oval | |
^^^^^ | |
lib/shoes/mock/oval.rb:6:22: W: Unused method argument - [33mdsl[0m. If it's necessary, use [33m_[0m or [33m_dsl[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app) | |
^^^ | |
lib/shoes/mock/oval.rb:6:27: W: Unused method argument - [33mapp[0m. If it's necessary, use [33m_[0m or [33m_app[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(dsl, app) | |
^^^ | |
lib/shoes/mock/oval.rb:8:1: C: Extra empty line detected at body end. | |
lib/shoes/mock/shape.rb:3:5: C: Missing top-level class documentation comment. | |
class Shape | |
^^^^^ | |
lib/shoes/mock/shape.rb:6:19: W: Unused method argument - [33mx[0m. If it's necessary, use [33m_[0m or [33m_x[0m as an argument name to indicate that it won't be used. You can also write as [33mline_to(*)[0m if you want the method to accept any arguments but don't care about them. | |
def line_to(x, y) | |
^ | |
lib/shoes/mock/shape.rb:6:22: W: Unused method argument - [33my[0m. If it's necessary, use [33m_[0m or [33m_y[0m as an argument name to indicate that it won't be used. You can also write as [33mline_to(*)[0m if you want the method to accept any arguments but don't care about them. | |
def line_to(x, y) | |
^ | |
lib/shoes/mock/shape.rb:9:19: W: Unused method argument - [33mx[0m. If it's necessary, use [33m_[0m or [33m_x[0m as an argument name to indicate that it won't be used. You can also write as [33mmove_to(*)[0m if you want the method to accept any arguments but don't care about them. | |
def move_to(x, y) | |
^ | |
lib/shoes/mock/shape.rb:9:22: W: Unused method argument - [33my[0m. If it's necessary, use [33m_[0m or [33m_y[0m as an argument name to indicate that it won't be used. You can also write as [33mmove_to(*)[0m if you want the method to accept any arguments but don't care about them. | |
def move_to(x, y) | |
^ | |
lib/shoes/mock/shape.rb:12:21: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33mcurve_to(*)[0m if you want the method to accept any arguments but don't care about them. | |
def curve_to(*args) | |
^^^^ | |
lib/shoes/mock/shape.rb:15:16: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33marc(*)[0m if you want the method to accept any arguments but don't care about them. | |
def arc(*args) | |
^^^^ | |
lib/shoes/mock/clickable.rb:3:5: C: Missing top-level module documentation comment. | |
module Clickable | |
^^^^^^ | |
lib/shoes/mock/clickable.rb:4:17: W: Unused method argument - [33mblk[0m. If it's necessary, use [33m_[0m or [33m_blk[0m as an argument name to indicate that it won't be used. You can also write as [33mclick(*)[0m if you want the method to accept any arguments but don't care about them. | |
def click(blk) | |
^^^ | |
lib/shoes/mock/app.rb:3:5: C: Missing top-level class documentation comment. | |
class App | |
^^^^^ | |
lib/shoes/mock/app.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/mock/app.rb:29:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def started? | |
^^^ | |
lib/shoes/mock/app.rb:39:22: W: Unused method argument - [33mtext[0m. If it's necessary, use [33m_[0m or [33m_text[0m as an argument name to indicate that it won't be used. You can also write as [33mclipboard=(*)[0m if you want the method to accept any arguments but don't care about them. | |
def clipboard=(text) | |
^^^^ | |
lib/shoes/mock/keyrelease.rb:3:5: C: Missing top-level class documentation comment. | |
class Keyrelease | |
^^^^^ | |
lib/shoes/mock/keyrelease.rb:4:23: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(*opts) | |
^^^^ | |
lib/shoes/mock/keypress.rb:3:5: C: Missing top-level class documentation comment. | |
class Keypress | |
^^^^^ | |
lib/shoes/mock/keypress.rb:4:23: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(*opts) | |
^^^^ | |
lib/shoes/mock/background.rb:3:5: C: Missing top-level class documentation comment. | |
class Background | |
^^^^^ | |
lib/shoes/mock/background.rb:6:24: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. You can also write as [33mbackground=(*)[0m if you want the method to accept any arguments but don't care about them. | |
def background=(*opts) | |
^^^^ | |
lib/shoes/mock/font.rb:3:5: C: Missing top-level module documentation comment. | |
module Font | |
^^^^^^ | |
lib/shoes/mock/font.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/mock/font.rb:13:1: C: Extra empty line detected at body end. | |
lib/shoes/mock/font.rb:17:4: C: Final newline missing. | |
end | |
lib/shoes/mock/timer.rb:3:5: C: Missing top-level class documentation comment. | |
class Timer | |
^^^^^ | |
lib/shoes/mock/timer.rb:4:23: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33minitialize(*)[0m if you want the method to accept any arguments but don't care about them. | |
def initialize(*args) | |
^^^^ | |
lib/shoes/mock/timer.rb:8:4: C: Final newline missing. | |
end | |
lib/shoes/mock/dialog.rb:3:5: C: Missing top-level class documentation comment. | |
class Dialog | |
^^^^^ | |
lib/shoes/mock/dialog.rb:4:18: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33malert(*)[0m if you want the method to accept any arguments but don't care about them. | |
def alert(*args) | |
^^^^ | |
lib/shoes/mock/dialog.rb:8:19: W: Unused method argument - [33mmsg[0m. If it's necessary, use [33m_[0m or [33m_msg[0m as an argument name to indicate that it won't be used. You can also write as [33mconfirm(*)[0m if you want the method to accept any arguments but don't care about them. | |
def confirm(msg = '') | |
^^^ | |
lib/shoes/mock/dialog.rb:13:4: C: Final newline missing. | |
end | |
lib/shoes/mock/rect.rb:3:5: C: Missing top-level class documentation comment. | |
class Rect | |
^^^^^ | |
lib/shoes/mock/rect.rb:6:32: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. | |
def initialize(dsl, app, opts = {}) | |
^^^^ | |
lib/shoes/mock/input_box.rb:3:5: C: Missing top-level class documentation comment. | |
class InputBox | |
^^^^^ | |
lib/shoes/mock/input_box.rb:7:19: W: Unused method argument - [33mvalue[0m. If it's necessary, use [33m_[0m or [33m_value[0m as an argument name to indicate that it won't be used. You can also write as [33menabled(*)[0m if you want the method to accept any arguments but don't care about them. | |
def enabled(value) | |
^^^^^ | |
lib/shoes/mock/input_box.rb:10:26: W: Unused method argument - [33mstart_index[0m. If it's necessary, use [33m_[0m or [33m_start_index[0m as an argument name to indicate that it won't be used. You can also write as [33mhighlight_text(*)[0m if you want the method to accept any arguments but don't care about them. | |
def highlight_text(start_index, finish_index) | |
^^^^^^^^^^^ | |
lib/shoes/mock/input_box.rb:10:39: W: Unused method argument - [33mfinish_index[0m. If it's necessary, use [33m_[0m or [33m_finish_index[0m as an argument name to indicate that it won't be used. You can also write as [33mhighlight_text(*)[0m if you want the method to accept any arguments but don't care about them. | |
def highlight_text(start_index, finish_index) | |
^^^^^^^^^^^^ | |
lib/shoes/mock/input_box.rb:13:20: W: Unused method argument - [33mindex[0m. If it's necessary, use [33m_[0m or [33m_index[0m as an argument name to indicate that it won't be used. You can also write as [33mcaret_to(*)[0m if you want the method to accept any arguments but don't care about them. | |
def caret_to(index) | |
^^^^^ | |
lib/shoes/mock/image.rb:3:5: C: Missing top-level class documentation comment. | |
class Image | |
^^^^^ | |
lib/shoes/mock/common_methods.rb:3:5: C: Missing top-level module documentation comment. | |
module CommonMethods | |
^^^^^^ | |
lib/shoes/mock/common_methods.rb:4:28: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. | |
def initialize(dsl, *args) | |
^^^^ | |
lib/shoes/mock/common_methods.rb:7:1: C: Trailing whitespace detected. | |
lib/shoes/mock/border.rb:3:5: C: Missing top-level class documentation comment. | |
class Border | |
^^^^^ | |
lib/shoes/version.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/version.rb:2:13: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
VERSION = "4.0.0.pre1" | |
^^^^^^^^^^^^ | |
lib/shoes/builtin_methods.rb:9:3: C: Missing top-level module documentation comment. | |
module BuiltinMethods | |
^^^^^^ | |
lib/shoes/builtin_methods.rb:56:13: C: Use def with parentheses when there are parameters. | |
def ask msg, args={} | |
^^^^^^^^^^^^ | |
lib/shoes/builtin_methods.rb:56:22: C: Surrounding space missing in default value assignment. | |
def ask msg, args={} | |
^ | |
lib/shoes/builtin_methods.rb:60:19: C: Use def with parentheses when there are parameters. | |
def ask_color title = 'Pick a color...' | |
^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:5:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/dsl.rb:18:1: C: Extra empty line detected at body beginning. | |
lib/shoes/dsl.rb:35:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
$stderr.puts "WARN: The Shoes.setup method is deprecated, you need to install gems yourself." + | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:35:81: C: 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:101: C: Use [33m\[0m instead of [33m+[0m or [33m<<[0m to concatenate those strings. | |
$stderr.puts "WARN: The Shoes.setup method is deprecated, you need to install gems yourself." + | |
^ | |
lib/shoes/dsl.rb:36:81: C: Line is too long. [94/80] | |
"You can do this using the 'gem install' command or bundler and a Gemfile." | |
^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:45:7: C: Redundant [33mbegin[0m block detected. | |
begin | |
^^^^^ | |
lib/shoes/dsl.rb:49:81: C: Line is too long. [123/80] | |
raise LoadError, "Couldn't load backend Shoes::#{name.capitalize}'. Error: #{e.message}\n#{e.backtrace.join("\n")}" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:54:3: C: Missing top-level class documentation comment. | |
class DeprecatedShoesGemSetup | |
^^^^^ | |
lib/shoes/dsl.rb:56:33: C: Do not use parentheses for method calls with no arguments. | |
name, version = name.split() | |
^ | |
lib/shoes/dsl.rb:59:81: C: 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:163:26: C: Prefer [33mObject#is_a?[0m over [33mObject#kind_of?[0m. | |
if klass_or_styles.kind_of? Class | |
^^^^^^^^ | |
lib/shoes/dsl.rb:206:81: C: Line is too long. [82/80] | |
create Shoes::Background, pattern(color), style_normalizer.normalize(styles) | |
^^ | |
lib/shoes/dsl.rb:247:37: C: Surrounding space missing in default value assignment. | |
def button(text = 'Button', opts={}, &blk) | |
^ | |
lib/shoes/dsl.rb:283:14: C: Space inside { missing. | |
opts = {:framerate => opts} unless opts.is_a? Hash | |
^ | |
lib/shoes/dsl.rb:283:15: C: Use the new Ruby 1.9 hash syntax. | |
opts = {:framerate => opts} unless opts.is_a? Hash | |
^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:283:33: C: Space inside } missing. | |
opts = {:framerate => opts} unless opts.is_a? Hash | |
^ | |
lib/shoes/dsl.rb:287:16: C: Surrounding space missing in default value assignment. | |
def every(n=1, &blk) | |
^ | |
lib/shoes/dsl.rb:288:18: C: Surrounding space missing for operator '/'. | |
animate 1.0/n, &blk | |
^ | |
lib/shoes/dsl.rb:291:16: C: Surrounding space missing in default value assignment. | |
def timer(n=1, &blk) | |
^ | |
lib/shoes/dsl.rb:307:81: C: Line is too long. [85/80] | |
# @param [Float] angle1 angle in radians marking the beginning of the arc segment | |
^^^^^ | |
lib/shoes/dsl.rb:311:81: C: Line is too long. [87/80] | |
# @option opts [Boolean] center (false) is (left, top) the center of the rectangle? | |
^^^^^^^ | |
lib/shoes/dsl.rb:312:12: C: Avoid parameter lists longer than 5 parameters. | |
def arc(left, top, width, height, angle1, angle2, styles = {}, &blk) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:323:13: C: Avoid parameter lists longer than 5 parameters. | |
def line(x1, y1, x2, y2, opts = {}, &blk) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:324:81: C: Line is too long. [100/80] | |
create Shoes::Line, Shoes::Point.new(x1, y1), Shoes::Point.new(x2, y2), style.merge(opts), blk | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:343:81: C: Line is too long. [81/80] | |
# @option styles [Integer] left (0) the x-coordinate of the top-left corner | |
^ | |
lib/shoes/dsl.rb:348:81: C: Line is too long. [85/80] | |
# @option styles [Boolean] center (false) is (left, top) the center of the oval | |
^^^^^ | |
lib/shoes/dsl.rb:349:5: C: Cyclomatic complexity for oval is too high. [10/6] | |
def oval(*opts, &blk) | |
^^^ | |
lib/shoes/dsl.rb:349:5: C: Method has too many lines. [24/10] | |
def oval(*opts, &blk) | |
^^^ | |
lib/shoes/dsl.rb:349:5: C: Perceived complexity for oval is too high. [8/7] | |
def oval(*opts, &blk) | |
^^^ | |
lib/shoes/dsl.rb:353:9: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when 3 | |
^^^^ | |
lib/shoes/dsl.rb:356:9: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when 4 | |
^^^^ | |
lib/shoes/dsl.rb:358:9: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when 0 | |
^^^^ | |
lib/shoes/dsl.rb:371:11: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, message | |
^^^^^ | |
lib/shoes/dsl.rb:392:81: C: Line is too long. [81/80] | |
# @option styles [Integer] left (0) the x-coordinate of the top-left corner | |
^ | |
lib/shoes/dsl.rb:397:81: C: Line is too long. [91/80] | |
# @option styles [Boolean] center (false) is (left, top) the center of the rectangle? | |
^^^^^^^^^^^ | |
lib/shoes/dsl.rb:398:5: C: Cyclomatic complexity for rect is too high. [9/6] | |
def rect(*args, &blk) | |
^^^ | |
lib/shoes/dsl.rb:398:5: C: Method has too many lines. [28/10] | |
def rect(*args, &blk) | |
^^^ | |
lib/shoes/dsl.rb:424:9: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise ArgumentError, message | |
^^^^^ | |
lib/shoes/dsl.rb:429:13: C: 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:429:81: C: Line is too long. [84/80] | |
def star(left, top, points = 10, outer = 100.0, inner = 50.0, styles = {}, &blk) | |
^^^^ | |
lib/shoes/dsl.rb:463:5: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
%w[banner title subtitle tagline caption para inscription].each do |method| | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:472:21: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
code: { font: "Lucida Console" }, | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:478:31: C: Avoid comma after the last item of a hash. | |
strong: { weight: true }, | |
^ | |
lib/shoes/dsl.rb:490:30: C: Redundant curly braces around a hash parameter. | |
Shoes::Span.new texts, { stroke: pattern(color) } | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:494:30: C: Redundant curly braces around a hash parameter. | |
Shoes::Span.new texts, { fill: pattern(color) } | |
^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dsl.rb:543:39: C: Space between { and | missing. | |
url_data = Shoes::URL.urls.find {|page, _| match_data = page.match url} | |
^^ | |
lib/shoes/dsl.rb:543:77: C: Space missing inside }. | |
url_data = Shoes::URL.urls.find {|page, _| match_data = page.match url} | |
^ | |
lib/shoes/dsl.rb:544:7: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if url_data | |
^^ | |
lib/shoes/dsl.rb:570:28: C: Surrounding space missing in default value assignment. | |
def download(name, args={}, &blk) | |
^ | |
lib/shoes/dsl.rb:580:16: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33mvideo(*)[0m if you want the method to accept any arguments but don't care about them. | |
def video(*args) | |
^^^^ | |
lib/shoes/dsl.rb:581:7: C: Use [33mfail[0m instead of [33mraise[0m to signal exceptions. | |
raise Shoes::NotImplementedError, | |
^^^^^ | |
lib/shoes/dsl.rb:582:62: C: Use [33m\[0m instead of [33m+[0m or [33m<<[0m to concatenate those strings. | |
'Sorry video support has been cut from shoes 4!' + | |
^ | |
lib/shoes/dsl.rb:583:78: C: Use [33m\[0m instead of [33m+[0m or [33m<<[0m to concatenate those strings. | |
' Check out github issue #113 for any changes/updates or if you' + | |
^ | |
lib/shoes/dsl.rb:586:1: C: Extra empty line detected at body end. | |
lib/shoes/renamed_delegate.rb:1:1: C: Missing top-level module documentation comment. | |
module RenamedDelegate | |
^^^^^^ | |
lib/shoes/renamed_delegate.rb:7:39: C: Prefer [33mreduce[0m over [33minject[0m. | |
renamed_method_name = renamings.inject(method_name) do |name, (word, sub)| | |
^^^^^^ | |
lib/shoes/renamed_delegate.rb:15:4: C: Final newline missing. | |
end | |
lib/shoes/url.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/url.rb:2:1: C: Extra empty line detected at body beginning. | |
lib/shoes/url.rb:5:35: C: Missing space after #. | |
base_class.send :include, URL #include is private, therefore send | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/url.rb:8:3: C: Missing top-level module documentation comment. | |
module URL | |
^^^^^^ | |
lib/shoes/url.rb:22:1: C: Extra empty line detected at body end. | |
lib/shoes/url.rb:25:3: C: Missing top-level module documentation comment. | |
module URLDefiner | |
^^^^^^ | |
lib/shoes/url.rb:26:5: C: Method has too many lines. [11/10] | |
def url(page, method) | |
^^^ | |
lib/shoes/url.rb:42:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/background.rb:2:3: C: Missing top-level class documentation comment. | |
class Background | |
^^^^^ | |
lib/shoes/background.rb:9:14: C: Space inside { missing. | |
STYLES = {angle: 0, curve: 0} | |
^ | |
lib/shoes/background.rb:9:33: C: Space inside } missing. | |
STYLES = {angle: 0, curve: 0} | |
^ | |
lib/shoes/common/positioning.rb:3:5: C: Missing top-level module documentation comment. | |
module Positioning | |
^^^^^^ | |
lib/shoes/common/positioning.rb:4:81: C: 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: 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:14:21: C: Use def with parentheses when there are parameters. | |
def _position left, top | |
^^^^^^^^^ | |
lib/shoes/common/positioning.rb:20:7: C: Use only ascii symbols in comments. | |
# displace(left: a number, top: a number) » self | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/common/positioning.rb:21:81: C: Line is too long. [83/80] | |
# Displacing an element moves it. But without changing the layout around it. | |
^^^ | |
lib/shoes/common/state.rb:1:1: C: Carriage return character detected. | |
class Shoes | |
^^^^^^^^^^^ | |
lib/shoes/common/state.rb:3:5: C: Missing top-level module documentation comment. | |
module State | |
^^^^^^ | |
lib/shoes/common/state.rb:4:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def state | |
^^^ | |
lib/shoes/common/state.rb:14:34: C: Trailing whitespace detected. | |
self.state = opts[:state] | |
^ | |
lib/shoes/common/inspect.rb:3:5: C: Missing top-level module documentation comment. | |
module Inspect | |
^^^^^^ | |
lib/shoes/common/inspect.rb:10:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"(#{self.class.name}:#{"0x%08x" % (self.object_id * 2)})" | |
^^^^^^^^ | |
lib/shoes/common/inspect.rb:10:41: C: Favor [33mformat[0m over [33mString#%[0m. | |
"(#{self.class.name}:#{"0x%08x" % (self.object_id * 2)})" | |
^ | |
lib/shoes/common/inspect.rb:10:44: C: Redundant [33mself[0m detected. | |
"(#{self.class.name}:#{"0x%08x" % (self.object_id * 2)})" | |
^^^^^^^^^^^^^^ | |
lib/shoes/common/background_element.rb:3:5: C: Missing top-level module documentation comment. | |
module BackgroundElement | |
^^^^^^ | |
lib/shoes/common/background_element.rb:9:4: C: Final newline missing. | |
end | |
lib/shoes/common/stroke.rb:8:9: C: Use the new Ruby 1.9 hash syntax. | |
:stroke => Shoes::COLORS[:black] | |
^^^^^^^^^^ | |
lib/shoes/common/remove.rb:3:5: C: Missing top-level module documentation comment. | |
module Remove | |
^^^^^^ | |
lib/shoes/common/clickable.rb:3:5: C: Missing top-level module documentation comment. | |
module Clickable | |
^^^^^^ | |
lib/shoes/common/clickable.rb:19:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def pass_coordinates? | |
^^^ | |
lib/shoes/common/style_normalizer.rb:3:5: C: Missing top-level class documentation comment. | |
class StyleNormalizer | |
^^^^^ | |
lib/shoes/common/style_normalizer.rb:8:11: C: 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/registration.rb:3:5: C: Missing top-level module documentation comment. | |
module Registration | |
^^^^^^ | |
lib/shoes/common/registration.rb:23:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def main_app | |
^^^ | |
lib/shoes/common/visibility.rb:3:5: C: Missing top-level module documentation comment. | |
module Visibility | |
^^^^^^ | |
lib/shoes/common/visibility.rb:10:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def hidden? | |
^^^ | |
lib/shoes/common/fill.rb:8:9: C: Use the new Ruby 1.9 hash syntax. | |
:fill => Shoes::COLORS[:black] | |
^^^^^^^^^^ | |
lib/shoes/common/fill.rb:21:1: C: 1 trailing blank lines detected. | |
lib/shoes/common/ui_element.rb:3:5: C: Missing top-level module documentation comment. | |
module UIElement | |
^^^^^^ | |
lib/shoes/common/style.rb:5:1: C: Extra empty line detected at body beginning. | |
lib/shoes/common/style.rb:19:25: C: Align the elements of an array literal if they span more than one line. | |
:justify, :kerning, :leading, :rise, :size, :stretch, | |
^^^^^^^^ | |
lib/shoes/common/style.rb:20:25: C: Align the elements of an array literal if they span more than one line. | |
:strikecolor, :strikethrough, :stroke, :undercolor, | |
^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:21:25: C: Align the elements of an array literal if they span more than one line. | |
:underline, :weight, :wrap], | |
^^^^^^^^^^ | |
lib/shoes/common/style.rb:37:81: C: Line is too long. [89/80] | |
@style.merge!(@app.element_styles[self.class]) if @app.element_styles[self.class] | |
^^^^^^^^^ | |
lib/shoes/common/style.rb:43:7: C: Missing top-level module documentation comment. | |
module StyleWith | |
^^^^^^ | |
lib/shoes/common/style.rb:52:9: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def supported_styles | |
^^^ | |
lib/shoes/common/style.rb:59:39: C: Space missing to the left of {. | |
STYLE_GROUPS[style].each{|style| @supported_styles << style} | |
^ | |
lib/shoes/common/style.rb:59:39: C: Space between { and | missing. | |
STYLE_GROUPS[style].each{|style| @supported_styles << style} | |
^^ | |
lib/shoes/common/style.rb:59:41: W: Shadowing outer local variable - [33mstyle[0m. | |
STYLE_GROUPS[style].each{|style| @supported_styles << style} | |
^^^^^ | |
lib/shoes/common/style.rb:59:74: C: Space missing inside }. | |
STYLE_GROUPS[style].each{|style| @supported_styles << style} | |
^ | |
lib/shoes/common/style.rb:85:15: C: Redundant [33mself[0m detected. | |
self.send("style", style_key.to_sym => new_style) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:85:25: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
self.send("style", style_key.to_sym => new_style) | |
^^^^^^^ | |
lib/shoes/common/style.rb:89:1: C: Extra empty line detected at body end. | |
lib/shoes/common/style.rb:101:50: C: [33mHash#has_key?[0m is deprecated in favor of [33mHash#key?[0m. | |
click(&new_styles[:click]) if new_styles.has_key?(:click) | |
^^^^^^^^ | |
lib/shoes/common/style.rb:105:7: C: Missing space after #. | |
#if dimension is set via style, pass info on to the dimensions setter | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:106:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_dimensions(new_styles) | |
^^^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:108:11: C: Redundant [33mself[0m detected. | |
self.send(key.to_s+"=", value) if STYLE_GROUPS[:dimensions].include?(key) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:108:29: C: Surrounding space missing for operator '+'. | |
self.send(key.to_s+"=", value) if STYLE_GROUPS[:dimensions].include?(key) | |
^ | |
lib/shoes/common/style.rb:108:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
self.send(key.to_s+"=", value) if STYLE_GROUPS[:dimensions].include?(key) | |
^^^ | |
lib/shoes/common/style.rb:108:81: C: Line is too long. [83/80] | |
self.send(key.to_s+"=", value) if STYLE_GROUPS[:dimensions].include?(key) | |
^^^ | |
lib/shoes/common/style.rb:112:29: C: Missing space after #. | |
def update_dimensions #so that @style hash matches actual values | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:114:27: C: Redundant [33mself[0m detected. | |
@style[style] = self.send(style.to_s) | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/common/style.rb:119:40: C: Space between { and | missing. | |
STYLE_GROUPS[:dimensions].any? {|dimension| @style.has_key? dimension} | |
^^ | |
lib/shoes/common/style.rb:119:60: C: [33mHash#has_key?[0m is deprecated in favor of [33mHash#key?[0m. | |
STYLE_GROUPS[:dimensions].any? {|dimension| @style.has_key? dimension} | |
^^^^^^^^ | |
lib/shoes/common/style.rb:119:78: C: Space missing inside }. | |
STYLE_GROUPS[:dimensions].any? {|dimension| @style.has_key? dimension} | |
^ | |
lib/shoes/common/style.rb:133:1: C: Extra empty line detected at body end. | |
lib/shoes/font.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/font.rb:2:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FONT_DIR = DIR + "/fonts/" | |
^^^^^^^^^ | |
lib/shoes/font.rb:4:3: C: Missing top-level module documentation comment. | |
module Font | |
^^^^^^ | |
lib/shoes/font.rb:5:18: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FONT_TYPES = "{ttf,ttc,otf,fnt,fon,bdf,pcf,snf,mmm,pfb,pfm}" | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/font.rb:13:25: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Dir.glob(path + "**/*." + FONT_TYPES).each do |font_path| | |
^^^^^^^ | |
lib/shoes/font.rb:33:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/timer.rb:2:3: C: Missing top-level class documentation comment. | |
class Timer | |
^^^^^ | |
lib/shoes/timer.rb:5:20: C: Use def with parentheses when there are parameters. | |
def initialize app, n=1000, &blk | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/timer.rb:5:26: C: Surrounding space missing in default value assignment. | |
def initialize app, n=1000, &blk | |
^ | |
lib/shoes/logger.rb:2:3: C: Missing top-level module documentation comment. | |
module Logger | |
^^^^^^ | |
lib/shoes/logger.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/logger.rb:6:23: C: Space inside empty hash literal braces detected. | |
@loggers ||= { } | |
^ | |
lib/shoes/logger.rb:19:5: C: Method has too many lines. [38/10] | |
def self.setup | |
^^^ | |
lib/shoes/logger.rb:21:9: C: Method has too many lines. [18/10] | |
def update | |
^^^ | |
lib/shoes/logger.rb:22:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if @hash != Shoes::LOG.hash | |
^^ | |
lib/shoes/logger.rb:27:30: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
background "#f1f5e1" if index % 2 == 0 | |
^^^^^^^^^ | |
lib/shoes/logger.rb:27:43: C: Replace with [33mFixnum#even?[0m. | |
background "#f1f5e1" if index % 2 == 0 | |
^^^^^^^^^^^^^^ | |
lib/shoes/logger.rb:28:52: C: Replace with [33mFixnum#odd?[0m. | |
background rgb(220, 220, 220) if index % 2 != 0 | |
^^^^^^^^^^^^^^ | |
lib/shoes/logger.rb:29:29: C: Use the new Ruby 1.9 hash syntax. | |
para typ, :stroke => blue | |
^^^^^^^^^^ | |
lib/shoes/logger.rb:31:27: C: Use the new Ruby 1.9 hash syntax. | |
stack :margin => 4 do | |
^^^^^^^^^^ | |
lib/shoes/logger.rb:33:31: C: Use the new Ruby 1.9 hash syntax. | |
para s, :margin => 4, :margin_top => 0 | |
^^^^^^^^^^ | |
lib/shoes/logger.rb:33:45: C: Use the new Ruby 1.9 hash syntax. | |
para s, :margin => 4, :margin_top => 0 | |
^^^^^^^^^^^^^^ | |
lib/shoes/logger.rb:46:23: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
tagline "Shoes Console", stroke: white | |
^^^^^^^^^^^^^^^ | |
lib/shoes/logger.rb:48:20: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
button "Clear", margin: 6, width: 80, height: 40, right: 10 do | |
^^^^^^^ | |
lib/shoes/logger.rb:64:39: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Dir[File.join(File.dirname(__FILE__), "logger", "*.rb")].each { |logger| | |
^^^^^^^^ | |
lib/shoes/logger.rb:64:49: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Dir[File.join(File.dirname(__FILE__), "logger", "*.rb")].each { |logger| | |
^^^^^^ | |
lib/shoes/logger.rb:64:63: C: Avoid using {...} for multi-line blocks. | |
Dir[File.join(File.dirname(__FILE__), "logger", "*.rb")].each { |logger| | |
^ | |
lib/shoes/dialog.rb:2:3: C: Missing top-level class documentation comment. | |
class Dialog | |
^^^^^ | |
lib/shoes/dialog.rb:14:1: C: Trailing whitespace detected. | |
lib/shoes/dialog.rb:15:24: C: Use def with parentheses when there are parameters. | |
def dialog_chooser title, folder=false | |
^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dialog.rb:15:37: C: Surrounding space missing in default value assignment. | |
def dialog_chooser title, folder=false | |
^ | |
lib/shoes/dialog.rb:19:13: C: Use def with parentheses when there are parameters. | |
def ask msg, args | |
^^^^^^^^^ | |
lib/shoes/dialog.rb:23:19: C: Use def with parentheses when there are parameters. | |
def ask_color title | |
^^^^^ | |
lib/shoes/dialog.rb:27:4: C: Final newline missing. | |
end | |
lib/shoes/dimensions.rb:7:68: C: Trailing whitespace detected. | |
# An offset relative to the parent (parents mostly are slots e.g. | |
^ | |
lib/shoes/dimensions.rb:11:80: C: Trailing whitespace detected. | |
# The absolute position of an element in the app, set by positioning code (in | |
^ | |
lib/shoes/dimensions.rb:30:44: C: Trailing whitespace detected. | |
# reasons mentioned in this comment/thread: | |
^ | |
lib/shoes/dimensions.rb:34:3: C: Class definition is too long. [102/100] | |
class Dimensions | |
^^^^^ | |
lib/shoes/dimensions.rb:34:3: C: Missing top-level class documentation comment. | |
class Dimensions | |
^^^^^ | |
lib/shoes/dimensions.rb:38:16: C: Put one space between the method name and the first argument. | |
attr_writer :width, :height, :margin_left, :margin_right, :margin_top, | |
^^^ | |
lib/shoes/dimensions.rb:40:16: C: Put one space between the method name and the first argument. | |
attr_reader :parent, :x_dimension, :y_dimension | |
^^^ | |
lib/shoes/dimensions.rb:45:1: C: Extra blank line detected. | |
lib/shoes/dimensions.rb:47:81: C: Line is too long. [81/80] | |
# bottom values. Because right is not left + width but rather left + width -1 | |
^ | |
lib/shoes/dimensions.rb:55:19: C: Avoid parameter lists longer than 5 parameters. | |
def initialize(parent, left_or_hash = nil, top = nil, width = nil, | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dimensions.rb:108:9: C: Align the parameters of a method call if they span more than one line. | |
" relative:#{Point.new left, top}->#{Point.new right, bottom}" << | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dimensions.rb:108:72: C: Use [33m\[0m instead of [33m+[0m or [33m<<[0m to concatenate those strings. | |
" relative:#{Point.new left, top}->#{Point.new right, bottom}" << | |
^^ | |
lib/shoes/dimensions.rb:109:81: C: Line is too long. [109/80] | |
" absolute:#{Point.new absolute_left, absolute_top}->#{Point.new absolute_right, absolute_bottom}" << | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/dimensions.rb:109:108: C: Use [33m\[0m instead of [33m+[0m or [33m<<[0m to concatenate those strings. | |
" absolute:#{Point.new absolute_left, absolute_top}->#{Point.new absolute_right, absolute_bottom}" << | |
^^ | |
lib/shoes/dimensions.rb:125:5: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/dimensions.rb:149:35: C: Surrounding space missing for operator '?'. | |
parent_x_dimension = @parent? @parent.x_dimension : nil | |
^ | |
lib/shoes/dimensions.rb:150:35: C: Surrounding space missing for operator '?'. | |
parent_y_dimension = @parent? @parent.y_dimension : nil | |
^ | |
lib/shoes/dimensions.rb:188:81: C: Line is too long. [82/80] | |
# depends on a #dimensions method being present that returns a Dimensions object | |
^^ | |
lib/shoes/dimensions.rb:193:81: C: Line is too long. [87/80] | |
DELEGATED_METHODS = Dimensions.public_instance_methods(false) - UNDELEGATED_METHODS | |
^^^^^^^ | |
lib/shoes/rect.rb:2:3: C: Missing top-level class documentation comment. | |
class Rect | |
^^^^^ | |
lib/shoes/rect.rb:10:1: C: Extra blank line detected. | |
lib/shoes/rect.rb:11:19: C: 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: Line is too long. [81/80] | |
def initialize(app, parent, left, top, width, height, styles = {}, blk = nil) | |
^ | |
lib/shoes/input_box.rb:2:3: C: Missing top-level class documentation comment. | |
class InputBox | |
^^^^^ | |
lib/shoes/input_box.rb:21:7: C: Redundant [33mself[0m detected. | |
self.change &blk if blk | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/input_box.rb:21:19: W: 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. | |
self.change &blk if blk | |
^ | |
lib/shoes/input_box.rb:23:1: C: Trailing whitespace detected. | |
lib/shoes/input_box.rb:51:3: C: Missing top-level class documentation comment. | |
class EditBox < InputBox | |
^^^^^ | |
lib/shoes/input_box.rb:59:3: C: Missing top-level class documentation comment. | |
class EditLine < InputBox | |
^^^^^ | |
lib/shoes/input_box.rb:60:1: C: Extra empty line detected at body beginning. | |
lib/shoes/input_box.rb:69:7: C: Redundant [33mself[0m detected. | |
self.secret | |
^^^^^^^^^^^ | |
lib/shoes/input_box.rb:71:1: C: Extra empty line detected at body end. | |
lib/shoes/input_box.rb:73:1: C: Extra empty line detected at body end. | |
lib/shoes/image.rb:2:3: C: Missing top-level class documentation comment. | |
class Image | |
^^^^^ | |
lib/shoes/text_block_dimensions.rb:33:33: C: Surrounding space missing in default value assignment. | |
def desired_width(containing=containing_width) | |
^ | |
lib/shoes/text_block_dimensions.rb:34:43: C: Redundant [33mself[0m detected. | |
parent.absolute_left + containing - self.absolute_left | |
^^^^^^^^^^^^^^^^^^ | |
lib/shoes/text_block_dimensions.rb:44:3: C: Missing top-level module documentation comment. | |
module TextBlockDimensionsDelegations | |
^^^^^^ | |
lib/shoes/text_block_dimensions.rb:51:1: C: Extra empty line detected at body end. | |
lib/shoes/border.rb:2:3: C: Missing top-level class documentation comment. | |
class Border | |
^^^^^ | |
lib/shoes/border.rb:9:14: C: Space inside { missing. | |
STYLES = {angle: 0, curve: 0} | |
^ | |
lib/shoes/border.rb:9:33: C: Space inside } missing. | |
STYLES = {angle: 0, curve: 0} | |
^ | |
lib/shoes/border.rb:11:1: C: Extra blank line detected. | |
lib/shoes/point.rb:2:3: C: Missing top-level class documentation comment. | |
class Point | |
^^^^^ | |
lib/shoes/point.rb:14:8: C: Redundant [33mself[0m detected. | |
[self.x, other.x].min | |
^^^^^^ | |
lib/shoes/point.rb:20:8: C: Redundant [33mself[0m detected. | |
[self.y, other.y].min | |
^^^^^^ | |
lib/shoes/point.rb:42:7: C: Redundant [33mreturn[0m detected. | |
return other.respond_to?(:x) && @x == other.x && other.respond_to?(:y) && @y == other.y | |
^^^^^^ | |
lib/shoes/point.rb:42:81: C: Line is too long. [93/80] | |
return other.respond_to?(:x) && @x == other.x && other.respond_to?(:y) && @y == other.y | |
^^^^^^^^^^^^^ | |
lib/shoes/point.rb:51:28: W: Use [33mself[0m instead of [33mObject#to_s[0m in interpolation. | |
super.insert(-2, " #{to_s}") | |
^^^^ | |
lib/shoes/swt/gradient.rb:3:5: C: Missing top-level class documentation comment. | |
class Gradient | |
^^^^^ | |
lib/shoes/swt/gradient.rb:32:24: C: 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: Avoid parameter lists longer than 5 parameters. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/gradient.rb:42:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/gradient.rb:43:26: C: Use def with parentheses when there are parameters. | |
def create_pattern left, top, width, height, angle | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/gradient.rb:44:9: C: Use self-assignment shorthand [33m*=[0m. | |
width = width * 0.5 | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/gradient.rb:45:9: C: Use self-assignment shorthand [33m*=[0m. | |
height = height * 0.5 | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/gradient.rb:47:81: C: 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:49:81: C: 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:55:34: C: Surrounding space missing for operator '/'. | |
angle = Math::PI * (angle/180.0) | |
^ | |
lib/shoes/swt/gradient.rb:56:26: C: Surrounding space missing for operator '*'. | |
angle % (Math::PI*2.0) | |
^ | |
lib/shoes/swt/gradient.rb:59:7: C: 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:59:7: C: Method has too many lines. [11/10] | |
def determine_args_based_on_angle(angle, left, top, width, height) | |
^^^ | |
lib/shoes/swt/gradient.rb:59:7: C: 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:61:23: C: Use [33m&&[0m instead of [33mand[0m. | |
if 0 <= angle and angle < Math::PI*0.5 | |
^^^ | |
lib/shoes/swt/gradient.rb:61:43: C: Surrounding space missing for operator '*'. | |
if 0 <= angle and angle < Math::PI*0.5 | |
^ | |
lib/shoes/swt/gradient.rb:62:23: C: Surrounding space missing for operator '+'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:29: C: Surrounding space missing for operator '+'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:36: C: Surrounding space missing for operator '+'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:43: C: Surrounding space missing for operator '-'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:51: C: Surrounding space missing for operator '+'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:57: C: Surrounding space missing for operator '-'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:64: C: Surrounding space missing for operator '+'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:62:71: C: Surrounding space missing for operator '+'. | |
args = [left+width+x, top+height-y, left+width-x, top+height+y] | |
^ | |
lib/shoes/swt/gradient.rb:63:23: C: Surrounding space missing for operator '*'. | |
elsif Math::PI*0.5 <= angle and angle < Math::PI | |
^ | |
lib/shoes/swt/gradient.rb:63:37: C: Use [33m&&[0m instead of [33mand[0m. | |
elsif Math::PI*0.5 <= angle and angle < Math::PI | |
^^^ | |
lib/shoes/swt/gradient.rb:64:23: C: Surrounding space missing for operator '+'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:29: C: Surrounding space missing for operator '+'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:36: C: Surrounding space missing for operator '+'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:43: C: Surrounding space missing for operator '+'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:51: C: Surrounding space missing for operator '+'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:57: C: Surrounding space missing for operator '-'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:64: C: Surrounding space missing for operator '+'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:64:71: C: Surrounding space missing for operator '-'. | |
args = [left+width+y, top+height+x, left+width-y, top+height-x] | |
^ | |
lib/shoes/swt/gradient.rb:65:33: C: Use [33m&&[0m instead of [33mand[0m. | |
elsif Math::PI <= angle and angle < Math::PI*1.5 | |
^^^ | |
lib/shoes/swt/gradient.rb:65:53: C: Surrounding space missing for operator '*'. | |
elsif Math::PI <= angle and angle < Math::PI*1.5 | |
^ | |
lib/shoes/swt/gradient.rb:66:23: C: Surrounding space missing for operator '+'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:29: C: Surrounding space missing for operator '-'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:36: C: Surrounding space missing for operator '+'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:43: C: Surrounding space missing for operator '+'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:51: C: Surrounding space missing for operator '+'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:57: C: Surrounding space missing for operator '+'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:64: C: Surrounding space missing for operator '+'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:66:71: C: Surrounding space missing for operator '-'. | |
args = [left+width-x, top+height+y, left+width+x, top+height-y] | |
^ | |
lib/shoes/swt/gradient.rb:67:23: C: Surrounding space missing for operator '*'. | |
elsif Math::PI*1.5 <= angle and angle < Math::PI*2.0 | |
^ | |
lib/shoes/swt/gradient.rb:67:37: C: Use [33m&&[0m instead of [33mand[0m. | |
elsif Math::PI*1.5 <= angle and angle < Math::PI*2.0 | |
^^^ | |
lib/shoes/swt/gradient.rb:67:57: C: Surrounding space missing for operator '*'. | |
elsif Math::PI*1.5 <= angle and angle < Math::PI*2.0 | |
^ | |
lib/shoes/swt/gradient.rb:68:23: C: Surrounding space missing for operator '+'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:29: C: Surrounding space missing for operator '-'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:36: C: Surrounding space missing for operator '+'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:43: C: Surrounding space missing for operator '-'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:51: C: Surrounding space missing for operator '+'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:57: C: Surrounding space missing for operator '+'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:64: C: Surrounding space missing for operator '+'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:68:71: C: Surrounding space missing for operator '+'. | |
args = [left+width-y, top+height-x, left+width+y, top+height+x] | |
^ | |
lib/shoes/swt/gradient.rb:73:7: C: Method has too many lines. [15/10] | |
def calculate_x_and_y(angle, height, width) | |
^^^ | |
lib/shoes/swt/gradient.rb:83:28: C: Surrounding space missing for operator '=='. | |
b = (my_height==0 and my_width==0) ? 0 : Math.atan(my_height/my_width) | |
^^ | |
lib/shoes/swt/gradient.rb:83:32: C: Use [33m&&[0m instead of [33mand[0m. | |
b = (my_height==0 and my_width==0) ? 0 : Math.atan(my_height/my_width) | |
^^^ | |
lib/shoes/swt/gradient.rb:83:44: C: Surrounding space missing for operator '=='. | |
b = (my_height==0 and my_width==0) ? 0 : Math.atan(my_height/my_width) | |
^^ | |
lib/shoes/swt/gradient.rb:83:74: C: Surrounding space missing for operator '/'. | |
b = (my_height==0 and my_width==0) ? 0 : Math.atan(my_height/my_width) | |
^ | |
lib/shoes/swt/gradient.rb:83:81: C: Line is too long. [83/80] | |
b = (my_height==0 and my_width==0) ? 0 : Math.atan(my_height/my_width) | |
^^^ | |
lib/shoes/swt/gradient.rb:84:26: C: Surrounding space missing for operator '*'. | |
c = Math::PI*0.5 - my_angle - b | |
^ | |
lib/shoes/swt/gradient.rb:86:32: C: Surrounding space missing for operator '+'. | |
x = r * Math.cos(b+c) | |
^ | |
lib/shoes/swt/gradient.rb:87:32: C: Surrounding space missing for operator '+'. | |
y = r * Math.sin(b+c) | |
^ | |
lib/shoes/swt/gradient.rb:88:9: C: Redundant [33mreturn[0m detected. | |
return x, y | |
^^^^^^ | |
lib/shoes/swt/list_box.rb:3:5: C: Missing top-level class documentation comment. | |
class ListBox | |
^^^^^ | |
lib/shoes/swt/list_box.rb:15:81: C: Line is too long. [83/80] | |
# @param parent [::Swt::Widgets::Composite] The parent element of this button | |
^^^ | |
lib/shoes/swt/list_box.rb:24:42: W: Unused block argument - [33mevent[0m. You can omit the argument if you don't care about it. | |
@real.add_selection_listener do |event| | |
^^^^^ | |
lib/shoes/swt/list_box.rb:41:1: C: Trailing whitespace detected. | |
lib/shoes/swt/list_box.rb:48:1: C: 2 trailing blank lines detected. | |
lib/shoes/swt/text_block.rb:3:5: C: Missing top-level class documentation comment. | |
class TextBlock | |
^^^^^ | |
lib/shoes/swt/text_block.rb:48:81: C: 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:51:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_absolutes_on_dsl(current_position) | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block.rb:55:81: C: Line is too long. [84/80] | |
set_absolutes(@dsl.parent.absolute_left, current_position.next_line_start) | |
^^^^ | |
lib/shoes/swt/text_block.rb:82:43: C: Prefer [33mreduce[0m over [33minject[0m. | |
@dsl.calculated_height = segments.inject(0) do |total, segment| | |
^^^^^^ | |
lib/shoes/swt/text_block.rb:83:11: W: Useless assignment to variable - [33mtotal[0m. Use just operator [33m+[0m. | |
total += segment.bounds.height | |
^^^^^ | |
lib/shoes/swt/animation.rb:3:5: C: Missing top-level class documentation comment. | |
class Animation | |
^^^^^ | |
lib/shoes/swt/animation.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/animation.rb:18:17: C: Use [33mproc[0m instead of [33mProc.new[0m. | |
@task = Proc.new do | |
^^^^^^^^ | |
lib/shoes/swt/animation.rb:31:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/shoes_layout.rb:3:5: C: Missing top-level class documentation comment. | |
class ShoesLayout < ::Swt::Widgets::Layout | |
^^^^^ | |
lib/shoes/swt/shoes_layout.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/shoes_layout.rb:7:7: C: Method has too many lines. [11/10] | |
def layout(*dontcare) | |
^^^ | |
lib/shoes/swt/shoes_layout.rb:7:19: W: Unused method argument - [33mdontcare[0m. If it's necessary, use [33m_[0m or [33m_dontcare[0m as an argument name to indicate that it won't be used. You can also write as [33mlayout(*)[0m if you want the method to accept any arguments but don't care about them. | |
def layout(*dontcare) | |
^^^^^^^^ | |
lib/shoes/swt/shoes_layout.rb:22:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/shoes_layout.rb:32:81: C: Line is too long. [82/80] | |
vertical_bar.setMaximum scrollable_height - height + vertical_bar.getThumb | |
^^ | |
lib/shoes/swt/line.rb:3:5: C: Missing top-level class documentation comment. | |
class Line | |
^^^^^ | |
lib/shoes/swt/line.rb:20:32: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. | |
def initialize(dsl, app, opts = {}) | |
^^^^ | |
lib/shoes/swt/line.rb:38:81: C: 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:41:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/line.rb:46:35: C: Do not use [33m::[0m for method calls. | |
@transform_elements = Java::float[6].new | |
^^ | |
lib/shoes/swt/line.rb:50:7: C: Missing top-level class documentation comment. | |
class Painter < Common::Painter | |
^^^^^ | |
lib/shoes/swt/line.rb:57:24: W: Unused method argument - [33mgc[0m. If it's necessary, use [33m_[0m or [33m_gc[0m as an argument name to indicate that it won't be used. You can also write as [33mfill_setup(*)[0m if you want the method to accept any arguments but don't care about them. | |
def fill_setup(gc) | |
^^ | |
lib/shoes/swt/button.rb:3:5: C: Missing top-level class documentation comment. | |
class Button < SwtButton | |
^^^^^ | |
lib/shoes/swt/button.rb:9:81: C: 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: Line is too long. [81/80] | |
# @param [Proc] blk The block of code to call when this button is activated | |
^ | |
lib/shoes/swt/check_button.rb:1:1: C: Carriage return character detected. | |
class Shoes | |
^^^^^^^^^^^ | |
lib/shoes/swt/check_button.rb:3:5: C: Missing top-level class documentation comment. | |
class CheckButton < SwtButton | |
^^^^^ | |
lib/shoes/swt/star.rb:3:5: C: Missing top-level class documentation comment. | |
class Star | |
^^^^^ | |
lib/shoes/swt/star.rb:26:7: C: Missing top-level class documentation comment. | |
class Painter < Common::Painter | |
^^^^^ | |
lib/shoes/swt/star.rb:34:1: C: Trailing whitespace detected. | |
lib/shoes/swt/star.rb:40:21: C: Surrounding space missing for operator '*'. | |
(1..points*2).each do |i| | |
^ | |
lib/shoes/swt/star.rb:42:18: C: Replace with [33mFixnum#even?[0m. | |
r = (i % 2 == 0) ? outer : inner | |
^^^^^^^^^^ | |
lib/shoes/swt/star.rb:43:81: C: Line is too long. [86/80] | |
polygon << (left + r * ::Math.sin(angle)) << (top + r * ::Math.cos(angle)) | |
^^^^^^ | |
lib/shoes/swt/slot.rb:3:5: C: Missing top-level class documentation comment. | |
class Slot | |
^^^^^ | |
lib/shoes/swt/image_pattern.rb:3:5: C: Missing top-level class documentation comment. | |
class ImagePattern | |
^^^^^ | |
lib/shoes/swt/image_pattern.rb:22:24: C: Avoid parameter lists longer than 5 parameters. | |
def apply_as_fill(gc, left, top, width, height, angle = 0) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/image_pattern.rb:22:29: W: Unused method argument - [33mleft[0m. If it's necessary, use [33m_[0m or [33m_left[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left, top, width, height, angle = 0) | |
^^^^ | |
lib/shoes/swt/image_pattern.rb:22:35: W: Unused method argument - [33mtop[0m. If it's necessary, use [33m_[0m or [33m_top[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left, top, width, height, angle = 0) | |
^^^ | |
lib/shoes/swt/image_pattern.rb:22:40: W: Unused method argument - [33mwidth[0m. If it's necessary, use [33m_[0m or [33m_width[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left, top, width, height, angle = 0) | |
^^^^^ | |
lib/shoes/swt/image_pattern.rb:22:47: W: Unused method argument - [33mheight[0m. If it's necessary, use [33m_[0m or [33m_height[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left, top, width, height, angle = 0) | |
^^^^^^ | |
lib/shoes/swt/image_pattern.rb:22:55: W: Unused method argument - [33mangle[0m. If it's necessary, use [33m_[0m or [33m_angle[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left, top, width, height, angle = 0) | |
^^^^^ | |
lib/shoes/swt/image_pattern.rb:26:26: C: Avoid parameter lists longer than 5 parameters. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/image_pattern.rb:26:31: W: Unused method argument - [33mleft[0m. If it's necessary, use [33m_[0m or [33m_left[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^^ | |
lib/shoes/swt/image_pattern.rb:26:37: W: Unused method argument - [33mtop[0m. If it's necessary, use [33m_[0m or [33m_top[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^ | |
lib/shoes/swt/image_pattern.rb:26:42: W: Unused method argument - [33mwidth[0m. If it's necessary, use [33m_[0m or [33m_width[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^^^ | |
lib/shoes/swt/image_pattern.rb:26:49: W: Unused method argument - [33mheight[0m. If it's necessary, use [33m_[0m or [33m_height[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^^^^ | |
lib/shoes/swt/image_pattern.rb:26:57: W: Unused method argument - [33mangle[0m. If it's necessary, use [33m_[0m or [33m_angle[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left, top, width, height, angle = 0) | |
^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:11:5: C: Missing top-level class documentation comment. | |
class RedrawingAspect | |
^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:12:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/redrawing_aspect.rb:13:24: C: Space inside { missing. | |
NEED_TO_UPDATE = {Animation => [:eval_block], | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:22:81: C: Line is too long. [85/80] | |
::Shoes::Common::Changeable => [:call_change_listeners]} | |
^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:22:85: C: Space inside } missing. | |
::Shoes::Common::Changeable => [:call_change_listeners]} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:24:34: C: Space inside { missing. | |
NEED_TO_ASYNC_UPDATE_GUI = {::Shoes::Download => [:eval_block]} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:24:69: C: Space inside } missing. | |
NEED_TO_ASYNC_UPDATE_GUI = {::Shoes::Download => [:eval_block]} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:27:26: C: Space inside { missing. | |
SAME_POSITION = {Common::Toggle => [:toggle], | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:29:63: C: Space inside } missing. | |
::Shoes::TextBlock => [:replace]} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:31:26: C: Space inside { missing. | |
CHANGED_POSITION = {::Shoes::Common::Positioning => [:_position], | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:32:81: C: Line is too long. [82/80] | |
::Shoes::Dimensions => [:left=, :top=, :width=, | |
^^ | |
lib/shoes/swt/redrawing_aspect.rb:34:81: C: Line is too long. [92/80] | |
:displace_left=, :displace_top=], | |
^^^^^^^^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:34:92: C: Avoid comma after the last item of a hash. | |
:displace_left=, :displace_top=], | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:40:27: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is. | |
::Shoes::Swt::Dialog => [:ask_color, | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:44:27: C: Indent the right brace the same as the start of the line where the left brace is. | |
} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:46:1: C: Extra blank line detected. | |
lib/shoes/swt/redrawing_aspect.rb:57:31: C: Space between { and | missing. | |
affected_classes.each {|klass| klass.remove_all_callbacks} | |
^^ | |
lib/shoes/swt/redrawing_aspect.rb:57:66: C: Space missing inside }. | |
affected_classes.each {|klass| klass.remove_all_callbacks} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:60:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:62:31: C: Space between { and | missing. | |
affected_classes.each {|klass| klass.extend AfterDo} | |
^^ | |
lib/shoes/swt/redrawing_aspect.rb:62:60: C: Space missing inside }. | |
affected_classes.each {|klass| klass.extend AfterDo} | |
^ | |
lib/shoes/swt/redrawing_aspect.rb:74:7: C: Method has too many lines. [14/10] | |
def add_redraws | |
^^^ | |
lib/shoes/swt/redrawing_aspect.rb:75:36: C: Prefer {...} over do...end for single-line blocks. | |
after_every NEED_TO_UPDATE do update_gui end | |
^^ | |
lib/shoes/swt/redrawing_aspect.rb:77:30: C: Prefer {...} over do...end for single-line blocks. | |
@display.asyncExec do update_gui end | |
^^ | |
lib/shoes/swt/redrawing_aspect.rb:79:40: W: Unused block argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. | |
after_every SAME_POSITION do |*args, element| | |
^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:84:54: W: Unused block argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. | |
before_and_after_every CHANGED_POSITION do |*args, element| | |
^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:87:51: W: Unused block argument - [33margs[0m. You can omit the argument if you don't care about it. | |
before_every NEED_CONTENTS_ALIGNMENT do |*args| | |
^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:103:9: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
unless app.disposed? | |
^^^^^^ | |
lib/shoes/swt/redrawing_aspect.rb:109:19: C: Space between { and | missing. | |
hash.each {|klass, methods| klass.after methods, &blk } | |
^^ | |
lib/shoes/swt/redrawing_aspect.rb:118:19: C: Space between { and | missing. | |
hash.each {|klass, methods| klass.before methods, &blk } | |
^^ | |
lib/shoes/swt/progress.rb:3:5: C: Missing top-level class documentation comment. | |
class Progress | |
^^^^^ | |
lib/shoes/swt/progress.rb:12:7: C: Method has too many lines. [13/10] | |
def initialize(dsl, parent) | |
^^^ | |
lib/shoes/swt/progress.rb:21:31: C: Use [33m&&[0m instead of [33mand[0m. | |
if @dsl.element_width and @dsl.element_height | |
^^^ | |
lib/shoes/swt/progress.rb:31:33: C: Surrounding space missing for operator '*'. | |
@real.selection = (value*100).to_i unless @real.disposed? | |
^ | |
lib/shoes/swt/color.rb:3:5: C: Missing top-level class documentation comment. | |
class Color | |
^^^^^ | |
lib/shoes/swt/color.rb:13:81: C: 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: 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: 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: 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:29: W: Unused method argument - [33mleft[0m. If it's necessary, use [33m_[0m or [33m_left[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^ | |
lib/shoes/swt/color.rb:30:41: W: Unused method argument - [33mtop[0m. If it's necessary, use [33m_[0m or [33m_top[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^ | |
lib/shoes/swt/color.rb:30:52: W: Unused method argument - [33mwidth[0m. If it's necessary, use [33m_[0m or [33m_width[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^ | |
lib/shoes/swt/color.rb:30:65: W: Unused method argument - [33mheight[0m. If it's necessary, use [33m_[0m or [33m_height[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^^ | |
lib/shoes/swt/color.rb:30:79: W: Unused method argument - [33mangle[0m. If it's necessary, use [33m_[0m or [33m_angle[0m as an argument name to indicate that it won't be used. | |
def apply_as_fill(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^ | |
lib/shoes/swt/color.rb:30:81: C: Line is too long. [90/80] | |
def apply_as_fill(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^^^^^^ | |
lib/shoes/swt/color.rb:35:81: C: 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: 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:31: W: Unused method argument - [33mleft[0m. If it's necessary, use [33m_[0m or [33m_left[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^ | |
lib/shoes/swt/color.rb:36:43: W: Unused method argument - [33mtop[0m. If it's necessary, use [33m_[0m or [33m_top[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^ | |
lib/shoes/swt/color.rb:36:54: W: Unused method argument - [33mwidth[0m. If it's necessary, use [33m_[0m or [33m_width[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^ | |
lib/shoes/swt/color.rb:36:67: W: Unused method argument - [33mheight[0m. If it's necessary, use [33m_[0m or [33m_height[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^^ | |
lib/shoes/swt/color.rb:36:81: W: Unused method argument - [33mangle[0m. If it's necessary, use [33m_[0m or [33m_angle[0m as an argument name to indicate that it won't be used. | |
def apply_as_stroke(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^ | |
lib/shoes/swt/color.rb:36:81: C: Line is too long. [92/80] | |
def apply_as_stroke(gc, left = nil, top = nil, width = nil, height = nil, angle = nil) | |
^^^^^^^^^^^^ | |
lib/shoes/swt/color.rb:42:5: C: Missing top-level class documentation comment. | |
class NullColor | |
^^^^^ | |
lib/shoes/swt/color.rb:44:25: W: Unused method argument - [33mgc[0m. If it's necessary, use [33m_[0m or [33m_gc[0m as an argument name to indicate that it won't be used. You can also write as [33mapply_as_fill(*)[0m if you want the method to accept any arguments but don't care about them. | |
def apply_as_fill(gc); end | |
^^ | |
lib/shoes/swt/color.rb:45:7: C: Use empty lines between defs. | |
def apply_as_stroke(gc); end | |
^^^ | |
lib/shoes/swt/color.rb:45:27: W: Unused method argument - [33mgc[0m. If it's necessary, use [33m_[0m or [33m_gc[0m as an argument name to indicate that it won't be used. You can also write as [33mapply_as_stroke(*)[0m if you want the method to accept any arguments but don't care about them. | |
def apply_as_stroke(gc); end | |
^^ | |
lib/shoes/swt/color.rb:49:1: C: 1 trailing blank lines detected. | |
lib/shoes/swt/arc.rb:3:5: C: Missing top-level class documentation comment. | |
class Arc | |
^^^^^ | |
lib/shoes/swt/arc.rb:16:81: C: Line is too long. [81/80] | |
# @param [Shoes::Arc] dsl The DSL object represented by this implementation | |
^ | |
lib/shoes/swt/arc.rb:37:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/arc.rb:42:7: W: Useless [33mpublic[0m access modifier. | |
public | |
^^^^^^ | |
lib/shoes/swt/arc.rb:42:7: C: Keep a blank line before and after [33mpublic[0m. | |
public | |
^^^^^^ | |
lib/shoes/swt/arc.rb:43:7: C: Missing top-level class documentation comment. | |
class Painter < Common::Painter | |
^^^^^ | |
lib/shoes/swt/arc.rb:44:9: C: Method has too many lines. [11/10] | |
def fill(graphics_context) | |
^^^ | |
lib/shoes/swt/arc.rb:45:14: C: Don't use parentheses around the condition of an [33mif[0m. | |
if (@obj.wedge?) | |
^^^^^^^^^^^^^ | |
lib/shoes/swt/arc.rb:60:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if (@obj.element_left and @obj.element_top and @obj.element_width and @obj.element_height) | |
^^ | |
lib/shoes/swt/arc.rb:60:14: C: Don't use parentheses around the condition of an [33mif[0m. | |
if (@obj.element_left and @obj.element_top and @obj.element_width and @obj.element_height) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/arc.rb:60:33: C: Use [33m&&[0m instead of [33mand[0m. | |
if (@obj.element_left and @obj.element_top and @obj.element_width and @obj.element_height) | |
^^^ | |
lib/shoes/swt/arc.rb:60:54: C: Use [33m&&[0m instead of [33mand[0m. | |
if (@obj.element_left and @obj.element_top and @obj.element_width and @obj.element_height) | |
^^^ | |
lib/shoes/swt/arc.rb:60:77: C: Use [33m&&[0m instead of [33mand[0m. | |
if (@obj.element_left and @obj.element_top and @obj.element_width and @obj.element_height) | |
^^^ | |
lib/shoes/swt/arc.rb:60:81: C: Line is too long. [100/80] | |
if (@obj.element_left and @obj.element_top and @obj.element_width and @obj.element_height) | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/arc.rb:61:56: C: Surrounding space missing for operator '+'. | |
graphics_context.draw_arc(@obj.element_left+sw/2, | |
^ | |
lib/shoes/swt/arc.rb:61:59: C: Surrounding space missing for operator '/'. | |
graphics_context.draw_arc(@obj.element_left+sw/2, | |
^ | |
lib/shoes/swt/arc.rb:62:55: C: Surrounding space missing for operator '+'. | |
@obj.element_top+sw/2, | |
^ | |
lib/shoes/swt/arc.rb:62:58: C: Surrounding space missing for operator '/'. | |
@obj.element_top+sw/2, | |
^ | |
lib/shoes/swt/arc.rb:63:57: C: Surrounding space missing for operator '-'. | |
@obj.element_width-sw, | |
^ | |
lib/shoes/swt/arc.rb:64:58: C: Surrounding space missing for operator '-'. | |
@obj.element_height-sw, | |
^ | |
lib/shoes/swt/link_segment.rb:3:5: C: Missing top-level class documentation comment. | |
class LinkSegment | |
^^^^^ | |
lib/shoes/swt/link_segment.rb:32:30: C: Surrounding space missing for operator '-'. | |
(0..layout.line_count-1).map do |index| | |
^ | |
lib/shoes/swt/link_segment.rb:71:23: C: Space between { and | missing. | |
@regions.any? {|region| region.in_bounds?(x, y)} | |
^^ | |
lib/shoes/swt/link_segment.rb:71:56: C: Space missing inside }. | |
@regions.any? {|region| region.in_bounds?(x, y)} | |
^ | |
lib/shoes/swt/link_segment.rb:86:7: C: Missing top-level class documentation comment. | |
class Region | |
^^^^^ | |
lib/shoes/swt/link_segment.rb:103:42: C: Use [33m&&[0m instead of [33mand[0m. | |
(@start_x..@end_x).include?(x) and (@start_y..@end_y).include?(y) | |
^^^ | |
lib/shoes/swt/key_listener.rb:3:5: C: Class definition is too long. [102/100] | |
class KeyListener | |
^^^^^ | |
lib/shoes/swt/key_listener.rb:3:5: C: Missing top-level class documentation comment. | |
class KeyListener | |
^^^^^ | |
lib/shoes/swt/key_listener.rb:12:7: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
%w[TAB PAGE_UP PAGE_DOWN HOME END F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:16:7: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
%w[UP DOWN LEFT RIGHT].each do |key| | |
^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:20:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
SPECIAL_KEY_NAMES[::Swt::SWT::DEL] = "delete" | |
^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:21:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
SPECIAL_KEY_NAMES[::Swt::SWT::BS] = "backspace" | |
^^^^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:22:44: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
SPECIAL_KEY_NAMES[::Swt::SWT::ESC] = "escape" | |
^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:25:23: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
MODIFIER_KEYS = %w[CTRL SHIFT ALT CAPS_LOCK COMMAND].map do |key| | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:29:22: W: Unused method argument - [33mdsl[0m. If it's necessary, use [33m_[0m or [33m_dsl[0m as an argument name to indicate that it won't be used. | |
def initialize(dsl, app, &blk) | |
^^^ | |
lib/shoes/swt/key_listener.rb:47:32: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
BUTTON_EXCLUDES = ["\n", " "] | |
^^^ | |
lib/shoes/swt/key_listener.rb:48:25: C: [33m%w[0m-literals should be delimited by [33m([0m and [33m)[0m | |
COMBO_EXCLUDES = %w[up down] + BUTTON_EXCLUDES | |
^^^^^^^^^^^ | |
lib/shoes/swt/key_listener.rb:56:7: C: Method has too many lines. [11/10] | |
def ignore_event?(event) | |
^^^ | |
lib/shoes/swt/key_listener.rb:90:11: C: Rename [33mis_this_modifier_key?[0m to [33mthis_modifier_key?[0m. | |
def is_this_modifier_key?(event, key) | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:14:5: C: Missing top-level class documentation comment. | |
class Sound | |
^^^^^ | |
lib/shoes/swt/sound.rb:20:7: C: Use SCREAMING_SNAKE_CASE for constants. | |
BufferSize = 4096 | |
^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:32:7: C: Method has too many lines. [18/10] | |
def play | |
^^^ | |
lib/shoes/swt/sound.rb:35:36: C: Redundant [33mself[0m detected. | |
sound_file = JFile.new(self.filepath) | |
^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:40:81: C: 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:50:15: C: Missing space after #. | |
#rescue JIOException => jioex | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:51:15: C: Incorrect indentation detected (column 14 instead of 12). | |
# jioex.stacktrace | |
^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:54:11: W: Avoid rescuing the [33mException[0m class. | |
rescue Exception => e | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:60:7: C: Method has too many lines. [14/10] | |
def decode_input_stream(audio_format, audio_input_stream) | |
^^^ | |
lib/shoes/swt/sound.rb:62:11: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when Java::JavazoomSpiVorbisSampledFile::VorbisEncoding, Java::JavazoomSpiMpegSampledFile::MpegEncoding | |
^^^^ | |
lib/shoes/swt/sound.rb:64:72: C: Do not use parentheses for method calls with no arguments. | |
audio_format.getSampleRate(), | |
^ | |
lib/shoes/swt/sound.rb:66:70: C: Do not use parentheses for method calls with no arguments. | |
audio_format.getChannels(), | |
^ | |
lib/shoes/swt/sound.rb:67:70: C: Do not use parentheses for method calls with no arguments. | |
audio_format.getChannels() * 2, | |
^ | |
lib/shoes/swt/sound.rb:68:72: C: Do not use parentheses for method calls with no arguments. | |
audio_format.getSampleRate(), | |
^ | |
lib/shoes/swt/sound.rb:70:81: C: 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: Method has too many lines. [16/10] | |
def rawplay(decoded_audio_format, decoded_audio_input_stream) | |
^^^ | |
lib/shoes/swt/sound.rb:80:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/sound.rb:81:9: C: Missing space after #. | |
#throws IOException, LineUnavailableException | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:83:28: C: Do not use [33m::[0m for method calls. | |
sampled_data = Java::byte[BufferSize].new | |
^^ | |
lib/shoes/swt/sound.rb:86:9: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if line != nil | |
^^ | |
lib/shoes/swt/sound.rb:86:17: C: Explicit non-nil checks are usually redundant. | |
if line != nil | |
^^ | |
lib/shoes/swt/sound.rb:89:21: C: Do not use parentheses for method calls with no arguments. | |
line.start() | |
^ | |
lib/shoes/swt/sound.rb:90:27: W: Useless assignment to variable - [33mbytes_written[0m. | |
bytes_read = 0, bytes_written = 0 | |
^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:93:81: C: Line is too long. [94/80] | |
bytes_read = decoded_audio_input_stream.read(sampled_data, 0, sampled_data.length) | |
^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:96:15: W: Useless assignment to variable - [33mbytes_written[0m. | |
bytes_written = line.write(sampled_data, 0, bytes_read) | |
^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:100:21: C: Do not use parentheses for method calls with no arguments. | |
line.drain() | |
^ | |
lib/shoes/swt/sound.rb:101:20: C: Do not use parentheses for method calls with no arguments. | |
line.stop() | |
^ | |
lib/shoes/swt/sound.rb:102:21: C: Do not use parentheses for method calls with no arguments. | |
line.close() | |
^ | |
lib/shoes/swt/sound.rb:103:43: C: Do not use parentheses for method calls with no arguments. | |
decoded_audio_input_stream.close() | |
^ | |
lib/shoes/swt/sound.rb:107:11: C: Use snake_case for methods. | |
def getLine(audioFormat) | |
^^^^^^^ | |
lib/shoes/swt/sound.rb:108:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/sound.rb:109:9: C: Missing space after #. | |
#throws LineUnavailableException | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/sound.rb:111:9: W: Useless assignment to variable - [33mres[0m. | |
res = nil | |
^^^ | |
lib/shoes/swt/radio.rb:12:81: C: 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: Line is too long. [81/80] | |
# @param [Proc] blk The block of code to call when this button is activated | |
^ | |
lib/shoes/swt/radio.rb:28:1: C: 2 trailing blank lines detected. | |
lib/shoes/swt/download.rb:3:5: C: Missing top-level class documentation comment. | |
class Download | |
^^^^^ | |
lib/shoes/swt/download.rb:4:1: C: Trailing whitespace detected. | |
lib/shoes/swt/download.rb:19:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def busy? | |
^^^ | |
lib/shoes/swt/check.rb:3:5: C: Missing top-level class documentation comment. | |
class Check < CheckButton | |
^^^^^ | |
lib/shoes/swt/check.rb:7:81: C: 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: Line is too long. [81/80] | |
# @param [Proc] blk The block of code to call when this button is activated | |
^ | |
lib/shoes/swt/radio_group.rb:1:1: C: Carriage return character detected. | |
class Shoes | |
^^^^^^^^^^^ | |
lib/shoes/swt/radio_group.rb:3:71: C: Trailing whitespace detected. | |
# In Swt radio groups are managed by composites which occupy space | |
^ | |
lib/shoes/swt/radio_group.rb:10:29: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
DEFAULT_RADIO_GROUP = "Default Radio Group" | |
^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/radio_group.rb:24:56: C: Trailing whitespace detected. | |
return if @radio_buttons.include?(radio_button) | |
^ | |
lib/shoes/swt/radio_group.rb:27:81: C: Line is too long. [90/80] | |
selection_listener = SelectionListener.new radio_button do |selected_radio, event| | |
^^^^^^^^^^ | |
lib/shoes/swt/radio_group.rb:27:85: W: Unused block argument - [33mevent[0m. If it's necessary, use [33m_[0m or [33m_event[0m as an argument name to indicate that it won't be used. | |
selection_listener = SelectionListener.new radio_button do |selected_radio, event| | |
^^^^^ | |
lib/shoes/swt/radio_group.rb:43:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def self.group_lookup | |
^^^ | |
lib/shoes/swt/radio_group.rb:48:39: C: Trailing whitespace detected. | |
@radio_buttons.each do |radio| | |
^ | |
lib/shoes/swt/radio_group.rb:49:60: C: Trailing whitespace detected. | |
radio.real.set_selection(radio == selected_radio) | |
^ | |
lib/shoes/swt/radio_group.rb:54:4: C: Final newline missing. | |
end | |
lib/shoes/swt/link.rb:3:5: C: Missing top-level class documentation comment. | |
class Link | |
^^^^^ | |
lib/shoes/swt/link.rb:8:32: W: Unused method argument - [33mstyles[0m. If it's necessary, use [33m_[0m or [33m_styles[0m as an argument name to indicate that it won't be used. | |
def initialize(dsl, app, styles={}) | |
^^^^^^ | |
lib/shoes/swt/link.rb:8:38: C: Surrounding space missing in default value assignment. | |
def initialize(dsl, app, styles={}) | |
^ | |
lib/shoes/swt/link.rb:27:29: C: Space between { and | missing. | |
@link_segments.any? {|segment| segment.in_bounds?(x, y)} | |
^^ | |
lib/shoes/swt/link.rb:27:64: C: Space missing inside }. | |
@link_segments.any? {|segment| segment.in_bounds?(x, y)} | |
^ | |
lib/shoes/swt/disposed_protection.rb:3:5: C: Missing top-level module documentation comment. | |
module DisposedProtection | |
^^^^^^ | |
lib/shoes/swt/disposed_protection.rb:9:7: C: Missing top-level class documentation comment. | |
class NullObject < BasicObject | |
^^^^^ | |
lib/shoes/swt/disposed_protection.rb:18:28: W: Unused method argument - [33mmethod[0m. If it's necessary, use [33m_[0m or [33m_method[0m as an argument name to indicate that it won't be used. You can also write as [33mmethod_missing(*)[0m if you want the method to accept any arguments but don't care about them. | |
def method_missing(method, *args) | |
^^^^^^ | |
lib/shoes/swt/disposed_protection.rb:18:37: W: Unused method argument - [33margs[0m. If it's necessary, use [33m_[0m or [33m_args[0m as an argument name to indicate that it won't be used. You can also write as [33mmethod_missing(*)[0m if you want the method to accept any arguments but don't care about them. | |
def method_missing(method, *args) | |
^^^^ | |
lib/shoes/swt/oval.rb:3:5: C: Missing top-level class documentation comment. | |
class Oval | |
^^^^^ | |
lib/shoes/swt/oval.rb:14:1: C: Extra blank line detected. | |
lib/shoes/swt/oval.rb:31:7: C: Missing top-level class documentation comment. | |
class Painter < Common::Painter | |
^^^^^ | |
lib/shoes/swt/oval.rb:46:55: C: Surrounding space missing for operator '+'. | |
graphics_context.draw_oval(@obj.element_left+sw/2, @obj.element_top+sw/2, | |
^ | |
lib/shoes/swt/oval.rb:46:58: C: Surrounding space missing for operator '/'. | |
graphics_context.draw_oval(@obj.element_left+sw/2, @obj.element_top+sw/2, | |
^ | |
lib/shoes/swt/oval.rb:46:78: C: Surrounding space missing for operator '+'. | |
graphics_context.draw_oval(@obj.element_left+sw/2, @obj.element_top+sw/2, | |
^ | |
lib/shoes/swt/oval.rb:46:81: C: Line is too long. [83/80] | |
graphics_context.draw_oval(@obj.element_left+sw/2, @obj.element_top+sw/2, | |
^^^ | |
lib/shoes/swt/oval.rb:46:81: C: Surrounding space missing for operator '/'. | |
graphics_context.draw_oval(@obj.element_left+sw/2, @obj.element_top+sw/2, | |
^ | |
lib/shoes/swt/oval.rb:47:56: C: Surrounding space missing for operator '-'. | |
@obj.element_width-sw, @obj.element_height-sw) | |
^ | |
lib/shoes/swt/oval.rb:47:80: C: Surrounding space missing for operator '-'. | |
@obj.element_width-sw, @obj.element_height-sw) | |
^ | |
lib/shoes/swt/oval.rb:47:81: C: Line is too long. [83/80] | |
@obj.element_width-sw, @obj.element_height-sw) | |
^^^ | |
lib/shoes/swt/swt_button.rb:3:5: C: Missing top-level class documentation comment. | |
class SwtButton | |
^^^^^ | |
lib/shoes/swt/swt_button.rb:23:22: C: Use def with parentheses when there are parameters. | |
def eval_block blk | |
^^^ | |
lib/shoes/swt/swt_button.rb:31:17: C: Use def with parentheses when there are parameters. | |
def click blk | |
^^^ | |
lib/shoes/swt/swt_button.rb:47:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/text_block/fitter.rb:4:7: C: Class definition is too long. [131/100] | |
class Fitter | |
^^^^^ | |
lib/shoes/swt/text_block/fitter.rb:4:7: C: Missing top-level class documentation comment. | |
class Fitter | |
^^^^^ | |
lib/shoes/swt/text_block/fitter.rb:87:11: W: Useless assignment to variable - [33mlayout[0m. | |
layout = nil | |
^^^^^^ | |
lib/shoes/swt/text_block/fitter.rb:100:47: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
generate_two_layouts(empty_segment, "", @dsl.text, height) | |
^^ | |
lib/shoes/swt/text_block/fitter.rb:111:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"", | |
^^ | |
lib/shoes/swt/text_block/fitter.rb:129:81: C: Line is too long. [82/80] | |
def position_two_segments(first_layout, second_layout, first_text, height) | |
^^ | |
lib/shoes/swt/text_block/fitter.rb:184:26: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
segment.text = "" | |
^^ | |
lib/shoes/swt/text_block/fitter.rb:197:38: C: Surrounding space missing for operator '+'. | |
ending_offset = offsets[i+1] | |
^ | |
lib/shoes/swt/text_block/cursor_painter.rb:4:7: C: Missing top-level class documentation comment. | |
class CursorPainter | |
^^^^^ | |
lib/shoes/swt/text_block/cursor_painter.rb:20:81: C: Line is too long. [86/80] | |
relative_cursor = @collection.relative_text_position(@text_block_dsl.cursor) | |
^^^^^^ | |
lib/shoes/swt/text_block/cursor_painter.rb:25:1: C: Extra empty line detected at body end. | |
lib/shoes/swt/text_block/cursor_painter.rb:30:11: C: 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: Missing top-level class documentation comment. | |
class TextStyleFactory | |
^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:5:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"single" => 0, | |
^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:6:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"double" => 1, | |
^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:7:9: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
"error" => 2, | |
^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:7:21: C: Avoid comma after the last item of a hash. | |
"error" => 2, | |
^ | |
lib/shoes/swt/text_block/text_style_factory.rb:37:81: C: 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: 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:49:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:50:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_rise(style) | |
^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:54:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_underline(style) | |
^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:55:9: W: 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:55:79: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@gui_style.underline = style[:underline].nil? || style[:underline] == "none" ? false : true | |
^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:55:81: C: 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:59:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_undercolor(style) | |
^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:63:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_strikethrough(style) | |
^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:64:9: W: 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:64:81: C: 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:64:87: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
@gui_style.strikeout = style[:strikethrough].nil? || style[:strikethrough] == "none" ? false : true | |
^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:67:11: C: Do not prefix writer method names with [33mset_[0m. | |
def set_strikecolor(style) | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:77:38: C: Use [33m&&[0m instead of [33mand[0m. | |
return nil if dsl_color.nil? and default.nil? | |
^^^ | |
lib/shoes/swt/text_block/text_style_factory.rb:79:81: C: 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_font_factory.rb:3:5: C: Missing top-level class documentation comment. | |
class TextFontFactory | |
^^^^^ | |
lib/shoes/swt/text_block/text_font_factory.rb:45:25: C: Name [33mreduce[0m block params [33m|a, e|[0m. | |
styles.reduce { |result, s| result | s } | |
^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:4:7: C: Missing top-level class documentation comment. | |
class Painter | |
^^^^^ | |
lib/shoes/swt/text_block/painter.rb:15:13: C: Use snake_case for methods. | |
def paintControl(paint_event) | |
^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:31:9: C: Method has too many lines. [11/10] | |
def default_text_styles | |
^^^ | |
lib/shoes/swt/text_block/painter.rb:33:13: C: Use the new Ruby 1.9 hash syntax. | |
:fg => @style[:fg], | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:34:13: C: Use the new Ruby 1.9 hash syntax. | |
:bg => @style[:bg], | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:35:13: C: Use the new Ruby 1.9 hash syntax. | |
:strikecolor => @style[:strikecolor], | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:36:13: C: Use the new Ruby 1.9 hash syntax. | |
:undercolor => @style[:undercolor], | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:37:13: C: Use the new Ruby 1.9 hash syntax. | |
:font_detail => { | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:38:13: C: Use the new Ruby 1.9 hash syntax. | |
:name => @dsl.font, | |
^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:38:13: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is. | |
:name => @dsl.font, | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:39:13: C: Use the new Ruby 1.9 hash syntax. | |
:size => @dsl.size, | |
^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:40:13: C: Use the new Ruby 1.9 hash syntax. | |
:styles => [::Swt::SWT::NORMAL] | |
^^^^^^^^^^ | |
lib/shoes/swt/text_block/painter.rb:41:11: C: Indent the right brace the same as the start of the line where the left brace is. | |
} | |
^ | |
lib/shoes/swt/text_block/text_segment.rb:21:34: C: Align the parameters of a method call if they span more than one line. | |
:line_bounds, :line_count, :line_offsets | |
^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/text_segment.rb:46:42: C: Surrounding space missing in default value assignment. | |
def get_location(cursor, trailing=false) | |
^ | |
lib/shoes/swt/text_block/text_segment.rb:54:43: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when 'center'; ::Swt::SWT::CENTER | |
^ | |
lib/shoes/swt/text_block/text_segment.rb:55:42: C: Never use [33mwhen x;[0m. Use [33mwhen x then[0m instead. | |
when 'right'; ::Swt::SWT::RIGHT | |
^ | |
lib/shoes/swt/text_block/text_segment.rb:62:36: C: Surrounding space missing in default value assignment. | |
def set_style(styles, range=(0...text.length)) | |
^ | |
lib/shoes/swt/text_block/text_segment.rb:64:81: C: Line is too long. [85/80] | |
style = @style_factory.create_style(font, styles[:fg], styles[:bg], styles) | |
^^^^^ | |
lib/shoes/swt/text_block/text_segment.rb:71:13: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is. | |
name: @dsl.font, | |
^^^^^^^^^^^^^^^ | |
lib/shoes/swt/text_block/text_segment.rb:73:19: C: Space missing after colon. | |
styles:[::Swt::SWT::NORMAL] | |
^ | |
lib/shoes/swt/text_block/text_segment.rb:74:11: C: Indent the right brace the same as the start of the line where the left brace is. | |
} | |
^ | |
lib/shoes/swt/text_block/text_segment_collection.rb:4:7: C: Class definition is too long. [119/100] | |
class TextSegmentCollection | |
^^^^^ | |
lib/shoes/swt/text_block/text_segment_collection.rb:4:7: C: Missing top-level class documentation comment. | |
class TextSegmentCollection | |
^^^^^ | |
lib/shoes/swt/text_block/text_segment_collection.rb:50:20: C: Prefer [33mreduce[0m over [33minject[0m. | |
elements.inject(default_text_styles) do |current_style, element| | |
^^^^^^ | |
lib/shoes/swt/text_block/text_segment_collection.rb:83:81: C: 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: 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: Line is too long. [81/80] | |
result << [@segments.last, (0..text_range.count - slice.length - 1)] | |
^ | |
lib/shoes/swt/shape.rb:3:5: C: Missing top-level class documentation comment. | |
class Shape | |
^^^^^ | |
lib/shoes/swt/shape.rb:9:1: C: Extra blank line detected. | |
lib/shoes/swt/shape.rb:16:32: W: Unused method argument - [33mopts[0m. If it's necessary, use [33m_[0m or [33m_opts[0m as an argument name to indicate that it won't be used. | |
def initialize(dsl, app, opts = {}) | |
^^^^ | |
lib/shoes/swt/shape.rb:41:19: C: Avoid parameter lists longer than 5 parameters. | |
def curve_to(cx1, cy1, cx2, cy2, x, y) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/shape.rb:45:14: C: Avoid parameter lists longer than 5 parameters. | |
def arc(x, y, width, height, start_angle, arc_angle) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/shape.rb:83:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/shape.rb:85:13: C: Do not use [33m::[0m for method calls. | |
Java::float[length].new | |
^^ | |
lib/shoes/swt/shape.rb:122:7: C: Missing top-level class documentation comment. | |
class Painter < Common::Painter | |
^^^^^ | |
lib/shoes/swt/mouse_move_listener.rb:3:5: C: Missing top-level class documentation comment. | |
class MouseMoveListener | |
^^^^^ | |
lib/shoes/swt/mouse_move_listener.rb:6:22: C: Use def with parentheses when there are parameters. | |
def initialize app | |
^^^ | |
lib/shoes/swt/mouse_move_listener.rb:12:35: C: Space missing to the left of {. | |
@app.dsl.mouse_motion.each{|blk| eval_move_block blk, mouse_event} | |
^ | |
lib/shoes/swt/mouse_move_listener.rb:12:35: C: Space between { and | missing. | |
@app.dsl.mouse_motion.each{|blk| eval_move_block blk, mouse_event} | |
^^ | |
lib/shoes/swt/mouse_move_listener.rb:12:74: C: Space missing inside }. | |
@app.dsl.mouse_motion.each{|blk| eval_move_block blk, mouse_event} | |
^ | |
lib/shoes/swt/mouse_move_listener.rb:18:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/mouse_move_listener.rb:29:29: C: Put one space between the method name and the first argument. | |
@app.shell.setCursor Shoes.display.getSystemCursor(cursor) | |
^^ | |
lib/shoes/swt/mouse_move_listener.rb:34:47: C: Use [33m&&[0m instead of [33mand[0m. | |
if !mouse_on?(element, mouse_event) and element.hovered? | |
^^^ | |
lib/shoes/swt/mouse_move_listener.rb:43:46: C: Use [33m&&[0m instead of [33mand[0m. | |
if mouse_on?(element, mouse_event) and !element.hovered? | |
^^^ | |
lib/shoes/swt/app.rb:2:3: C: Missing top-level module documentation comment. | |
module Swt | |
^^^^^^ | |
lib/shoes/swt/app.rb:18:5: C: Class definition is too long. [204/100] | |
class App | |
^^^^^ | |
lib/shoes/swt/app.rb:24:7: C: Method has too many lines. [11/10] | |
def initialize dsl | |
^^^ | |
lib/shoes/swt/app.rb:24:22: C: Use def with parentheses when there are parameters. | |
def initialize dsl | |
^^^ | |
lib/shoes/swt/app.rb:76:22: C: Surrounding space missing in default value assignment. | |
def redraw(left=nil, top=nil, width=nil, height=nil, all=true) | |
^ | |
lib/shoes/swt/app.rb:76:31: C: Surrounding space missing in default value assignment. | |
def redraw(left=nil, top=nil, width=nil, height=nil, all=true) | |
^ | |
lib/shoes/swt/app.rb:76:42: C: Surrounding space missing in default value assignment. | |
def redraw(left=nil, top=nil, width=nil, height=nil, all=true) | |
^ | |
lib/shoes/swt/app.rb:76:54: C: Surrounding space missing in default value assignment. | |
def redraw(left=nil, top=nil, width=nil, height=nil, all=true) | |
^ | |
lib/shoes/swt/app.rb:76:63: C: Surrounding space missing in default value assignment. | |
def redraw(left=nil, top=nil, width=nil, height=nil, all=true) | |
^ | |
lib/shoes/swt/app.rb:77:9: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
unless @real.disposed? | |
^^^^^^ | |
lib/shoes/swt/app.rb:78:14: C: Don't use parentheses around the condition of an [33mif[0m. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/app.rb:78:20: C: Prefer the use of the [33mnil?[0m predicate. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:78:27: C: Use [33m||[0m instead of [33mor[0m. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:78:34: C: Prefer the use of the [33mnil?[0m predicate. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:78:41: C: Use [33m||[0m instead of [33mor[0m. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:78:50: C: Prefer the use of the [33mnil?[0m predicate. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:78:57: C: Use [33m||[0m instead of [33mor[0m. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:78:67: C: Prefer the use of the [33mnil?[0m predicate. | |
if (left == nil or top == nil or width == nil or height == nil) | |
^^ | |
lib/shoes/swt/app.rb:91:9: C: 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: 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:128:7: C: Use [33mattr_reader[0m to define trivial reader methods. | |
def started? | |
^^^ | |
lib/shoes/swt/app.rb:148:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/app.rb:152:81: C: Line is too long. [87/80] | |
selection_listener = SelectionListener.new(scroll_bar) do |vertical_bar, event| | |
^^^^^^^ | |
lib/shoes/swt/app.rb:153:14: C: Redundant [33mself[0m detected. | |
if self.shell.getVerticalBar.getVisible and event.detail != ::Swt::SWT::DRAG | |
^^^^^^^^^^ | |
lib/shoes/swt/app.rb:153:51: C: Use [33m&&[0m instead of [33mand[0m. | |
if self.shell.getVerticalBar.getVisible and event.detail != ::Swt::SWT::DRAG | |
^^^ | |
lib/shoes/swt/app.rb:161:20: C: Redundant [33mself[0m detected. | |
location = self.real.getLocation | |
^^^^^^^^^ | |
lib/shoes/swt/app.rb:163:9: C: Redundant [33mself[0m detected. | |
self.real.setLocation location | |
^^^^^^^^^ | |
lib/shoes/swt/app.rb:175:16: C: Avoid using {...} for multi-line blocks. | |
lambda { |event| | |
^ | |
lib/shoes/swt/app.rb:175:19: W: Unused block argument - [33mevent[0m. If it's necessary, use [33m_[0m or [33m_event[0m as an argument name to indicate that it won't be used. Also consider using a proc without arguments instead of a lambda if you want it to accept any arguments but don't care about them. | |
lambda { |event| | |
^^^^^ | |
lib/shoes/swt/app.rb:177:37: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
Dir[File.join(Dir.tmpdir, "__shoes4_*.png")].each{|f| File.delete f} | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/app.rb:177:60: C: Space missing to the left of {. | |
Dir[File.join(Dir.tmpdir, "__shoes4_*.png")].each{|f| File.delete f} | |
^ | |
lib/shoes/swt/app.rb:177:60: C: Space between { and | missing. | |
Dir[File.join(Dir.tmpdir, "__shoes4_*.png")].each{|f| File.delete f} | |
^^ | |
lib/shoes/swt/app.rb:177:78: C: Space missing inside }. | |
Dir[File.join(Dir.tmpdir, "__shoes4_*.png")].each{|f| File.delete f} | |
^ | |
lib/shoes/swt/app.rb:199:11: C: Align the parameters of a method call if they span more than one line. | |
::Swt::SWT::TRANSPARENT | ::Swt::SWT::NO_RADIO_GROUP) | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/app.rb:225:18: W: Unused block argument - [33mevent[0m. You can omit the argument if you don't care about it. | |
proc do |event| | |
^^^^^ | |
lib/shoes/swt/app.rb:238:27: C: Avoid comma after the last item of a hash. | |
Keyrelease => [], | |
^ | |
lib/shoes/swt/app.rb:270:1: C: Extra empty line detected at body end. | |
lib/shoes/swt/app.rb:273:5: C: Missing top-level class documentation comment. | |
class ShellControlListener | |
^^^^^ | |
lib/shoes/swt/app.rb:278:11: C: Use snake_case for methods. | |
def controlResized(event) | |
^^^^^^^^^^^^^^ | |
lib/shoes/swt/app.rb:286:39: C: Space missing to the left of {. | |
@app.dsl.resize_callbacks.each{|blk| blk.call} | |
^ | |
lib/shoes/swt/app.rb:286:39: C: Space between { and | missing. | |
@app.dsl.resize_callbacks.each{|blk| blk.call} | |
^^ | |
lib/shoes/swt/app.rb:286:54: C: Space missing inside }. | |
@app.dsl.resize_callbacks.each{|blk| blk.call} | |
^ | |
lib/shoes/swt/app.rb:289:11: C: Use snake_case for methods. | |
def controlMoved(e) | |
^^^^^^^^^^^^ | |
lib/shoes/swt/app.rb:289:24: W: Unused method argument - [33me[0m. If it's necessary, use [33m_[0m or [33m_e[0m as an argument name to indicate that it won't be used. You can also write as [33mcontrolMoved(*)[0m if you want the method to accept any arguments but don't care about them. | |
def controlMoved(e) | |
^ | |
lib/shoes/swt/app.rb:293:5: C: Missing top-level class documentation comment. | |
class MouseListener | |
^^^^^ | |
lib/shoes/swt/app.rb:294:22: C: Use def with parentheses when there are parameters. | |
def initialize app | |
^^^ | |
lib/shoes/swt/app.rb:298:11: C: Use snake_case for methods. | |
def mouseDown(e) | |
^^^^^^^^^ | |
lib/shoes/swt/app.rb:303:11: C: Use snake_case for methods. | |
def mouseUp(e) | |
^^^^^^^ | |
lib/shoes/swt/app.rb:308:11: C: Use snake_case for methods. | |
def mouseDoubleClick(e) | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/app.rb:308:28: W: Unused method argument - [33me[0m. If it's necessary, use [33m_[0m or [33m_e[0m as an argument name to indicate that it won't be used. You can also write as [33mmouseDoubleClick(*)[0m if you want the method to accept any arguments but don't care about them. | |
def mouseDoubleClick(e) | |
^ | |
lib/shoes/swt/app.rb:312:1: C: Extra empty line detected at body end. | |
lib/shoes/swt/app.rb:315:1: C: 1 trailing blank lines detected. | |
lib/shoes/swt/version.rb:2:3: C: Missing top-level module documentation comment. | |
module Swt | |
^^^^^^ | |
lib/shoes/swt/version.rb:3:15: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
VERSION = "4.0.0.pre1" | |
^^^^^^^^^^^^ | |
lib/shoes/swt/rect_painter.rb:3:5: C: Missing top-level class documentation comment. | |
class RectPainter < Common::Painter | |
^^^^^ | |
lib/shoes/swt/rect_painter.rb:9:59: C: Surrounding space missing for operator '*'. | |
@obj.corners*2, | |
^ | |
lib/shoes/swt/rect_painter.rb:10:59: C: Surrounding space missing for operator '*'. | |
@obj.corners*2) | |
^ | |
lib/shoes/swt/rect_painter.rb:15:50: C: Surrounding space missing for operator '+'. | |
gc.draw_round_rectangle(@obj.element_left+stroke_width/2, | |
^ | |
lib/shoes/swt/rect_painter.rb:15:63: C: Surrounding space missing for operator '/'. | |
gc.draw_round_rectangle(@obj.element_left+stroke_width/2, | |
^ | |
lib/shoes/swt/rect_painter.rb:16:49: C: Surrounding space missing for operator '+'. | |
@obj.element_top+stroke_width/2, | |
^ | |
lib/shoes/swt/rect_painter.rb:16:62: C: Surrounding space missing for operator '/'. | |
@obj.element_top+stroke_width/2, | |
^ | |
lib/shoes/swt/rect_painter.rb:17:51: C: Surrounding space missing for operator '-'. | |
@obj.element_width-stroke_width, | |
^ | |
lib/shoes/swt/rect_painter.rb:18:52: C: Surrounding space missing for operator '-'. | |
@obj.element_height-stroke_width, | |
^ | |
lib/shoes/swt/rect_painter.rb:19:45: C: Surrounding space missing for operator '*'. | |
@obj.corners*2, @obj.corners*2) | |
^ | |
lib/shoes/swt/rect_painter.rb:19:61: C: Surrounding space missing for operator '*'. | |
@obj.corners*2, @obj.corners*2) | |
^ | |
lib/shoes/swt/rect_painter.rb:23:4: C: Final newline missing. | |
end | |
lib/shoes/swt/background.rb:3:5: C: Missing top-level class documentation comment. | |
class Background | |
^^^^^ | |
lib/shoes/swt/background.rb:34:7: C: Missing top-level class documentation comment. | |
class Painter < RectPainter | |
^^^^^ | |
lib/shoes/swt/background.rb:35:24: W: Unused method argument - [33mgc[0m. If it's necessary, use [33m_[0m or [33m_gc[0m as an argument name to indicate that it won't be used. You can also write as [33mdraw_setup(*)[0m if you want the method to accept any arguments but don't care about them. | |
def draw_setup(gc) | |
^^ | |
lib/shoes/swt/common/update_position.rb:4:7: C: Missing top-level module documentation comment. | |
module UpdatePosition | |
^^^^^^ | |
lib/shoes/swt/common/update_position.rb:8:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
unless @real.disposed? | |
^^^^^^ | |
lib/shoes/swt/common/update_position.rb:15:4: C: Final newline missing. | |
end | |
lib/shoes/swt/common/stroke.rb:10:81: C: 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: 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:1: C: Extra blank line detected. | |
lib/shoes/swt/common/stroke.rb:32:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if stroke | |
^^ | |
lib/shoes/swt/common/stroke.rb:33:68: C: Surrounding space missing for operator '/'. | |
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: Line is too long. [136/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:102: C: Surrounding space missing for operator '/'. | |
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:34:81: C: Line is too long. [87/80] | |
stroke.apply_as_stroke(context, l, t, element_width, element_height, angle) | |
^^^^^^^ | |
lib/shoes/swt/common/painter.rb:4:7: C: Missing top-level class documentation comment. | |
class Painter | |
^^^^^ | |
lib/shoes/swt/common/painter.rb:29:81: C: 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: Cyclomatic complexity for paint_object is too high. [7/6] | |
def paint_object(graphics_context) | |
^^^ | |
lib/shoes/swt/common/painter.rb:32:9: C: Method has too many lines. [16/10] | |
def paint_object(graphics_context) | |
^^^ | |
lib/shoes/swt/common/painter.rb:39:13: C: Indent [33mwhen[0m as deep as [33mcase[0m. | |
when ::Shoes::Oval, ::Shoes::Rect | |
^^^^ | |
lib/shoes/swt/common/painter.rb:41:62: C: Surrounding space missing for operator '/'. | |
obj.element_left + obj.element_width/2.0, | |
^ | |
lib/shoes/swt/common/painter.rb:42:62: C: Surrounding space missing for operator '/'. | |
obj.element_top + obj.element_height/2.0 do | |
^ | |
lib/shoes/swt/common/painter.rb:58:18: W: Unused method argument - [33mgraphics_context[0m. If it's necessary, use [33m_[0m or [33m_graphics_context[0m as an argument name to indicate that it won't be used. You can also write as [33mfill(*)[0m if you want the method to accept any arguments but don't care about them. | |
def fill(graphics_context) | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/common/painter.rb:67:18: W: Unused method argument - [33mgraphics_context[0m. If it's necessary, use [33m_[0m or [33m_graphics_context[0m as an argument name to indicate that it won't be used. You can also write as [33mdraw(*)[0m if you want the method to accept any arguments but don't care about them. | |
def draw(graphics_context) | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/common/painter.rb:70:9: C: Method has too many lines. [11/10] | |
def set_rotate graphics_context, angle, left, top | |
^^^ | |
lib/shoes/swt/common/painter.rb:70:24: C: Use def with parentheses when there are parameters. | |
def set_rotate graphics_context, angle, left, top | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/common/painter.rb:72:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if block_given? | |
^^ | |
lib/shoes/swt/common/painter.rb:84:26: C: Use def with parentheses when there are parameters. | |
def reset_rotate transform, graphics_context, angle, left, top | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/common/painter.rb:87:31: W: 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/remove.rb:4:7: C: Missing top-level module documentation comment. | |
module Remove | |
^^^^^^ | |
lib/shoes/swt/common/remove.rb:21:9: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/common/clickable.rb:4:7: C: Missing top-level module documentation comment. | |
module Clickable | |
^^^^^^ | |
lib/shoes/swt/common/clickable.rb:5:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/common/clickable.rb:25:9: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/common/clickable.rb:41:9: C: Missing top-level class documentation comment. | |
class ClickListener | |
^^^^^ | |
lib/shoes/swt/common/clickable.rb:49:15: C: Use snake_case for methods. | |
def handleEvent(mouse_event) | |
^^^^^^^^^^^ | |
lib/shoes/swt/common/clickable.rb:50:13: C: 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/clickable.rb:63:1: C: Extra empty line detected at body end. | |
lib/shoes/swt/common/selection_listener.rb:1:1: C: Carriage return character detected. | |
class Shoes | |
^^^^^^^^^^^ | |
lib/shoes/swt/common/selection_listener.rb:3:5: C: Missing top-level class documentation comment. | |
class SelectionListener | |
^^^^^ | |
lib/shoes/swt/common/selection_listener.rb:4:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/common/selection_listener.rb:5:22: C: Use def with parentheses when there are parameters. | |
def initialize radio, &blk | |
^^^^^^^^^^^ | |
lib/shoes/swt/common/selection_listener.rb:9:7: C: Use empty lines between defs. | |
def widget_selected event | |
^^^ | |
lib/shoes/swt/common/selection_listener.rb:9:27: C: Use def with parentheses when there are parameters. | |
def widget_selected event | |
^^^^^ | |
lib/shoes/swt/common/fill.rb:10:81: C: 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:29:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if fill | |
^^ | |
lib/shoes/swt/common/fill.rb:30:73: C: Surrounding space missing for operator '/'. | |
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:30:81: C: Line is too long. [141/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:30:107: C: Surrounding space missing for operator '/'. | |
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: Line is too long. [88/80] | |
fill.apply_as_fill(context, left, top, element_width, element_height, angle) | |
^^^^^^^^ | |
lib/shoes/swt/common/resource.rb:4:7: C: Missing top-level module documentation comment. | |
module Resource | |
^^^^^^ | |
lib/shoes/swt/common/resource.rb:13:33: C: Space missing to the left of {. | |
@graphic_contexts.each{|g| g.dispose if g} | |
^ | |
lib/shoes/swt/common/resource.rb:13:33: C: Space between { and | missing. | |
@graphic_contexts.each{|g| g.dispose if g} | |
^^ | |
lib/shoes/swt/common/resource.rb:13:52: C: Space missing inside }. | |
@graphic_contexts.each{|g| g.dispose if g} | |
^ | |
lib/shoes/swt/common/resource.rb:17:13: C: Do not prefix writer method names with [33mset_[0m. | |
def set_defaults_on_context(graphics_context) | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/common/toggle.rb:4:7: C: Missing top-level module documentation comment. | |
module Toggle | |
^^^^^^ | |
lib/shoes/swt/common/toggle.rb:6:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if @real && @real.respond_to?(:set_visible) | |
^^ | |
lib/shoes/swt/common/painter_updates_position.rb:4:7: C: Missing top-level module documentation comment. | |
module PainterUpdatesPosition | |
^^^^^^ | |
lib/shoes/swt/common/painter_updates_position.rb:5:80: C: Trailing whitespace detected. | |
# No-op. This object manages its own position with its own painter. The | |
^ | |
lib/shoes/swt/common/painter_updates_position.rb:12:4: C: Final newline missing. | |
end | |
lib/shoes/swt/font.rb:1:1: C: Missing top-level class documentation comment. | |
class Shoes | |
^^^^^ | |
lib/shoes/swt/font.rb:2:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/font.rb:4:5: C: Missing top-level module documentation comment. | |
module Font | |
^^^^^^ | |
lib/shoes/swt/font.rb:7:11: C: Use a guard clause instead of wrapping the code inside a conditional expression. | |
if File.exist? path | |
^^ | |
lib/shoes/swt/font.rb:13:28: C: Missing space after #. | |
load_shoes_fonts #system fonts are loaded automatically by SWT | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/font.rb:17:9: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/font.rb:23:81: C: Line is too long. [82/80] | |
::Shoes::Font.font_paths_from_dir(::Shoes::FONT_DIR).each do |font_path| | |
^^ | |
lib/shoes/swt/font.rb:31:36: C: Space between { and | missing. | |
::Shoes::Font.initial_fonts.each {|font| Shoes::FONTS << font} | |
^^ | |
lib/shoes/swt/font.rb:31:64: C: Space missing inside }. | |
::Shoes::Font.initial_fonts.each {|font| Shoes::FONTS << font} | |
^ | |
lib/shoes/swt/font.rb:32:4: C: Final newline missing. | |
end | |
lib/shoes/swt/timer.rb:3:5: C: Missing top-level class documentation comment. | |
class Timer | |
^^^^^ | |
lib/shoes/swt/timer.rb:6:16: C: Use [33mproc[0m instead of [33mProc.new[0m. | |
task = Proc.new do | |
^^^^^^^^ | |
lib/shoes/swt/timer.rb:7:11: C: 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/dialog.rb:3:5: C: Missing top-level class documentation comment. | |
class Dialog | |
^^^^^ | |
lib/shoes/swt/dialog.rb:18:26: C: Use def with parentheses when there are parameters. | |
def dialog_chooser title, folder=false | |
^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/dialog.rb:18:39: C: Surrounding space missing in default value assignment. | |
def dialog_chooser title, folder=false | |
^ | |
lib/shoes/swt/dialog.rb:21:112: C: 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:26:15: C: Use def with parentheses when there are parameters. | |
def ask msg, args | |
^^^^^^^^^ | |
lib/shoes/swt/dialog.rb:30:21: C: Use def with parentheses when there are parameters. | |
def ask_color title | |
^^^^^ | |
lib/shoes/swt/dialog.rb:35:81: C: 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/dialog.rb:38:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/dialog.rb:51:5: C: Missing top-level class documentation comment. | |
class AskDialog < ::Swt::Widgets::Dialog | |
^^^^^ | |
lib/shoes/swt/dialog.rb:52:22: C: Use def with parentheses when there are parameters. | |
def initialize shell, msg, args | |
^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/dialog.rb:53:28: C: Surrounding space missing for operator '='. | |
@shell, @msg, @args= shell, msg, args | |
^ | |
lib/shoes/swt/dialog.rb:57:7: C: Method has too many lines. [29/10] | |
def open | |
^^^ | |
lib/shoes/swt/dialog.rb:67:81: C: Line is too long. [138/80] | |
styles = @args[:secret] ? ::Swt::SWT::BORDER | ::Swt::SWT::SINGLE | ::Swt::SWT::PASSWORD : ::Swt::SWT::BORDER | ::Swt::SWT::SINGLE | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/dialog.rb:75:31: C: Space missing to the left of {. | |
b.addSelectionListener{|e| @ret = text.getText; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:75:31: C: Space between { and | missing. | |
b.addSelectionListener{|e| @ret = text.getText; @shell.close} | |
^^ | |
lib/shoes/swt/dialog.rb:75:33: W: Unused block argument - [33me[0m. You can omit the argument if you don't care about it. | |
b.addSelectionListener{|e| @ret = text.getText; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:75:55: C: Do not use semicolons to terminate expressions. | |
b.addSelectionListener{|e| @ret = text.getText; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:75:69: C: Space missing inside }. | |
b.addSelectionListener{|e| @ret = text.getText; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:80:31: C: Space missing to the left of {. | |
b.addSelectionListener{|e| @ret = nil; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:80:31: C: Space between { and | missing. | |
b.addSelectionListener{|e| @ret = nil; @shell.close} | |
^^ | |
lib/shoes/swt/dialog.rb:80:33: W: Unused block argument - [33me[0m. You can omit the argument if you don't care about it. | |
b.addSelectionListener{|e| @ret = nil; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:80:46: C: Do not use semicolons to terminate expressions. | |
b.addSelectionListener{|e| @ret = nil; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:80:60: C: Space missing inside }. | |
b.addSelectionListener{|e| @ret = nil; @shell.close} | |
^ | |
lib/shoes/swt/dialog.rb:82:9: C: Favor [33muntil[0m over [33mwhile[0m for negative conditions. | |
while [email protected] do | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/dialog.rb:82:9: C: Favor modifier [33mwhile[0m usage when having a single-line body. | |
while [email protected] do | |
^^^^^ | |
lib/shoes/swt/dialog.rb:82:34: C: Never use [33mdo[0m with multi-line [33mwhile[0m. | |
while [email protected] do | |
^^ | |
lib/shoes/swt/rect.rb:3:5: C: Missing top-level class documentation comment. | |
class Rect | |
^^^^^ | |
lib/shoes/swt/input_box.rb:47:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/input_box.rb:56:5: C: Missing top-level class documentation comment. | |
class EditLine < InputBox | |
^^^^^ | |
lib/shoes/swt/input_box.rb:65:5: C: Missing top-level class documentation comment. | |
class EditBox < InputBox | |
^^^^^ | |
lib/shoes/swt/input_box.rb:66:81: C: Line is too long. [103/80] | |
DEFAULT_STYLES = ::Swt::SWT::MULTI | ::Swt::SWT::BORDER | ::Swt::SWT::WRAP | ::Swt::SWT::V_SCROLL | |
^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/input_box.rb:71:1: C: Extra empty line detected at body end. | |
lib/shoes/swt/tooling/leak_hunter.rb:35:6: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
puts "Registered Ctrl+Alt+Q for leak hunting clean shutdown." | |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/image.rb:3:5: C: Class definition is too long. [101/100] | |
class Image | |
^^^^^ | |
lib/shoes/swt/image.rb:3:5: C: Missing top-level class documentation comment. | |
class Image | |
^^^^^ | |
lib/shoes/swt/image.rb:31:7: C: Keep a blank line before and after [33mprivate[0m. | |
private | |
^^^^^^^ | |
lib/shoes/swt/image.rb:43:25: C: Use %r for regular expressions matching more than 1 '/' character. | |
name_or_data =~ /^(http|https):\/\// | |
^^^^^^^^^^^^^^^^^^^^ | |
lib/shoes/swt/image.rb:83:81: C: 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:121:81: C: 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/image.rb:125:1: C: Extra empty line detected at body end. | |
lib/shoes/swt/border.rb:3:5: C: Missing top-level class documentation comment. | |
class Border | |
^^^^^ | |
lib/shoes/swt/border.rb:27:7: C: Missing top-level class documentation comment. | |
class Painter < RectPainter | |
^^^^^ | |
lib/shoes/swt/border.rb:28:1: C: Extra empty line detected at body beginning. | |
lib/shoes/swt/border.rb:29:24: W: Unused method argument - [33mgc[0m. If it's necessary, use [33m_[0m or [33m_gc[0m as an argument name to indicate that it won't be used. You can also write as [33mfill_setup(*)[0m if you want the method to accept any arguments but don't care about them. | |
def fill_setup(gc) | |
^^ | |
lib/rubygems_plugin.rb:7:41: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
uninstalling_shoes = gem.spec.name == "shoes" | |
^^^^^^^ | |
lib/rubygems_plugin.rb:8:30: W: [33mFile.exists?[0m is deprecated in favor of [33mFile.exist?[0m. | |
missing_executable = !File.exists?(File.join(Gem.bindir, "ruby-shoes")) && | |
^^^^^^^ | |
lib/rubygems_plugin.rb:8:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
missing_executable = !File.exists?(File.join(Gem.bindir, "ruby-shoes")) && | |
^^^^^^^^^^^^ | |
lib/rubygems_plugin.rb:9:30: W: [33mFile.exists?[0m is deprecated in favor of [33mFile.exist?[0m. | |
!File.exists?(File.join(Gem.bindir, "ruby-shoes.bat")) | |
^^^^^^^ | |
lib/rubygems_plugin.rb:9:60: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
!File.exists?(File.join(Gem.bindir, "ruby-shoes.bat")) | |
^^^^^^^^^^^^^^^^ | |
lib/rubygems_plugin.rb:12:10: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
puts "Removing shoes" | |
^^^^^^^^^^^^^^^^ | |
lib/rubygems_plugin.rb:14:42: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.rm(File.join(Gem.bindir, "shoes.bat")) | |
^^^^^^^^^^^ | |
lib/rubygems_plugin.rb:16:42: C: Prefer single-quoted strings when you don't need string interpolation or special symbols. | |
FileUtils.rm(File.join(Gem.bindir, "shoes")) | |
^^^^^^^ | |
164 files inspected, 2035 offenses detected |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment