You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2356 lines
145 KiB
2356 lines
145 KiB
Inspecting 64 files |
|
WCCWCCWCCCCCCC.C.CCCCCCCCCCCWCCWCCCWWCCCWCCCWCCWCCCCCCC.CWWCCWCC |
|
|
|
Offenses: |
|
|
|
bin/squib:12:81: C: Line is too long. [110/80] |
|
c.description 'Creates a new Squib project scaffolding in PATH. Must be a new directory or already empty.' |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
bin/squib:14:24: W: Unused block argument - options. If it's necessary, use _ or _options as an argument name to indicate that it won't be used. |
|
c.action do |args, options| |
|
^^^^^^^ |
|
bin/squib:19:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/autoscale_font.rb:7:13: C: Prefer reduce over inject. |
|
str_array.inject([]) do | memo, str | |
|
^^^^^^ |
|
doc/samples/autoscale_font.rb:27:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/basic.rb:4:8: C: Space inside { missing. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^ |
|
doc/samples/basic.rb:4:19: C: Use %w or %W for array of words. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/basic.rb:5:22: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/basic.rb:5:24: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/basic.rb:5:27: C: Space inside } missing. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/basic.rb:16:4: C: Inconsistent indentation detected. |
|
png range: [0,2], file: 'shiny-purse.png', x: 620, y: 75 |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/basic.rb:16:17: C: Space missing after comma. |
|
png range: [0,2], file: 'shiny-purse.png', x: 620, y: 75 |
|
^ |
|
doc/samples/basic.rb:17:4: C: Inconsistent indentation detected. |
|
svg range: 1..2, file: 'spanner.svg', x: 620, y: 218 |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/basic.rb:19:38: C: Missing space after #. |
|
save prefix: 'basic_', format: :png#, progress_bar: true |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/basic.rb:19:38: C: Put a space before an end-of-line comment. |
|
save prefix: 'basic_', format: :png#, progress_bar: true |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/basic.rb:20:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/colors.rb:7:48: C: Surrounding space missing for operator '+='. |
|
text color: '#f00', str: '3-hex', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:8:56: C: Surrounding space missing for operator '+='. |
|
text color: '#f00', str: '3-hex (alpha)', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:9:51: C: Surrounding space missing for operator '+='. |
|
text color: '#ff0000', str: '6-hex', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:10:62: C: Surrounding space missing for operator '+='. |
|
text color: '#ff000099', str: '8-hex(alpha) *', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:11:58: C: Surrounding space missing for operator '+='. |
|
text color: '#ffff00000000', str: '12-hex', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:12:70: C: Surrounding space missing for operator '+='. |
|
text color: '#ffff000000009999', str: '12-hex (alpha)', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:13:73: W: Useless assignment to variable - y. |
|
text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y+=50 |
|
^ |
|
doc/samples/colors.rb:13:74: C: Surrounding space missing for operator '+='. |
|
text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y+=50 |
|
^^ |
|
doc/samples/colors.rb:16:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/custom_config.rb:19:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/draw_shapes.rb:19:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/excel.rb:16:3: W: Useless assignment to variable - data. |
|
data = xlsx file: 'sample.xlsx', sheet: 2 |
|
^^^^ |
|
doc/samples/hello_world.rb:7:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/load_images.rb:16:81: C: Line is too long. [81/80] |
|
svg file: 'spanner.svg', id: 'backdrop', x: 50, y: 450, width: 125, height: 125 |
|
^ |
|
doc/samples/portrait-landscape.rb:1:1: C: Use snake_case for source file names. |
|
require 'squib' |
|
^ |
|
doc/samples/portrait-landscape.rb:23:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/ranges.rb:4:8: C: Space inside { missing. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^ |
|
doc/samples/ranges.rb:4:19: C: Use %w or %W for array of words. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/ranges.rb:5:19: C: Use %w or %W for array of words. |
|
'type' => ['Thug', 'Thinker', 'Thinker'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/ranges.rb:6:22: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/ranges.rb:6:24: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/ranges.rb:6:27: C: Space inside } missing. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/ranges.rb:20:62: C: Space missing after colon. |
|
text range: 0..1, str: 'Thief and Grifter only!!', x: 25, y:200 |
|
^ |
|
doc/samples/ranges.rb:30:17: C: Space missing after comma. |
|
text range: [0,2], str: 'Thief and Mastermind only!!', x: 25, y:300 |
|
^ |
|
doc/samples/ranges.rb:30:66: C: Space missing after colon. |
|
text range: [0,2], str: 'Thief and Mastermind only!!', x: 25, y:300 |
|
^ |
|
doc/samples/ranges.rb:33:81: C: Line is too long. [87/80] |
|
# corresponds to the deck's cards. This allows for each card to be styled differently |
|
^^^^^^^ |
|
doc/samples/ranges.rb:34:81: C: Line is too long. [110/80] |
|
# This renders three cards, with three strings that had three different colors at three different locations. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/ranges.rb:42:10: C: Space found before semicolon. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
doc/samples/ranges.rb:42:11: C: Do not use semicolons to terminate expressions. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
doc/samples/ranges.rb:42:41: C: Space missing to the left of {. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
doc/samples/ranges.rb:42:48: C: Space missing after comma. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
doc/samples/ranges.rb:42:64: C: Space missing inside }. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
doc/samples/ranges.rb:45:9: C: Space missing after colon. |
|
x:25, y: 400 |
|
^ |
|
doc/samples/ranges.rb:48:12: C: Do not use semicolons to terminate expressions. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
doc/samples/ranges.rb:48:42: C: Space missing to the left of {. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
doc/samples/ranges.rb:48:46: C: Space missing after comma. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
doc/samples/ranges.rb:48:71: C: Space missing inside }. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
doc/samples/ranges.rb:51:9: C: Space missing after colon. |
|
x:25, y: 500 |
|
^ |
|
doc/samples/ranges.rb:55:1: C: 1 trailing blank lines detected. |
|
doc/samples/save_pdf.rb:12:3: C: Missing space after #. |
|
#Note that our PNGs still are not trimmed even though the pdf ones are |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/text_options.rb:4:8: C: Space inside { missing. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^ |
|
doc/samples/text_options.rb:4:19: C: Use %w or %W for array of words. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/text_options.rb:5:22: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/text_options.rb:5:24: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/text_options.rb:5:27: C: Space inside } missing. |
|
'level' => [1,2,3]} |
|
^ |
|
doc/samples/text_options.rb:6:81: C: Line is too long. [745/80] |
|
longtext = "This is left-justified text.\nWhat do you know about tweetle beetles? well... \nWhen tweetle beetles fight, it's called a tweetle beetle battle. And when they battle in a puddle, it's a tweetle beetle puddle battle. AND when tweetle beetles battle with paddles in a puddle, they call it a tweetle beetle puddle paddle battle. AND... When beetles battle beetles in a puddle paddle battle and the beetle battle puddle is a puddle in a bottle... ..they call this a tweetle beetle bottle puddle paddle battle muddle. AND... When beetles fight these battles in a bottle with their paddles and the bottle's on a poodle and the poodle's eating noodles... ...they call this a muddle puddle tweetle poodle beetle noodle bottle paddle battle." |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/text_options.rb:19:46: C: Space missing after colon. |
|
text str: 'Font strings are expressive!', x:65, y: 200, |
|
^ |
|
doc/samples/text_options.rb:22:46: C: Space missing after colon. |
|
text str: 'Font strings are expressive!', x:65, y: 300, |
|
^ |
|
doc/samples/text_options.rb:28:81: C: Line is too long. [107/80] |
|
text str: 'This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint', |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/text_options.rb:35:81: C: Line is too long. [119/80] |
|
text str: 'Ellipsization!\nThe ultimate question of life, the universe, and everything to life and everything is 42', |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
doc/samples/tgc_proofs.rb:17:31: C: Space missing after colon. |
|
png file: 'pokercard.png', x:0, y:0, alpha: 0.5 |
|
^ |
|
doc/samples/tgc_proofs.rb:17:36: C: Space missing after colon. |
|
png file: 'pokercard.png', x:0, y:0, alpha: 0.5 |
|
^ |
|
doc/samples/tgc_proofs.rb:20:4: C: Final newline missing. |
|
end |
|
|
|
doc/samples/use_layout.rb:30:3: C: Missing space after #. |
|
#require 'pp' |
|
^^^^^^^^^^^^^ |
|
doc/samples/use_layout.rb:31:3: C: Missing space after #. |
|
#pp @layout |
|
^^^^^^^^^^^ |
|
doc/samples/use_layout.rb:34:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/api/background.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/background.rb:7:81: C: Line is too long. [111/80] |
|
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/background.rb:9:81: C: Line is too long. [154/80] |
|
# @option opts range [Enumerable] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/background.rb:10:81: C: Line is too long. [135/80] |
|
# @option opts color [String] (:black) the color the font will render to. See {file:README.md#Specifying_Colors Specifying Colors}. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/background.rb:14:24: C: Space missing after comma. |
|
opts = needs(opts,[:range, :color]) |
|
^ |
|
lib/squib/api/background.rb:17:1: C: Extra empty line detected at body end. |
|
lib/squib/api/background.rb:19:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/api/data.rb:3:1: C: Missing top-level module documentation comment. |
|
module Squib |
|
^^^^^^ |
|
lib/squib/api/data.rb:4:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/data.rb:7:81: C: Line is too long. [105/80] |
|
# Pulls the data into a Hash of arrays based on the columns. First row is assumed to be the header row. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/data.rb:19:81: C: Line is too long. [111/80] |
|
# @option opts file [String] the file to open. Must end in `.xlsx`. Opens relative to the current directory. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/data.rb:20:81: C: Line is too long. [90/80] |
|
# @option opts sheet [Integer] (0) The zero-based index of the sheet from which to read. |
|
^^^^^^^^^^ |
|
lib/squib/api/data.rb:23:3: C: Method has too many lines. [15/10] |
|
def xlsx(opts = {}) |
|
^^^ |
|
lib/squib/api/data.rb:30:34: C: Space missing after comma. |
|
header = s.cell(s.first_row,col).to_s |
|
^ |
|
lib/squib/api/data.rb:32:19: C: Surrounding space missing for operator '+'. |
|
(s.first_row+1).upto(s.last_row) do |row| |
|
^ |
|
lib/squib/api/data.rb:33:26: C: Space missing after comma. |
|
cell = s.cell(row,col) |
|
^ |
|
lib/squib/api/data.rb:35:34: C: Space missing after comma. |
|
cell = s.excelx_value(row,col) if s.excelx_type(row,col) == [:numeric_or_formula, 'General'] |
|
^ |
|
lib/squib/api/data.rb:35:60: C: Space missing after comma. |
|
cell = s.excelx_value(row,col) if s.excelx_type(row,col) == [:numeric_or_formula, 'General'] |
|
^ |
|
lib/squib/api/data.rb:35:81: C: Line is too long. [100/80] |
|
cell = s.excelx_value(row,col) if s.excelx_type(row,col) == [:numeric_or_formula, 'General'] |
|
^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/data.rb:37:10: C: Missing space after #. |
|
end#row |
|
^^^^ |
|
lib/squib/api/data.rb:37:10: C: Put a space before an end-of-line comment. |
|
end#row |
|
^^^^ |
|
lib/squib/api/data.rb:38:8: C: Missing space after #. |
|
end#col |
|
^^^^ |
|
lib/squib/api/data.rb:38:8: C: Put a space before an end-of-line comment. |
|
end#col |
|
^^^^ |
|
lib/squib/api/data.rb:40:6: C: Missing space after #. |
|
end#xlsx |
|
^^^^^ |
|
lib/squib/api/data.rb:40:6: C: Put a space before an end-of-line comment. |
|
end#xlsx |
|
^^^^^ |
|
lib/squib/api/data.rb:43:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/data.rb:44:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/data.rb:49:1: C: Extra empty line detected at body end. |
|
lib/squib/api/data.rb:52:1: C: 1 trailing blank lines detected. |
|
lib/squib/api/image.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/image.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/image.rb:6:81: C: Line is too long. [120/80] |
|
# See {file:samples/image.rb samples/image.rb} and {file:samples/tgc-overlay.rb samples/tgc-overlay.rb} as examples. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:11:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:12:81: C: Line is too long. [408/80] |
|
# @option opts file [String] ((empty)) file(s) to read in. If it's a single file, then it's use for every card in range. If the parameter is an Array of files, then each file is looked up for each card. If any of them are nil or '', nothing is done. See {file:README.md#Specifying_Files Specifying Files}. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:13:81: C: Line is too long. [157/80] |
|
# @option opts x [Integer] (0) the x-coordinate to place. Supports Arrays, see {file:README#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:14:81: C: Line is too long. [157/80] |
|
# @option opts y [Integer] (0) the y-coordinate to place. Supports Arrays, see {file:README#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:15:81: C: Line is too long. [256/80] |
|
# @option opts layout [String, Symbol] (nil) entry in the layout to use as defaults for this command. See {file:README.md#Custom_Layouts Custom Layouts}. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:16:81: C: Line is too long. [199/80] |
|
# @option opts alpha [Decimal] (1.0) the alpha-transparency percentage used to blend this image. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:17:81: C: Line is too long. [437/80] |
|
# @option opts blend [:none, :multiply, :screen, :overlay, :darken, :lighten, :color_dodge, :color_burn, :hard_light, :soft_light, :difference, :exclusion, :hsl_hue, :hsl_saturation, :hsl_color, :hsl_luminosity] (:none) the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:25:81: C: Line is too long. [101/80] |
|
@cards[i].png(opts[:file][i], opts[:x][i], opts[:y][i], opts[:alpha][i], opts[:blend][i]) |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:32:81: C: Line is too long. [133/80] |
|
# Renders an entire svg file at the given location. Uses the SVG-specified units and DPI to determine the pixel width and height. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:34:81: C: Line is too long. [132/80] |
|
# See {file:samples/load-images.rb samples/load-images.rb} and {file:samples/tgc-overlay.rb samples/tgc-overlay.rb} as examples. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:38:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:39:81: C: Line is too long. [403/80] |
|
# @option opts file [String] ('') file(s) to read in. If it's a single file, then it's use for every card in range. If the parameter is an Array of files, then each file is looked up for each card. If any of them are nil or '', nothing is done. See {file:README.md#Specifying_Files Specifying Files}. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:40:81: C: Line is too long. [292/80] |
|
# @option opts id [String] (nil) if set, then only render the SVG element with the given id. Prefix '#' is optional. Note: the x-y coordinates are still relative to the SVG document's page. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:41:81: C: Line is too long. [261/80] |
|
# @option opts force_id [Boolean] (false) if set, then this svg will not be rendered at all if the id is empty or nil. If not set, the entire SVG is rendered. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:42:81: C: Line is too long. [160/80] |
|
# @option opts x [Integer] (0) the x-coordinate to place. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:43:81: C: Line is too long. [160/80] |
|
# @option opts y [Integer] (0) the y-coordinate to place. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:44:81: C: Line is too long. [332/80] |
|
# @option opts width [Integer] (:native) the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:45:81: C: Line is too long. [333/80] |
|
# @option opts height [Integer] (:native) the pixel width that the image should scale to. SVG scaling is done with vectors, so the scaling should be smooth. When set to `:native`, uses the DPI and units of the loaded SVG document. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:46:81: C: Line is too long. [256/80] |
|
# @option opts layout [String, Symbol] (nil) entry in the layout to use as defaults for this command. See {file:README.md#Custom_Layouts Custom Layouts}. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:47:81: C: Line is too long. [199/80] |
|
# @option opts alpha [Decimal] (1.0) the alpha-transparency percentage used to blend this image. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:48:81: C: Line is too long. [437/80] |
|
# @option opts blend [:none, :multiply, :screen, :overlay, :darken, :lighten, :color_dodge, :color_burn, :hard_light, :soft_light, :difference, :exclusion, :hsl_hue, :hsl_saturation, :hsl_color, :hsl_luminosity] (:none) the composite blend operator used when applying this image. See Blend Modes at http://cairographics.org/operators. Supports Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:51:5: C: Method has too many lines. [12/10] |
|
def svg(opts = {}) |
|
^^^ |
|
lib/squib/api/image.rb:52:21: C: Space missing after comma. |
|
p = needs(opts,[:range, :files, :svgid, :force_svgid, :x, :y, :width, :height, :layout, :alpha, :blend]) |
|
^ |
|
lib/squib/api/image.rb:52:81: C: Line is too long. [110/80] |
|
p = needs(opts,[:range, :files, :svgid, :force_svgid, :x, :y, :width, :height, :layout, :alpha, :blend]) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/image.rb:58:81: C: Line is too long. [84/80] |
|
p[:width][i], p[:height][i], p[:alpha][i], p[:blend][i]) |
|
^^^^ |
|
lib/squib/api/image.rb:65:1: C: Extra empty line detected at body end. |
|
lib/squib/api/image.rb:67:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/api/save.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/save.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/save.rb:6:81: C: Line is too long. [154/80] |
|
# @option opts [Enumerable] range (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:7:81: C: Line is too long. [122/80] |
|
# @option opts [String] dir (_output) the directory for the output to be sent to. Will be created if it doesn't exist. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:8:81: C: Line is too long. [148/80] |
|
# @option opts [Symbol] format (:png) the format that this will be rendered too. Options `:pdf, :png`. Array of both is allowed: `[:pdf, :png]` |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:9:81: C: Line is too long. [84/80] |
|
# @option opts [String] prefix (card_) the prefix of the file name to be printed |
|
^^^^ |
|
lib/squib/api/save.rb:10:81: C: Line is too long. [176/80] |
|
# @option opts [Boolean] rotate (false) PNG saving only. If true, the saved cards will be rotated 90 degrees clockwise. Intended to rendering landscape instead of portrait. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:25:81: C: Line is too long. [154/80] |
|
# @option opts [Enumerable] range (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:26:81: C: Line is too long. [122/80] |
|
# @option opts [String] dir (_output) the directory for the output to be sent to. Will be created if it doesn't exist. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:27:81: C: Line is too long. [85/80] |
|
# @option opts [String] prefix (card_) the prefix of the file name to be printed. |
|
^^^^^ |
|
lib/squib/api/save.rb:28:81: C: Line is too long. [227/80] |
|
# @option opts [Boolean, :clockwise, :counterclockwise] rotate (false) if true, the saved cards will be rotated 90 degrees clockwise. Or, rotate by the number of radians. Intended to rendering landscape instead of portrait. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:32:24: C: Space missing after comma. |
|
opts = needs(opts,[:range, :creatable_dir, :prefix, :rotate]) |
|
^ |
|
lib/squib/api/save.rb:33:81: C: Line is too long. [97/80] |
|
@progress_bar.start("Saving PNGs to #{opts[:dir]}/#{opts[:prefix]}*", @cards.size) do |bar| |
|
^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/save.rb:35:81: C: Line is too long. [87/80] |
|
@cards[i].save_png(i, opts[:dir], opts[:prefix], opts[:rotate], opts[:angle]) |
|
^^^^^^^ |
|
lib/squib/api/save.rb:40:1: C: Extra empty line detected at body end. |
|
lib/squib/api/save.rb:43:1: C: 1 trailing blank lines detected. |
|
lib/squib/api/settings.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/settings.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/settings.rb:6:81: C: Line is too long. [106/80] |
|
# Text hints are rectangles around where the text will be laid out. They are intended to be temporary. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/settings.rb:12:81: C: Line is too long. [91/80] |
|
# @param [String] text the color of the text hint. To turn off use :off. @see README.md |
|
^^^^^^^^^^^ |
|
lib/squib/api/settings.rb:15:5: C: Use attr_writer to define trivial writer methods. |
|
def hint(text: :off) |
|
^^^ |
|
lib/squib/api/settings.rb:19:81: C: Line is too long. [126/80] |
|
# Sets various defaults for this deck. Defaults can be overriden by the commands themselves when that command supports it. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/settings.rb:26:81: C: Line is too long. [120/80] |
|
# @option opts font: the font string to set as default. Can also be set to `:default` to use the Squib-wide default. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/settings.rb:27:81: C: Line is too long. [132/80] |
|
# @option opts img_dir: the default directory to READ images from. Default is `.`. Useful for switching from bw to color images. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/settings.rb:32:30: C: Missing space after #. |
|
@font = opts[:font][0] #was expanded - just need the first |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/settings.rb:35:1: C: Extra empty line detected at body end. |
|
lib/squib/api/shapes.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/shapes.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/shapes.rb:9:81: C: Line is too long. [111/80] |
|
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:11:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:16:81: C: Line is too long. [118/80] |
|
# @option opts x_radius [Integer] (0) the radius of the rounded corner horiztonally. Zero is a non-rounded corner. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:17:81: C: Line is too long. [116/80] |
|
# @option opts y_radius [Integer] (0) the radius of the rounded corner vertically. Zero is a non-rounded corner. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:18:81: C: Line is too long. [88/80] |
|
# @option opts radius [Integer] (nil) when set, overrides both x_radius and y_radius |
|
^^^^^^^^ |
|
lib/squib/api/shapes.rb:19:81: C: Line is too long. [91/80] |
|
# @option opts fill_color [String] ('#0000') the color with which to fill the rectangle |
|
^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:20:81: C: Line is too long. [109/80] |
|
# @option opts stroke_color [String] (:black) the color with which to stroke the outside of the rectangle |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:22:81: C: Line is too long. [156/80] |
|
# @option opts layout [String, Symbol] (nil) entry in the layout to use as defaults for this command. See {file:README.md#Custom_Layouts Custom Layouts} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:26:81: C: Line is too long. [94/80] |
|
opts = needs(opts, [:range, :x, :y, :width, :height, :rect_radius, :x_radius, :y_radius, |
|
^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:29:81: C: Line is too long. [83/80] |
|
@cards[i].rect(opts[:x][i], opts[:y][i], opts[:width][i], opts[:height][i], |
|
^^^ |
|
lib/squib/api/shapes.rb:41:81: C: Line is too long. [111/80] |
|
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:43:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:47:81: C: Line is too long. [91/80] |
|
# @option opts fill_color [String] ('#0000') the color with which to fill the rectangle |
|
^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:48:81: C: Line is too long. [109/80] |
|
# @option opts stroke_color [String] (:black) the color with which to stroke the outside of the rectangle |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:53:14: C: Space inside { missing. |
|
opts = {radius: 100}.merge(opts) |
|
^ |
|
lib/squib/api/shapes.rb:53:26: C: Space inside } missing. |
|
opts = {radius: 100}.merge(opts) |
|
^ |
|
lib/squib/api/shapes.rb:58:11: C: Align the parameters of a method call if they span more than one line. |
|
opts[:fill_color][i], opts[:stroke_color][i], opts[:stroke_width][i]) |
|
^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:67:81: C: Line is too long. [111/80] |
|
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:69:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:76:81: C: Line is too long. [90/80] |
|
# @option opts fill_color [String] ('#0000') the color with which to fill the triangle |
|
^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:77:81: C: Line is too long. [108/80] |
|
# @option opts stroke_color [String] (:black) the color with which to stroke the outside of the triangle |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:98:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/shapes.rb:103:81: C: Line is too long. [89/80] |
|
# @option opts stroke_color [String] (:black) the color with which to stroke the line |
|
^^^^^^^^^ |
|
lib/squib/api/shapes.rb:115:1: C: Extra empty line detected at body end. |
|
lib/squib/api/shapes.rb:117:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/api/text.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/text.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/text.rb:7:81: C: Line is too long. [85/80] |
|
# See the {file:samples/text-options.rb samples/text.rb} for a lengthy example. |
|
^^^^^ |
|
lib/squib/api/text.rb:13:81: C: Line is too long. [111/80] |
|
# Options support Arrays, see {file:README.md#Arrays_and_Singleton_Expansion Arrays and Singleon Expansion} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:15:81: C: Line is too long. [160/80] |
|
# @option opts range [Enumerable, :all] (:all) the range of cards over which this will be rendered. See {file:README.md#Specifying_Ranges Specifying Ranges} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:16:81: C: Line is too long. [174/80] |
|
# @option opts str [String, Array] ('') the string to be rendered. Must support `#to_s`. If the card responds to `#each`, it's mapped out one at a time across the cards. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:17:81: C: Line is too long. [139/80] |
|
# @option opts font [String] (Arial 36 or whatever was set with `set`) the Font description string, including family, styles, and size. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:20:97: C: Line is too long. [116/80] |
|
# This [description](http://www.pygtk.org/pygtk2reference/class-pangofontdescription.html) is also quite good. |
|
^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:22:81: C: Line is too long. [141/80] |
|
# @option opts font_size [Integer] (nil) an override of font string description, for scaling the font according to the size of the string |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:25:81: C: Line is too long. [134/80] |
|
# @option opts color [String] (:black) the color the font will render to. See {file:README.md#Specifying_Colors Specifying Colors} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:26:81: C: Line is too long. [265/80] |
|
# @option opts markup: [Boolean] (false) Enable markup parsing of `str` using the HTML-like Pango Markup syntax, defined [here](http://ruby-gnome2.sourceforge.jp/hiki.cgi?pango-markup) and [here](https://developer.gnome.org/pango/stable/PangoMarkupFormat.html). |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:27:81: C: Line is too long. [141/80] |
|
# @option opts width [Integer, :native] (:native) the width of the box the string will be placed in. Stretches to the content by default. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:28:81: C: Line is too long. [133/80] |
|
# @option opts height [Integer, :native] the height of the box the string will be placed in. Stretches to the content by default. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:29:81: C: Line is too long. [156/80] |
|
# @option opts layout [String, Symbol] (nil) entry in the layout to use as defaults for this command. See {file:README.md#Custom_Layouts Custom Layouts} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:30:81: C: Line is too long. [261/80] |
|
# @option opts wrap [:none, :word, :char, :word_char, true, false] (:word_char) When height is set, determines the behavior of how the string wraps. The `:word_char` option will break at words, but then fall back to characters when the word cannot fit. # |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:31:81: C: Line is too long. [149/80] |
|
# Options are `:none, :word, :char, :word_char`. Also: `true` is the same as `:word_char`, `false` is the same as `:none`. Default `:word_char` |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:32:81: C: Line is too long. [131/80] |
|
# @option opts spacing [Integer] (0) Adjust the spacing when the text is multiple lines. No effect when the text does not wrap. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:33:81: C: Line is too long. [82/80] |
|
# @option opts align [:left, right, :center] (:left) The alignment of the text |
|
^^ |
|
lib/squib/api/text.rb:34:81: C: Line is too long. [97/80] |
|
# @option opts justify [Boolean] (false) toggles whether or not the text is justified or not. |
|
^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:35:81: C: Line is too long. [152/80] |
|
# @option opts valign [:top, :middle, :bottom] (:top) When width and height are set, align text vertically according to the ink extents of the text. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:36:81: C: Line is too long. [227/80] |
|
# @option opts ellipsize [:none, :start, :middle, :end, true, false] (:end) When width and height are set, determines the behavior of overflowing text. Also: `true` maps to `:end` and `false` maps to `:none`. Default `:end` |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:38:81: C: Line is too long. [136/80] |
|
# @option opts hint [String] (:nil) draw a rectangle around the text with the given color. Overrides global hints (see {Deck#hint}). |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:42:81: C: Line is too long. [98/80] |
|
opts = needs(opts, [:range, :str, :font, :font_size, :x, :y, :width, :height, :color, :wrap, |
|
^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:43:81: C: Line is too long. [108/80] |
|
:align, :justify, :spacing, :valign, :markup, :ellipsize, :hint, :layout, :angle]) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/api/text.rb:45:81: C: Line is too long. [91/80] |
|
@cards[i].text(opts[:str][i], opts[:font][i], opts[:font_size][i], opts[:color][i], |
|
^^^^^^^^^^^ |
|
lib/squib/api/text.rb:46:81: C: Line is too long. [83/80] |
|
opts[:x][i], opts[:y][i], opts[:width][i], opts[:height][i], |
|
^^^ |
|
lib/squib/api/text.rb:52:1: C: Extra empty line detected at body end. |
|
lib/squib/api/text.rb:54:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/api/units.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/api/units.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/api/units.rb:15:1: C: Extra empty line detected at body end. |
|
lib/squib/api/units.rb:17:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/card.rb:7:3: C: Use 2 (not 0) spaces for indentation. |
|
include Squib::InputHelpers |
|
|
|
lib/squib/card.rb:20:10: C: Surrounding space missing for operator '='. |
|
@deck=deck; @width=width; @height=height |
|
^ |
|
lib/squib/card.rb:20:15: C: Do not use semicolons to terminate expressions. |
|
@deck=deck; @width=width; @height=height |
|
^ |
|
lib/squib/card.rb:20:23: C: Surrounding space missing for operator '='. |
|
@deck=deck; @width=width; @height=height |
|
^ |
|
lib/squib/card.rb:20:38: C: Surrounding space missing for operator '='. |
|
@deck=deck; @width=width; @height=height |
|
^ |
|
lib/squib/card.rb:21:51: C: Space missing after comma. |
|
@cairo_surface = Cairo::ImageSurface.new(width,height) |
|
^ |
|
lib/squib/card.rb:40:1: C: Extra empty line detected at body end. |
|
lib/squib/card.rb:42:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/commands/new.rb:6:1: C: Extra empty line detected at body beginning. |
|
lib/squib/commands/new.rb:9:81: C: Line is too long. [82/80] |
|
# Provides conventions for using Git (you are using version control, right??). |
|
^^ |
|
lib/squib/commands/new.rb:10:81: C: Line is too long. [149/80] |
|
# Also provides some basic layout and config files to start from, along with templates for instructions and other notes you don't want to forget. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/commands/new.rb:23:1: C: Extra empty line detected at body beginning. |
|
lib/squib/commands/new.rb:26:7: C: Method has too many lines. [11/10] |
|
def process(args) |
|
^^^ |
|
lib/squib/commands/new.rb:27:9: C: Provide an exception class and message as arguments to raise. |
|
raise ArgumentError.new('Please specify a path.') if args.empty? |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/commands/new.rb:27:9: C: Use fail instead of raise to signal exceptions. |
|
raise ArgumentError.new('Please specify a path.') if args.empty? |
|
^^^^^ |
|
lib/squib/commands/new.rb:30:81: C: Line is too long. [87/80] |
|
template_path = File.expand_path('../project_template', File.dirname(__FILE__)) |
|
^^^^^^^ |
|
lib/squib/commands/new.rb:34:81: C: Line is too long. [97/80] |
|
$stderr.puts "#{new_project_path} exists and is not empty. Doing nothing and quitting." |
|
^^^^^^^^^^^^^^^^^ |
|
lib/squib/commands/new.rb:41:1: C: Extra empty line detected at body end. |
|
lib/squib/commands/new.rb:44:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/constants.rb:1:1: C: Missing top-level module documentation comment. |
|
module Squib |
|
^^^^^^ |
|
lib/squib/constants.rb:2:81: C: Line is too long. [87/80] |
|
# Squib's defaults for when arguments are not specified in the command nor layouts. |
|
^^^^^^^ |
|
lib/squib/constants.rb:5:1: C: Use 2 (not 4) spaces for indentation. |
|
SYSTEM_DEFAULTS = { |
|
^^^^ |
|
lib/squib/constants.rb:6:7: C: Use the new Ruby 1.9 hash syntax. |
|
:align => :left, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:7:7: C: Use the new Ruby 1.9 hash syntax. |
|
:alpha => 1.0, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:8:7: C: Use the new Ruby 1.9 hash syntax. |
|
:angle => 0, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:9:7: C: Use the new Ruby 1.9 hash syntax. |
|
:blend => :none, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:10:7: C: Use the new Ruby 1.9 hash syntax. |
|
:color => :black, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:11:7: C: Use the new Ruby 1.9 hash syntax. |
|
:default_font => 'Arial 36', |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:12:7: C: Use the new Ruby 1.9 hash syntax. |
|
:dir => '_output', |
|
^^^^^^^ |
|
lib/squib/constants.rb:13:7: C: Use the new Ruby 1.9 hash syntax. |
|
:ellipsize => :end, |
|
^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:14:7: C: Use the new Ruby 1.9 hash syntax. |
|
:fill_color => '#0000', |
|
^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:15:7: C: Use the new Ruby 1.9 hash syntax. |
|
:force_id => false, |
|
^^^^^^^^^^^^ |
|
lib/squib/constants.rb:16:7: C: Use the new Ruby 1.9 hash syntax. |
|
:font => :use_set, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:17:7: C: Use the new Ruby 1.9 hash syntax. |
|
:font_size => nil, |
|
^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:18:7: C: Use the new Ruby 1.9 hash syntax. |
|
:format => :png, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:19:7: C: Use the new Ruby 1.9 hash syntax. |
|
:gap => 0, |
|
^^^^^^^ |
|
lib/squib/constants.rb:20:7: C: Use the new Ruby 1.9 hash syntax. |
|
:height => :native, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:21:7: C: Use the new Ruby 1.9 hash syntax. |
|
:hint => :off, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:22:7: C: Use the new Ruby 1.9 hash syntax. |
|
:img_dir => '.', |
|
^^^^^^^^^^^ |
|
lib/squib/constants.rb:23:7: C: Use the new Ruby 1.9 hash syntax. |
|
:justify => false, |
|
^^^^^^^^^^^ |
|
lib/squib/constants.rb:24:7: C: Use the new Ruby 1.9 hash syntax. |
|
:margin => 75, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:25:7: C: Use the new Ruby 1.9 hash syntax. |
|
:markup => false, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:26:7: C: Use the new Ruby 1.9 hash syntax. |
|
:prefix => 'card_', |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:27:7: C: Use the new Ruby 1.9 hash syntax. |
|
:progress_bar => false, |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:28:7: C: Use the new Ruby 1.9 hash syntax. |
|
:range => :all, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:29:7: C: Use the new Ruby 1.9 hash syntax. |
|
:rotate => false, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:30:7: C: Use the new Ruby 1.9 hash syntax. |
|
:sheet => 0, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:31:7: C: Use the new Ruby 1.9 hash syntax. |
|
:spacing => 0, |
|
^^^^^^^^^^^ |
|
lib/squib/constants.rb:32:7: C: Use the new Ruby 1.9 hash syntax. |
|
:str => '', |
|
^^^^^^^ |
|
lib/squib/constants.rb:33:7: C: Use the new Ruby 1.9 hash syntax. |
|
:stroke_color => :black, |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:34:7: C: Use the new Ruby 1.9 hash syntax. |
|
:stroke_width => 2.0, |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:35:7: C: Use the new Ruby 1.9 hash syntax. |
|
:trim => 0, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:36:7: C: Use the new Ruby 1.9 hash syntax. |
|
:valign => :top, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:37:7: C: Use the new Ruby 1.9 hash syntax. |
|
:width => :native, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:38:7: C: Use the new Ruby 1.9 hash syntax. |
|
:wrap => true, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:39:7: C: Use the new Ruby 1.9 hash syntax. |
|
:x => 0, |
|
^^^^^ |
|
lib/squib/constants.rb:40:7: C: Use the new Ruby 1.9 hash syntax. |
|
:x1 => 100, |
|
^^^^^^ |
|
lib/squib/constants.rb:41:7: C: Use the new Ruby 1.9 hash syntax. |
|
:x2 => 150, |
|
^^^^^^ |
|
lib/squib/constants.rb:42:7: C: Use the new Ruby 1.9 hash syntax. |
|
:x3 => 100, |
|
^^^^^^ |
|
lib/squib/constants.rb:43:7: C: Use the new Ruby 1.9 hash syntax. |
|
:x_radius => 0, |
|
^^^^^^^^^^^^ |
|
lib/squib/constants.rb:44:7: C: Use the new Ruby 1.9 hash syntax. |
|
:y => 0, |
|
^^^^^ |
|
lib/squib/constants.rb:45:7: C: Use the new Ruby 1.9 hash syntax. |
|
:y1 => 100, |
|
^^^^^^ |
|
lib/squib/constants.rb:46:7: C: Use the new Ruby 1.9 hash syntax. |
|
:y2 => 150, |
|
^^^^^^ |
|
lib/squib/constants.rb:47:7: C: Use the new Ruby 1.9 hash syntax. |
|
:y3 => 150, |
|
^^^^^^ |
|
lib/squib/constants.rb:48:7: C: Use the new Ruby 1.9 hash syntax. |
|
:y_radius => 0, |
|
^^^^^^^^^^^^ |
|
lib/squib/constants.rb:48:21: C: Avoid comma after the last item of a hash. |
|
:y_radius => 0, |
|
^ |
|
lib/squib/constants.rb:59:23: C: Avoid comma after the last item of a hash. |
|
'img_dir' => '.', |
|
^ |
|
lib/squib/constants.rb:72:11: C: Use the new Ruby 1.9 hash syntax. |
|
:align => :align, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:72:11: C: Use 2 spaces for indentation in a hash, relative to the start of the line where the left curly brace is. |
|
:align => :align, |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:73:11: C: Use the new Ruby 1.9 hash syntax. |
|
:alpha => :alpha, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:74:11: C: Use the new Ruby 1.9 hash syntax. |
|
:angle => :angle, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:75:11: C: Use the new Ruby 1.9 hash syntax. |
|
:blend => :blend, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:76:11: C: Use the new Ruby 1.9 hash syntax. |
|
:circle_radius => :radius, |
|
^^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:77:11: C: Use the new Ruby 1.9 hash syntax. |
|
:color => :color, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:78:11: C: Use the new Ruby 1.9 hash syntax. |
|
:ellipsize => :ellipsize, |
|
^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:79:11: C: Use the new Ruby 1.9 hash syntax. |
|
:files => :file, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:80:11: C: Use the new Ruby 1.9 hash syntax. |
|
:fill_color => :fill_color, |
|
^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:81:11: C: Use the new Ruby 1.9 hash syntax. |
|
:force_svgid => :force_id, |
|
^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:82:11: C: Use the new Ruby 1.9 hash syntax. |
|
:font => :font, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:83:11: C: Use the new Ruby 1.9 hash syntax. |
|
:font_size => :font_size, |
|
^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:84:11: C: Use the new Ruby 1.9 hash syntax. |
|
:height => :height, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:85:11: C: Use the new Ruby 1.9 hash syntax. |
|
:hint => :hint, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:86:11: C: Use the new Ruby 1.9 hash syntax. |
|
:justify => :justify, |
|
^^^^^^^^^^^ |
|
lib/squib/constants.rb:87:11: C: Use the new Ruby 1.9 hash syntax. |
|
:layout => :layout, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:88:11: C: Use the new Ruby 1.9 hash syntax. |
|
:markup => :markup, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:89:11: C: Use the new Ruby 1.9 hash syntax. |
|
:rect_radius => :radius, |
|
^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:90:11: C: Use the new Ruby 1.9 hash syntax. |
|
:spacing => :spacing, |
|
^^^^^^^^^^^ |
|
lib/squib/constants.rb:91:11: C: Use the new Ruby 1.9 hash syntax. |
|
:str => :str, |
|
^^^^^^^ |
|
lib/squib/constants.rb:92:11: C: Use the new Ruby 1.9 hash syntax. |
|
:stroke_color => :stroke_color, |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:93:11: C: Use the new Ruby 1.9 hash syntax. |
|
:stroke_width => :stroke_width, |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/constants.rb:94:11: C: Use the new Ruby 1.9 hash syntax. |
|
:svgid => :id, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:95:11: C: Use the new Ruby 1.9 hash syntax. |
|
:valign => :valign, |
|
^^^^^^^^^^ |
|
lib/squib/constants.rb:96:11: C: Use the new Ruby 1.9 hash syntax. |
|
:width => :width, |
|
^^^^^^^^^ |
|
lib/squib/constants.rb:97:11: C: Use the new Ruby 1.9 hash syntax. |
|
:wrap => :wrap, |
|
^^^^^^^^ |
|
lib/squib/constants.rb:98:11: C: Use the new Ruby 1.9 hash syntax. |
|
:x => :x, |
|
^^^^^ |
|
lib/squib/constants.rb:99:11: C: Use the new Ruby 1.9 hash syntax. |
|
:x1 => :x1, |
|
^^^^^^ |
|
lib/squib/constants.rb:100:11: C: Use the new Ruby 1.9 hash syntax. |
|
:x2 => :x2, |
|
^^^^^^ |
|
lib/squib/constants.rb:101:11: C: Use the new Ruby 1.9 hash syntax. |
|
:x3 => :x3, |
|
^^^^^^ |
|
lib/squib/constants.rb:102:11: C: Use the new Ruby 1.9 hash syntax. |
|
:x_radius => :x_radius, |
|
^^^^^^^^^^^^ |
|
lib/squib/constants.rb:103:11: C: Use the new Ruby 1.9 hash syntax. |
|
:y => :y, |
|
^^^^^ |
|
lib/squib/constants.rb:104:11: C: Use the new Ruby 1.9 hash syntax. |
|
:y1 => :y1, |
|
^^^^^^ |
|
lib/squib/constants.rb:105:11: C: Use the new Ruby 1.9 hash syntax. |
|
:y2 => :y2, |
|
^^^^^^ |
|
lib/squib/constants.rb:106:11: C: Use the new Ruby 1.9 hash syntax. |
|
:y3 => :y3, |
|
^^^^^^ |
|
lib/squib/constants.rb:107:11: C: Use the new Ruby 1.9 hash syntax. |
|
:y_radius => :y_radius, |
|
^^^^^^^^^^^^ |
|
lib/squib/constants.rb:107:33: C: Avoid comma after the last item of a hash. |
|
:y_radius => :y_radius, |
|
^ |
|
lib/squib/constants.rb:108:7: C: Indent the right brace the same as the start of the line where the left brace is. |
|
} |
|
^ |
|
lib/squib/constants.rb:109:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/deck.rb:13:1: C: Extra empty line detected at body beginning. |
|
lib/squib/deck.rb:14:81: C: Line is too long. [124/80] |
|
# The main interface to Squib. Provides a front-end porcelain whereas the Card class interacts with the graphics plumbing. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:39:81: C: Line is too long. [135/80] |
|
# This is the starting point for Squib. In providing a block to the constructor, you have access to all of Deck's instance methods. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:40:81: C: Line is too long. [81/80] |
|
# The documented methods in Deck are the ones intended for use by most users. |
|
^ |
|
lib/squib/deck.rb:41:81: C: Line is too long. [221/80] |
|
# If your game requires multiple different sizes or orientations, I recommend using multiple `Squib::Deck`s in your `deck.rb`. You can modify the internals of `Squib::Deck` (e.g. `@cards`), but that's not recommended. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:51:81: C: Line is too long. [101/80] |
|
# @param dpi [Integer] the pixels per inch when rendering out to PDF or calculating using inches. |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:55:5: C: Method has too many lines. [14/10] |
|
def initialize(width: 825, height: 1125, cards: 1, dpi: 300, config: 'config.yml', layout: nil, &block) |
|
^^^ |
|
lib/squib/deck.rb:55:19: C: Avoid parameter lists longer than 5 parameters. |
|
def initialize(width: 825, height: 1125, cards: 1, dpi: 300, config: 'config.yml', layout: nil, &block) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:55:81: C: Line is too long. [107/80] |
|
def initialize(width: 825, height: 1125, cards: 1, dpi: 300, config: 'config.yml', layout: nil, &block) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:56:13: C: Surrounding space missing for operator '='. |
|
@width=width; @height=height |
|
^ |
|
lib/squib/deck.rb:56:19: C: Do not use semicolons to terminate expressions. |
|
@width=width; @height=height |
|
^ |
|
lib/squib/deck.rb:56:28: C: Surrounding space missing for operator '='. |
|
@width=width; @height=height |
|
^ |
|
lib/squib/deck.rb:64:18: C: Space missing to the left of {. |
|
cards.times{ @cards << Squib::Card.new(self, width, height) } |
|
^ |
|
lib/squib/deck.rb:67:7: C: Use a guard clause instead of wrapping the code inside a conditional expression. |
|
if block_given? |
|
^^ |
|
lib/squib/deck.rb:67:7: C: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. |
|
if block_given? |
|
^^ |
|
lib/squib/deck.rb:94:7: C: Use a guard clause instead of wrapping the code inside a conditional expression. |
|
if File.exists?(file) && config = YAML.load_file(file) |
|
^^ |
|
lib/squib/deck.rb:94:15: W: File.exists? is deprecated in favor of File.exist?. |
|
if File.exists?(file) && config = YAML.load_file(file) |
|
^^^^^^^ |
|
lib/squib/deck.rb:94:39: W: Assignment in condition - you probably meant to use ==. |
|
if File.exists?(file) && config = YAML.load_file(file) |
|
^ |
|
lib/squib/deck.rb:110:25: W: Unused block argument - value. If it's necessary, use _ or _value as an argument name to indicate that it won't be used. |
|
yml.each do |key, value| |
|
^^^^^ |
|
lib/squib/deck.rb:118:5: C: Method has too many lines. [20/10] |
|
def recurse_extends(yml, key, visited ) |
|
^^^ |
|
lib/squib/deck.rb:118:42: C: Space inside parentheses detected. |
|
def recurse_extends(yml, key, visited ) |
|
^ |
|
lib/squib/deck.rb:125:81: C: Line is too long. [112/80] |
|
from_extends = yml[key].merge(recurse_extends(yml, parent_key, visited)) do |key, child_val, parent_val| |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:125:86: W: Shadowing outer local variable - key. |
|
from_extends = yml[key].merge(recurse_extends(yml, parent_key, visited)) do |key, child_val, parent_val| |
|
^^^ |
|
lib/squib/deck.rb:125:86: W: Unused block argument - key. If it's necessary, use _ or _key as an argument name to indicate that it won't be used. |
|
from_extends = yml[key].merge(recurse_extends(yml, parent_key, visited)) do |key, child_val, parent_val| |
|
^^^ |
|
lib/squib/deck.rb:127:44: C: Space missing after comma. |
|
parent_val + child_val.sub('+=','').strip.to_f |
|
^ |
|
lib/squib/deck.rb:129:44: C: Space missing after comma. |
|
parent_val - child_val.sub('-=','').strip.to_f |
|
^ |
|
lib/squib/deck.rb:131:23: C: Missing space after #. |
|
child_val #child overrides parent when merging, no += |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:134:39: W: Shadowing outer local variable - key. |
|
h = h.merge(from_extends) do |key, older_sibling, younger_sibling| |
|
^^^ |
|
lib/squib/deck.rb:134:39: W: Unused block argument - key. If it's necessary, use _ or _key as an argument name to indicate that it won't be used. |
|
h = h.merge(from_extends) do |key, older_sibling, younger_sibling| |
|
^^^ |
|
lib/squib/deck.rb:134:44: W: Unused block argument - older_sibling. If it's necessary, use _ or _older_sibling as an argument name to indicate that it won't be used. |
|
h = h.merge(from_extends) do |key, older_sibling, younger_sibling| |
|
^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:135:27: C: Missing space after #. |
|
younger_sibling #when two siblings have the same entry, the "younger" (lower one) overrides |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:135:81: C: Line is too long. [101/80] |
|
younger_sibling #when two siblings have the same entry, the "younger" (lower one) overrides |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/deck.rb:138:7: C: Redundant return detected. |
|
return h |
|
^^^^^^ |
|
lib/squib/deck.rb:145:9: C: Rename has_extends? to extends?. |
|
def has_extends?(yml, key) |
|
^^^^^^^^^^^^ |
|
lib/squib/deck.rb:153:7: C: Use a guard clause instead of wrapping the code inside a conditional expression. |
|
if visited.key? key |
|
^^ |
|
lib/squib/deck.rb:153:7: C: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. |
|
if visited.key? key |
|
^^ |
|
lib/squib/deck.rb:154:9: C: Use fail instead of raise to signal exceptions. |
|
raise "Invalid layout: circular extends with '#{key}'" |
|
^^^^^ |
|
lib/squib/deck.rb:169:1: C: Extra empty line detected at body end. |
|
lib/squib/deck.rb:171:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/graphics/background.rb:2:3: C: Missing top-level class documentation comment. |
|
class Card |
|
^^^^^ |
|
lib/squib/graphics/background.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/background.rb:12:1: C: Extra empty line detected at body end. |
|
lib/squib/graphics/background.rb:14:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/graphics/image.rb:1:1: C: Missing top-level module documentation comment. |
|
module Squib |
|
^^^^^^ |
|
lib/squib/graphics/image.rb:2:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/image.rb:13:3: C: Missing top-level class documentation comment. |
|
class Card |
|
^^^^^ |
|
lib/squib/graphics/image.rb:14:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/image.rb:18:27: C: Use || instead of or. |
|
return if file.nil? or file.eql? '' |
|
^^ |
|
lib/squib/graphics/image.rb:29:5: C: Method has too many lines. [14/10] |
|
def svg(file, id, x, y, width, height, alpha, blend) |
|
^^^ |
|
lib/squib/graphics/image.rb:29:12: C: Avoid parameter lists longer than 5 parameters. |
|
def svg(file, id, x, y, width, height, alpha, blend) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/image.rb:30:27: C: Space missing inside {. |
|
Squib.logger.debug {"Rendering: #{file}, #{id} #{x}, #{y}, #{width}, #{height}, #{alpha}, #{blend}"} |
|
^ |
|
lib/squib/graphics/image.rb:30:81: C: Line is too long. [106/80] |
|
Squib.logger.debug {"Rendering: #{file}, #{id} #{x}, #{y}, #{width}, #{height}, #{alpha}, #{blend}"} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/image.rb:30:106: C: Space missing inside }. |
|
Squib.logger.debug {"Rendering: #{file}, #{id} #{x}, #{y}, #{width}, #{height}, #{alpha}, #{blend}"} |
|
^ |
|
lib/squib/graphics/image.rb:31:27: C: Use || instead of or. |
|
return if file.nil? or file.eql? '' |
|
^^ |
|
lib/squib/graphics/image.rb:45:1: C: Extra empty line detected at body end. |
|
lib/squib/graphics/save_doc.rb:2:3: C: Missing top-level class documentation comment. |
|
class Deck |
|
^^^^^ |
|
lib/squib/graphics/save_doc.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/save_doc.rb:9:81: C: Line is too long. [121/80] |
|
# @option opts file [String] the name of the PDF file to save. See {file:README.md#Specifying_Files Specifying Files} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:10:81: C: Line is too long. [96/80] |
|
# @option opts dir [String] (_output) the directory to save to. Created if it doesn't exist. |
|
^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:11:81: C: Line is too long. [82/80] |
|
# @option opts margin [Integer] (75) the margin around the outside of the page |
|
^^ |
|
lib/squib/graphics/save_doc.rb:13:81: C: Line is too long. [138/80] |
|
# @option opts trim [Integer] (0) the space around the edge of each card to trim (e.g. to cut off the bleed margin for print-and-play) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:16:5: C: Method has too many lines. [21/10] |
|
def save_pdf(opts = {}) |
|
^^^ |
|
lib/squib/graphics/save_doc.rb:18:24: C: Space found before semicolon. |
|
width = 11 * @dpi ; height = 8.5 * @dpi #TODO: allow this to be specified too |
|
^ |
|
lib/squib/graphics/save_doc.rb:18:25: C: Do not use semicolons to terminate expressions. |
|
width = 11 * @dpi ; height = 8.5 * @dpi #TODO: allow this to be specified too |
|
^ |
|
lib/squib/graphics/save_doc.rb:18:47: C: Missing space after #. |
|
width = 11 * @dpi ; height = 8.5 * @dpi #TODO: allow this to be specified too |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:18:81: C: Line is too long. [83/80] |
|
width = 11 * @dpi ; height = 8.5 * @dpi #TODO: allow this to be specified too |
|
^^^ |
|
lib/squib/graphics/save_doc.rb:19:81: C: Line is too long. [93/80] |
|
cc = Cairo::Context.new(Cairo::PDFSurface.new("#{p[:dir]}/#{p[:file]}", width, height)) |
|
^^^^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:20:21: C: Space found before semicolon. |
|
x = p[:margin] ; y = p[:margin] |
|
^ |
|
lib/squib/graphics/save_doc.rb:20:22: C: Do not use semicolons to terminate expressions. |
|
x = p[:margin] ; y = p[:margin] |
|
^ |
|
lib/squib/graphics/save_doc.rb:22:81: C: Line is too long. [90/80] |
|
@progress_bar.start("Saving PDF to #{p[:dir]}/#{p[:file]}", p[:range].size) do |bar| |
|
^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:23:5: C: Use 2 (not 4) spaces for indentation. |
|
@cards.each_with_index do |card, i| |
|
^^^^ |
|
lib/squib/graphics/save_doc.rb:23:16: C: Use next to skip iteration. |
|
@cards.each_with_index do |card, i| |
|
^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:23:42: W: Unused block argument - i. If it's necessary, use _ or _i as an argument name to indicate that it won't be used. |
|
@cards.each_with_index do |card, i| |
|
^ |
|
lib/squib/graphics/save_doc.rb:33:29: C: Space found before semicolon. |
|
x = p[:margin] ; y = p[:margin] |
|
^ |
|
lib/squib/graphics/save_doc.rb:33:30: C: Do not use semicolons to terminate expressions. |
|
x = p[:margin] ; y = p[:margin] |
|
^ |
|
lib/squib/graphics/save_doc.rb:34:28: C: Missing space after #. |
|
cc.show_page #next page |
|
^^^^^^^^^^ |
|
lib/squib/graphics/save_doc.rb:38:5: W: end at 38, 4 is not aligned with @progress_bar.start("Saving PDF to #{p[:dir]}/#{p[:file]}", p[:range].size) do |bar| at 22, 6 |
|
end |
|
^^^ |
|
lib/squib/graphics/save_doc.rb:45:44: C: Surrounding space missing for operator '-'. |
|
tmp = Cairo::ImageSurface.new(width-2*trim, height-2*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:45:46: C: Surrounding space missing for operator '*'. |
|
tmp = Cairo::ImageSurface.new(width-2*trim, height-2*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:45:59: C: Surrounding space missing for operator '-'. |
|
tmp = Cairo::ImageSurface.new(width-2*trim, height-2*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:45:61: C: Surrounding space missing for operator '*'. |
|
tmp = Cairo::ImageSurface.new(width-2*trim, height-2*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:47:30: C: Space missing after comma. |
|
cc.set_source(surface,-1*trim, -1*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:47:33: C: Surrounding space missing for operator '*'. |
|
cc.set_source(surface,-1*trim, -1*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:47:42: C: Surrounding space missing for operator '*'. |
|
cc.set_source(surface,-1*trim, -1*trim) |
|
^ |
|
lib/squib/graphics/save_doc.rb:53:1: C: Extra empty line detected at body end. |
|
lib/squib/graphics/save_doc.rb:55:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/graphics/save_images.rb:2:3: C: Missing top-level class documentation comment. |
|
class Card |
|
^^^^^ |
|
lib/squib/graphics/save_images.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/save_images.rb:18:79: C: Space inside parentheses detected. |
|
rotated_cc = Cairo::Context.new(Cairo::ImageSurface.new(@height, @width) ) |
|
^ |
|
lib/squib/graphics/save_images.rb:31:1: C: Extra empty line detected at body end. |
|
lib/squib/graphics/save_images.rb:33:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/graphics/shapes.rb:2:3: C: Missing top-level class documentation comment. |
|
class Card |
|
^^^^^ |
|
lib/squib/graphics/shapes.rb:3:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/shapes.rb:6:13: C: Avoid parameter lists longer than 5 parameters. |
|
def rect(x, y, width, height, x_radius, y_radius, fill_color, stroke_color, stroke_width) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/shapes.rb:6:81: C: Line is too long. [93/80] |
|
def rect(x, y, width, height, x_radius, y_radius, fill_color, stroke_color, stroke_width) |
|
^^^^^^^^^^^^^ |
|
lib/squib/graphics/shapes.rb:7:12: C: Surrounding space missing for operator '='. |
|
width=@width if width==:native; height=@height if height==:native |
|
^ |
|
lib/squib/graphics/shapes.rb:7:28: C: Surrounding space missing for operator '=='. |
|
width=@width if width==:native; height=@height if height==:native |
|
^^ |
|
lib/squib/graphics/shapes.rb:7:37: C: Do not use semicolons to terminate expressions. |
|
width=@width if width==:native; height=@height if height==:native |
|
^ |
|
lib/squib/graphics/shapes.rb:7:45: C: Surrounding space missing for operator '='. |
|
width=@width if width==:native; height=@height if height==:native |
|
^ |
|
lib/squib/graphics/shapes.rb:7:63: C: Surrounding space missing for operator '=='. |
|
width=@width if width==:native; height=@height if height==:native |
|
^^ |
|
lib/squib/graphics/shapes.rb:21:15: C: Avoid parameter lists longer than 5 parameters. |
|
def circle(x, y, radius, fill_color, stroke_color, stroke_width) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/shapes.rb:35:17: C: Avoid parameter lists longer than 5 parameters. |
|
def triangle(x1, y1, x2, y2, x3, y3, fill_color, stroke_color, stroke_width) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/shapes.rb:49:13: C: Avoid parameter lists longer than 5 parameters. |
|
def line(x1, y1, x2, y2, stroke_color, stroke_width) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/shapes.rb:58:1: C: Extra empty line detected at body end. |
|
lib/squib/graphics/shapes.rb:60:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/graphics/text.rb:4:3: C: Missing top-level class documentation comment. |
|
class Card |
|
^^^^^ |
|
lib/squib/graphics/text.rb:5:1: C: Extra empty line detected at body beginning. |
|
lib/squib/graphics/text.rb:8:5: C: Cyclomatic complexity for draw_text_hint is too high. [8/6] |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^^^ |
|
lib/squib/graphics/text.rb:8:5: C: Method has too many lines. [11/10] |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^^^ |
|
lib/squib/graphics/text.rb:8:5: C: Perceived complexity for draw_text_hint is too high. [8/7] |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^^^ |
|
lib/squib/graphics/text.rb:8:23: C: Avoid parameter lists longer than 5 parameters. |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/text.rb:8:26: C: Space missing after comma. |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^ |
|
lib/squib/graphics/text.rb:8:28: C: Space missing after comma. |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^ |
|
lib/squib/graphics/text.rb:8:30: C: Space missing after comma. |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^ |
|
lib/squib/graphics/text.rb:8:44: C: Space missing after comma. |
|
def draw_text_hint(cc,x,y,layout, color,angle) |
|
^ |
|
lib/squib/graphics/text.rb:9:56: C: Use && instead of and. |
|
color = @deck.text_hint if color.to_s.eql? 'off' and not @deck.text_hint.to_s.eql? 'off' |
|
^^^ |
|
lib/squib/graphics/text.rb:9:60: C: Use ! instead of not. |
|
color = @deck.text_hint if color.to_s.eql? 'off' and not @deck.text_hint.to_s.eql? 'off' |
|
^^^ |
|
lib/squib/graphics/text.rb:9:81: C: Line is too long. [94/80] |
|
color = @deck.text_hint if color.to_s.eql? 'off' and not @deck.text_hint.to_s.eql? 'off' |
|
^^^^^^^^^^^^^^ |
|
lib/squib/graphics/text.rb:10:39: C: Use || instead of or. |
|
return if color.to_s.eql? 'off' or color.nil? |
|
^^ |
|
lib/squib/graphics/text.rb:18:29: C: Space missing after comma. |
|
cc.rounded_rectangle(x,y,w,h,0,0) |
|
^ |
|
lib/squib/graphics/text.rb:18:31: C: Space missing after comma. |
|
cc.rounded_rectangle(x,y,w,h,0,0) |
|
^ |
|
lib/squib/graphics/text.rb:18:33: C: Space missing after comma. |
|
cc.rounded_rectangle(x,y,w,h,0,0) |
|
^ |
|
lib/squib/graphics/text.rb:18:35: C: Space missing after comma. |
|
cc.rounded_rectangle(x,y,w,h,0,0) |
|
^ |
|
lib/squib/graphics/text.rb:18:37: C: Space missing after comma. |
|
cc.rounded_rectangle(x,y,w,h,0,0) |
|
^ |
|
lib/squib/graphics/text.rb:26:5: C: Method has too many lines. [11/10] |
|
def ellipsize(layout, ellipsize) |
|
^^^ |
|
lib/squib/graphics/text.rb:42:5: C: Method has too many lines. [11/10] |
|
def wrap(layout, wrap) |
|
^^^ |
|
lib/squib/graphics/text.rb:60:7: C: Use 2 (not 4) spaces for indentation. |
|
h = { :left => Pango::ALIGN_LEFT, |
|
^^^^ |
|
lib/squib/graphics/text.rb:60:17: C: Use the new Ruby 1.9 hash syntax. |
|
h = { :left => Pango::ALIGN_LEFT, |
|
^^^^^^^^ |
|
lib/squib/graphics/text.rb:61:17: C: Use the new Ruby 1.9 hash syntax. |
|
:right => Pango::ALIGN_RIGHT, |
|
^^^^^^^^^ |
|
lib/squib/graphics/text.rb:62:17: C: Use the new Ruby 1.9 hash syntax. |
|
:center => Pango::ALIGN_CENTER |
|
^^^^^^^^^^ |
|
lib/squib/graphics/text.rb:72:7: C: Use a guard clause instead of wrapping the code inside a conditional expression. |
|
if layout.height > 0 |
|
^^ |
|
lib/squib/graphics/text.rb:76:81: C: Line is too long. [86/80] |
|
cc.move_to(x, y + (layout.height - ink_extents.height) / (2 * Pango::SCALE)) |
|
^^^^^^ |
|
lib/squib/graphics/text.rb:87:81: C: Line is too long. [83/80] |
|
layout.height = height * Pango::SCALE unless height.nil? || height == :native |
|
^^^ |
|
lib/squib/graphics/text.rb:93:5: C: Method has too many lines. [25/10] |
|
def text(str, font, font_size, color, |
|
^^^ |
|
lib/squib/graphics/text.rb:93:13: C: Avoid parameter lists longer than 5 parameters. |
|
def text(str, font, font_size, color, |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/text.rb:97:27: C: Space missing inside {. |
|
Squib.logger.debug {"Placing '#{str}'' with font '#{font}' @ #{x}, #{y}, color: #{color}, angle: #{angle} etc."} |
|
^ |
|
lib/squib/graphics/text.rb:97:81: C: Line is too long. [118/80] |
|
Squib.logger.debug {"Placing '#{str}'' with font '#{font}' @ #{x}, #{y}, color: #{color}, angle: #{angle} etc."} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/graphics/text.rb:97:118: C: Space missing inside }. |
|
Squib.logger.debug {"Placing '#{str}'' with font '#{font}' @ #{x}, #{y}, color: #{color}, angle: #{angle} etc."} |
|
^ |
|
lib/squib/graphics/text.rb:100:21: C: Space missing after comma. |
|
cc.move_to(x,y) |
|
^ |
|
lib/squib/graphics/text.rb:116:29: C: Space missing after comma. |
|
valign(cc, layout, x,y, valign) |
|
^ |
|
lib/squib/graphics/text.rb:117:39: C: Space found before semicolon. |
|
cc.update_pango_layout(layout) ; cc.show_pango_layout(layout) |
|
^ |
|
lib/squib/graphics/text.rb:117:40: C: Do not use semicolons to terminate expressions. |
|
cc.update_pango_layout(layout) ; cc.show_pango_layout(layout) |
|
^ |
|
lib/squib/graphics/text.rb:118:26: C: Space missing after comma. |
|
draw_text_hint(cc,x,y,layout,hint,angle) |
|
^ |
|
lib/squib/graphics/text.rb:118:28: C: Space missing after comma. |
|
draw_text_hint(cc,x,y,layout,hint,angle) |
|
^ |
|
lib/squib/graphics/text.rb:118:30: C: Space missing after comma. |
|
draw_text_hint(cc,x,y,layout,hint,angle) |
|
^ |
|
lib/squib/graphics/text.rb:118:37: C: Space missing after comma. |
|
draw_text_hint(cc,x,y,layout,hint,angle) |
|
^ |
|
lib/squib/graphics/text.rb:118:42: C: Space missing after comma. |
|
draw_text_hint(cc,x,y,layout,hint,angle) |
|
^ |
|
lib/squib/graphics/text.rb:121:1: C: Extra empty line detected at body end. |
|
lib/squib/graphics/text.rb:123:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/input_helpers.rb:7:1: C: Extra empty line detected at body beginning. |
|
lib/squib/input_helpers.rb:10:5: C: Cyclomatic complexity for needs is too high. [17/6] |
|
def needs(opts, params) |
|
^^^ |
|
lib/squib/input_helpers.rb:10:5: C: Method has too many lines. [20/10] |
|
def needs(opts, params) |
|
^^^ |
|
lib/squib/input_helpers.rb:10:5: C: Perceived complexity for needs is too high. [17/7] |
|
def needs(opts, params) |
|
^^^ |
|
lib/squib/input_helpers.rb:11:27: C: Space missing inside {. |
|
Squib.logger.debug {"Given opts: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:11:48: C: Space missing inside }. |
|
Squib.logger.debug {"Given opts: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:24:81: C: Line is too long. [82/80] |
|
opts = colorify(opts, false, :stroke_color) if params.include? :stroke_color |
|
^^ |
|
lib/squib/input_helpers.rb:37:31: C: Use next to skip iteration. |
|
Squib::EXPANDING_PARAMS.each_pair do |param_name, api_param| |
|
^^^^^^^^^ |
|
lib/squib/input_helpers.rb:44:27: C: Space missing inside {. |
|
Squib.logger.debug {"After expand_singletons: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:44:61: C: Space missing inside }. |
|
Squib.logger.debug {"After expand_singletons: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:52:5: C: Method has too many lines. [18/10] |
|
def layoutify(opts) |
|
^^^ |
|
lib/squib/input_helpers.rb:56:21: C: Use next to skip iteration. |
|
opts[:layout].each_with_index do |layout, i| |
|
^^^^^^^^^^^^^^^ |
|
lib/squib/input_helpers.rb:59:11: C: Never use unless with else. Rewrite these with the positive case first. |
|
unless entry.nil? |
|
^^^^^^^^^^^^^^^^^ |
|
lib/squib/input_helpers.rb:60:33: W: Unused block argument - value. If it's necessary, use _ or _value as an argument name to indicate that it won't be used. |
|
entry.each do |key, value| |
|
^^^^^ |
|
lib/squib/input_helpers.rb:62:50: C: Missing space after #. |
|
opts[key.to_sym][i] ||= entry[key] #don't override if it's already there |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/input_helpers.rb:62:81: C: Line is too long. [86/80] |
|
opts[key.to_sym][i] ||= entry[key] #don't override if it's already there |
|
^^^^^^ |
|
lib/squib/input_helpers.rb:65:30: W: (...) interpreted as grouped expression. |
|
Squib.logger.warn ("Layout entry '#{layout}' does not exist." ) |
|
^ |
|
lib/squib/input_helpers.rb:65:74: C: Space inside parentheses detected. |
|
Squib.logger.warn ("Layout entry '#{layout}' does not exist." ) |
|
^ |
|
lib/squib/input_helpers.rb:69:27: C: Space missing inside {. |
|
Squib.logger.debug {"After layoutify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:69:53: C: Space missing inside }. |
|
Squib.logger.debug {"After layoutify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:84:17: C: Never put a space between a method name and the opening parenthesis. |
|
def rangeify (opts) |
|
^ |
|
lib/squib/input_helpers.rb:86:7: C: Use fail instead of raise to signal exceptions. |
|
raise 'Range cannot be nil' if range.nil? |
|
^^^^^ |
|
lib/squib/input_helpers.rb:87:30: C: Surrounding space missing for operator '-'. |
|
range = 0..(@cards.size-1) if range == :all |
|
^ |
|
lib/squib/input_helpers.rb:89:34: C: Surrounding space missing for operator '-'. |
|
if range.max > (@cards.size-1) |
|
^ |
|
lib/squib/input_helpers.rb:90:9: C: Provide an exception class and message as arguments to raise. |
|
raise ArgumentError.new("#{range} is outside of deck range of 0..#{@cards.size-1}") |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib/input_helpers.rb:90:9: C: Use fail instead of raise to signal exceptions. |
|
raise ArgumentError.new("#{range} is outside of deck range of 0..#{@cards.size-1}") |
|
^^^^^ |
|
lib/squib/input_helpers.rb:90:81: C: Line is too long. [91/80] |
|
raise ArgumentError.new("#{range} is outside of deck range of 0..#{@cards.size-1}") |
|
^^^^^^^^^^^ |
|
lib/squib/input_helpers.rb:90:87: C: Surrounding space missing for operator '-'. |
|
raise ArgumentError.new("#{range} is outside of deck range of 0..#{@cards.size-1}") |
|
^ |
|
lib/squib/input_helpers.rb:93:27: C: Space missing inside {. |
|
Squib.logger.debug {"After rangeify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:93:52: C: Space missing inside }. |
|
Squib.logger.debug {"After rangeify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:100:38: C: Surrounding space missing in default value assignment. |
|
def fileify(opts, file_must_exist=true) |
|
^ |
|
lib/squib/input_helpers.rb:102:28: C: Use && instead of and. |
|
if file_must_exist and !File.exists?(file) |
|
^^^ |
|
lib/squib/input_helpers.rb:102:38: W: File.exists? is deprecated in favor of File.exist?. |
|
if file_must_exist and !File.exists?(file) |
|
^^^^^^^ |
|
lib/squib/input_helpers.rb:103:11: C: Use fail instead of raise to signal exceptions. |
|
raise "File #{File.expand_path(file)} does not exist!" |
|
^^^^^ |
|
lib/squib/input_helpers.rb:112:39: C: Surrounding space missing in default value assignment. |
|
def dirify(opts, key, allow_create=false) |
|
^ |
|
lib/squib/input_helpers.rb:113:26: W: Dir.exists? is deprecated in favor of Dir.exist?. |
|
return opts if Dir.exists?(opts[key]) |
|
^^^^^^^ |
|
lib/squib/input_helpers.rb:115:28: C: Space missing inside {. |
|
Squib.logger.warn {"Dir #{opts[key]} does not exist, creating it."} |
|
^ |
|
lib/squib/input_helpers.rb:115:75: C: Space missing inside }. |
|
Squib.logger.warn {"Dir #{opts[key]} does not exist, creating it."} |
|
^ |
|
lib/squib/input_helpers.rb:119:9: C: Use fail instead of raise to signal exceptions. |
|
raise "'#{opts[key]}' does not exist!" |
|
^^^^^ |
|
lib/squib/input_helpers.rb:126:32: C: Surrounding space missing in default value assignment. |
|
def colorify(opts, nillable=false, key=:color) |
|
^ |
|
lib/squib/input_helpers.rb:126:43: C: Surrounding space missing in default value assignment. |
|
def colorify(opts, nillable=false, key=:color) |
|
^ |
|
lib/squib/input_helpers.rb:127:17: C: Use next to skip iteration. |
|
opts[key].each_with_index do |color, i| |
|
^^^^^^^^^^^^^^^ |
|
lib/squib/input_helpers.rb:129:11: C: Favor modifier if usage when having a single-line body. Another good alternative is the usage of control flow &&/||. |
|
if @custom_colors.key? color.to_s |
|
^^ |
|
lib/squib/input_helpers.rb:135:27: C: Space missing inside {. |
|
Squib.logger.debug {"After colorify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:135:52: C: Space missing inside }. |
|
Squib.logger.debug {"After colorify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:142:16: C: Never put a space between a method name and the opening parenthesis. |
|
def fontify (opts) |
|
^ |
|
lib/squib/input_helpers.rb:144:39: C: Surrounding space missing for operator '=='. |
|
opts[:font][i] = @font if font==:use_set |
|
^^ |
|
lib/squib/input_helpers.rb:145:81: C: Line is too long. [82/80] |
|
opts[:font][i] = Squib::SYSTEM_DEFAULTS[:default_font] if font == :default |
|
^^ |
|
lib/squib/input_helpers.rb:147:27: C: Space missing inside {. |
|
Squib.logger.debug {"After fontify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:147:51: C: Space missing inside }. |
|
Squib.logger.debug {"After fontify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:161:27: C: Space missing inside {. |
|
Squib.logger.debug {"After radiusify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:161:53: C: Space missing inside }. |
|
Squib.logger.debug {"After radiusify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:170:9: C: Favor modifier unless usage when having a single-line body. Another good alternative is the usage of control flow &&/||. |
|
unless id.nil? |
|
^^^^^^ |
|
lib/squib/input_helpers.rb:174:27: C: Space missing inside {. |
|
Squib.logger.debug {"After svgidify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:174:52: C: Space missing inside }. |
|
Squib.logger.debug {"After svgidify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:188:27: C: Space missing inside {. |
|
Squib.logger.debug {"After rotateify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:188:53: C: Space missing inside }. |
|
Squib.logger.debug {"After rotateify: #{opts}"} |
|
^ |
|
lib/squib/input_helpers.rb:192:1: C: Extra empty line detected at body end. |
|
lib/squib/input_helpers.rb:194:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/progress.rb:4:1: C: Extra empty line detected at body beginning. |
|
lib/squib/progress.rb:26:20: C: Surrounding space missing in default value assignment. |
|
def start(title='', total=100, &block) |
|
^ |
|
lib/squib/progress.rb:26:30: C: Surrounding space missing in default value assignment. |
|
def start(title='', total=100, &block) |
|
^ |
|
lib/squib/progress.rb:26:37: W: Unused method argument - block. If it's necessary, use _ or _block as an argument name to indicate that it won't be used. |
|
def start(title='', total=100, &block) |
|
^^^^^ |
|
lib/squib/progress.rb:28:81: C: Line is too long. [88/80] |
|
@bar = ProgressBar.create(title: title, total: total, format: '%t <%B> %p%% %a') |
|
^^^^^^^^ |
|
lib/squib/progress.rb:37:1: C: Extra blank line detected. |
|
lib/squib/progress.rb:37:1: C: Extra empty line detected at body end. |
|
lib/squib/progress.rb:38:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/project_template/deck.rb:6:4: C: Final newline missing. |
|
end |
|
|
|
lib/squib/project_template/Gemfile:3:12: C: Final newline missing. |
|
gem 'squib' |
|
|
|
lib/squib/version.rb:1:1: C: Missing top-level module documentation comment. |
|
module Squib |
|
^^^^^^ |
|
lib/squib/version.rb:2:1: C: Extra empty line detected at body beginning. |
|
lib/squib.rb:10:1: C: Missing top-level module documentation comment. |
|
module Squib |
|
^^^^^^ |
|
lib/squib.rb:11:1: C: Extra empty line detected at body beginning. |
|
lib/squib.rb:12:81: C: Line is too long. [104/80] |
|
# Access the internal logger that Squib uses. By default, Squib configure the logger to the WARN level |
|
^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib.rb:15:81: C: Line is too long. [114/80] |
|
# Squib.logger.level = Logger::DEBUG #show waaaay more information than you probably need, unless you're a dev |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
lib/squib.rb:22:35: C: Do not use semicolons to terminate expressions. |
|
@logger = Logger.new(STDOUT); |
|
^ |
|
lib/squib.rb:23:35: C: Do not use semicolons to terminate expressions. |
|
@logger.level = Logger::WARN; |
|
^ |
|
lib/squib.rb:24:46: W: Unused block argument - datetime. If it's necessary, use _ or _datetime as an argument name to indicate that it won't be used. |
|
@logger.formatter = proc do |severity, datetime, progname, msg| |
|
^^^^^^^^ |
|
lib/squib.rb:31:1: C: Extra empty line detected at body end. |
|
lib/squib.rb:32:4: C: Final newline missing. |
|
end |
|
|
|
Rakefile:10:3: C: Missing space after #. |
|
#t.options = ['--any', '--extra', '--opts'] # optional |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/autoscale_font.rb:7:13: C: Prefer reduce over inject. |
|
str_array.inject([]) do | memo, str | |
|
^^^^^^ |
|
samples/autoscale_font.rb:27:4: C: Final newline missing. |
|
end |
|
|
|
samples/basic.rb:4:8: C: Space inside { missing. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^ |
|
samples/basic.rb:4:19: C: Use %w or %W for array of words. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/basic.rb:5:22: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/basic.rb:5:24: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/basic.rb:5:27: C: Space inside } missing. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/basic.rb:16:4: C: Inconsistent indentation detected. |
|
png range: [0,2], file: 'shiny-purse.png', x: 620, y: 75 |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/basic.rb:16:17: C: Space missing after comma. |
|
png range: [0,2], file: 'shiny-purse.png', x: 620, y: 75 |
|
^ |
|
samples/basic.rb:17:4: C: Inconsistent indentation detected. |
|
svg range: 1..2, file: 'spanner.svg', x: 620, y: 218 |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/basic.rb:19:38: C: Missing space after #. |
|
save prefix: 'basic_', format: :png#, progress_bar: true |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
samples/basic.rb:19:38: C: Put a space before an end-of-line comment. |
|
save prefix: 'basic_', format: :png#, progress_bar: true |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
samples/basic.rb:20:4: C: Final newline missing. |
|
end |
|
|
|
samples/colors.rb:7:48: C: Surrounding space missing for operator '+='. |
|
text color: '#f00', str: '3-hex', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:8:56: C: Surrounding space missing for operator '+='. |
|
text color: '#f00', str: '3-hex (alpha)', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:9:51: C: Surrounding space missing for operator '+='. |
|
text color: '#ff0000', str: '6-hex', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:10:62: C: Surrounding space missing for operator '+='. |
|
text color: '#ff000099', str: '8-hex(alpha) *', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:11:58: C: Surrounding space missing for operator '+='. |
|
text color: '#ffff00000000', str: '12-hex', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:12:70: C: Surrounding space missing for operator '+='. |
|
text color: '#ffff000000009999', str: '12-hex (alpha)', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:13:73: W: Useless assignment to variable - y. |
|
text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y+=50 |
|
^ |
|
samples/colors.rb:13:74: C: Surrounding space missing for operator '+='. |
|
text color: :burnt_orange, str: 'Symbols of constants too', x: 50, y: y+=50 |
|
^^ |
|
samples/colors.rb:16:4: C: Final newline missing. |
|
end |
|
|
|
samples/custom_config.rb:19:4: C: Final newline missing. |
|
end |
|
|
|
samples/draw_shapes.rb:19:4: C: Final newline missing. |
|
end |
|
|
|
samples/excel.rb:16:3: W: Useless assignment to variable - data. |
|
data = xlsx file: 'sample.xlsx', sheet: 2 |
|
^^^^ |
|
samples/hello_world.rb:7:4: C: Final newline missing. |
|
end |
|
|
|
samples/load_images.rb:16:81: C: Line is too long. [81/80] |
|
svg file: 'spanner.svg', id: 'backdrop', x: 50, y: 450, width: 125, height: 125 |
|
^ |
|
samples/portrait-landscape.rb:1:1: C: Use snake_case for source file names. |
|
require 'squib' |
|
^ |
|
samples/portrait-landscape.rb:23:4: C: Final newline missing. |
|
end |
|
|
|
samples/ranges.rb:4:8: C: Space inside { missing. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^ |
|
samples/ranges.rb:4:19: C: Use %w or %W for array of words. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/ranges.rb:5:19: C: Use %w or %W for array of words. |
|
'type' => ['Thug', 'Thinker', 'Thinker'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/ranges.rb:6:22: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/ranges.rb:6:24: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/ranges.rb:6:27: C: Space inside } missing. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/ranges.rb:20:62: C: Space missing after colon. |
|
text range: 0..1, str: 'Thief and Grifter only!!', x: 25, y:200 |
|
^ |
|
samples/ranges.rb:30:17: C: Space missing after comma. |
|
text range: [0,2], str: 'Thief and Mastermind only!!', x: 25, y:300 |
|
^ |
|
samples/ranges.rb:30:66: C: Space missing after colon. |
|
text range: [0,2], str: 'Thief and Mastermind only!!', x: 25, y:300 |
|
^ |
|
samples/ranges.rb:33:81: C: Line is too long. [87/80] |
|
# corresponds to the deck's cards. This allows for each card to be styled differently |
|
^^^^^^^ |
|
samples/ranges.rb:34:81: C: Line is too long. [110/80] |
|
# This renders three cards, with three strings that had three different colors at three different locations. |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/ranges.rb:42:10: C: Space found before semicolon. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
samples/ranges.rb:42:11: C: Do not use semicolons to terminate expressions. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
samples/ranges.rb:42:41: C: Space missing to the left of {. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
samples/ranges.rb:42:48: C: Space missing after comma. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
samples/ranges.rb:42:64: C: Space missing inside }. |
|
id = {} ; data['name'].each_with_index{ |name,i| id[name] = i} |
|
^ |
|
samples/ranges.rb:45:9: C: Space missing after colon. |
|
x:25, y: 400 |
|
^ |
|
samples/ranges.rb:48:12: C: Do not use semicolons to terminate expressions. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
samples/ranges.rb:48:42: C: Space missing to the left of {. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
samples/ranges.rb:48:46: C: Space missing after comma. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
samples/ranges.rb:48:71: C: Space missing inside }. |
|
type = {}; data['type'].each_with_index{ |t,i| (type[t] ||= []) << i} |
|
^ |
|
samples/ranges.rb:51:9: C: Space missing after colon. |
|
x:25, y: 500 |
|
^ |
|
samples/ranges.rb:55:1: C: 1 trailing blank lines detected. |
|
samples/save_pdf.rb:12:3: C: Missing space after #. |
|
#Note that our PNGs still are not trimmed even though the pdf ones are |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/text_options.rb:4:8: C: Space inside { missing. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^ |
|
samples/text_options.rb:4:19: C: Use %w or %W for array of words. |
|
data = {'name' => ['Thief', 'Grifter', 'Mastermind'], |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/text_options.rb:5:22: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/text_options.rb:5:24: C: Space missing after comma. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/text_options.rb:5:27: C: Space inside } missing. |
|
'level' => [1,2,3]} |
|
^ |
|
samples/text_options.rb:6:81: C: Line is too long. [745/80] |
|
longtext = "This is left-justified text.\nWhat do you know about tweetle beetles? well... \nWhen tweetle beetles fight, it's called a tweetle beetle battle. And when they battle in a puddle, it's a tweetle beetle puddle battle. AND when tweetle beetles battle with paddles in a puddle, they call it a tweetle beetle puddle paddle battle. AND... When beetles battle beetles in a puddle paddle battle and the beetle battle puddle is a puddle in a bottle... ..they call this a tweetle beetle bottle puddle paddle battle muddle. AND... When beetles fight these battles in a bottle with their paddles and the bottle's on a poodle and the poodle's eating noodles... ...they call this a muddle puddle tweetle poodle beetle noodle bottle paddle battle." |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/text_options.rb:19:46: C: Space missing after colon. |
|
text str: 'Font strings are expressive!', x:65, y: 200, |
|
^ |
|
samples/text_options.rb:22:46: C: Space missing after colon. |
|
text str: 'Font strings are expressive!', x:65, y: 300, |
|
^ |
|
samples/text_options.rb:28:81: C: Line is too long. [107/80] |
|
text str: 'This text has fixed width, fixed height, center-aligned, middle-valigned, and has a red hint', |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/text_options.rb:35:81: C: Line is too long. [119/80] |
|
text str: 'Ellipsization!\nThe ultimate question of life, the universe, and everything to life and everything is 42', |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
samples/tgc_proofs.rb:17:31: C: Space missing after colon. |
|
png file: 'pokercard.png', x:0, y:0, alpha: 0.5 |
|
^ |
|
samples/tgc_proofs.rb:17:36: C: Space missing after colon. |
|
png file: 'pokercard.png', x:0, y:0, alpha: 0.5 |
|
^ |
|
samples/tgc_proofs.rb:20:4: C: Final newline missing. |
|
end |
|
|
|
samples/use_layout.rb:30:3: C: Missing space after #. |
|
#require 'pp' |
|
^^^^^^^^^^^^^ |
|
samples/use_layout.rb:31:3: C: Missing space after #. |
|
#pp @layout |
|
^^^^^^^^^^^ |
|
samples/use_layout.rb:34:4: C: Final newline missing. |
|
end |
|
|
|
spec/api/api_text_spec.rb:7:3: C: Use 2 (not 3) spaces for indentation. |
|
it "should use the default font when #text and #set_font don't specify" do |
|
^^^ |
|
spec/api/api_text_spec.rb:10:37: C: Align the parameters of a method call if they span more than one line. |
|
anything, anything, anything,anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^^^^^^^^ |
|
spec/api/api_text_spec.rb:10:65: C: Space missing after comma. |
|
anything, anything, anything,anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:10:74: C: Space missing after comma. |
|
anything, anything, anything,anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:10:81: C: Line is too long. [180/80] |
|
anything, anything, anything,anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/api/api_text_spec.rb:10:83: C: Space missing after comma. |
|
anything, anything, anything,anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:10:122: C: Space missing after comma. |
|
anything, anything, anything,anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:16:5: W: end at 16, 4 is not aligned with it "should use the default font when #text and #set_font don't specify" do at 7, 5 |
|
end |
|
^^^ |
|
spec/api/api_text_spec.rb:18:5: C: Inconsistent indentation detected. |
|
it "should use the #set_font when #text doesn't specify" do |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/api/api_text_spec.rb:21:37: C: Align the parameters of a method call if they span more than one line. |
|
anything, anything, anything, anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^^^^^^^^ |
|
spec/api/api_text_spec.rb:21:75: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:21:81: C: Line is too long. [181/80] |
|
anything, anything, anything, anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/api/api_text_spec.rb:21:84: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:21:123: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything, anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:30:5: C: Inconsistent indentation detected. |
|
it 'should use the specified font no matter what' do |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/api/api_text_spec.rb:33:37: C: Align the parameters of a method call if they span more than one line. |
|
anything, anything, anything, anything,anything,anything,anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^^^^^^^^ |
|
spec/api/api_text_spec.rb:33:75: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything,anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:33:81: C: Line is too long. [180/80] |
|
anything, anything, anything, anything,anything,anything,anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/api/api_text_spec.rb:33:84: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything,anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:33:93: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything,anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/api/api_text_spec.rb:33:122: C: Space missing after comma. |
|
anything, anything, anything, anything,anything,anything,anything, anything, anything,anything, anything, anything, anything, anything, anything |
|
^ |
|
spec/commands/new_spec.rb:4:9: C: Put one space between the method name and the first argument. |
|
describe Squib::Commands::New do |
|
^^ |
|
spec/commands/new_spec.rb:7:1: C: Use 2 (not 4) spaces for indentation. |
|
before(:all) do |
|
^^^^ |
|
spec/commands/new_spec.rb:11:81: C: Line is too long. [82/80] |
|
Dir.chdir(File.expand_path('../../samples/_output', File.dirname(__FILE__))) |
|
^^ |
|
spec/commands/new_spec.rb:20:13: C: Space missing to the left of {. |
|
expect{@cmd.process([])}.to raise_error(ArgumentError, 'Please specify a path.') |
|
^ |
|
spec/commands/new_spec.rb:20:14: C: Space missing inside {. |
|
expect{@cmd.process([])}.to raise_error(ArgumentError, 'Please specify a path.') |
|
^ |
|
spec/commands/new_spec.rb:20:30: C: Space missing inside }. |
|
expect{@cmd.process([])}.to raise_error(ArgumentError, 'Please specify a path.') |
|
^ |
|
spec/commands/new_spec.rb:20:81: C: Line is too long. [86/80] |
|
expect{@cmd.process([])}.to raise_error(ArgumentError, 'Please specify a path.') |
|
^^^^^^ |
|
spec/commands/new_spec.rb:25:19: W: File.exists? is deprecated in favor of File.exist?. |
|
expect(File.exists?('foo/deck.rb')).to be true |
|
^^^^^^^ |
|
spec/commands/new_spec.rb:31:19: W: File.exists? is deprecated in favor of File.exist?. |
|
expect(File.exists?('foo/deck.rb')).to be true |
|
^^^^^^^ |
|
spec/commands/new_spec.rb:39:81: C: Line is too long. [102/80] |
|
expect($stderr.string.chomp).to end_with ' exists and is not empty. Doing nothing and quitting.' |
|
^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/commands/new_spec.rb:46:1: W: end at 46, 0 is not aligned with describe '#process' do at 6, 2 |
|
end |
|
^^^ |
|
spec/commands/new_spec.rb:48:4: C: Final newline missing. |
|
end |
|
|
|
spec/deck_spec.rb:53:12: C: Redundant curly braces around a hash parameter. |
|
eq({'frame' => { |
|
^^^^^^^^^^^^^ |
|
spec/deck_spec.rb:53:12: C: Space inside { missing. |
|
eq({'frame' => { |
|
^ |
|
spec/deck_spec.rb:54:15: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
|
'x' => 38, |
|
^^^^^^^^^ |
|
spec/deck_spec.rb:57:35: C: Avoid comma after the last item of a hash. |
|
'font' => 'Mr. Font', |
|
^ |
|
spec/deck_spec.rb:58:15: C: Indent the right brace the same as the first position after the preceding left parenthesis. |
|
} |
|
^ |
|
spec/deck_spec.rb:66:12: C: Redundant curly braces around a hash parameter. |
|
eq({'frame' => { |
|
^^^^^^^^^^^^^ |
|
spec/deck_spec.rb:66:12: C: Space inside { missing. |
|
eq({'frame' => { |
|
^ |
|
spec/deck_spec.rb:67:15: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
|
'x' => 38, |
|
^^^^^^^^^ |
|
spec/deck_spec.rb:68:24: C: Avoid comma after the last item of a hash. |
|
'y' => 38, |
|
^ |
|
spec/deck_spec.rb:69:15: C: Indent the right brace the same as the first position after the preceding left parenthesis. |
|
}, |
|
^ |
|
spec/deck_spec.rb:74:29: C: Avoid comma after the last item of a hash. |
|
'width' => 100, |
|
^ |
|
spec/deck_spec.rb:75:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
} |
|
^ |
|
spec/deck_spec.rb:83:12: C: Redundant curly braces around a hash parameter. |
|
eq({'frame' => { |
|
^^^^^^^^^^^^^ |
|
spec/deck_spec.rb:83:12: C: Space inside { missing. |
|
eq({'frame' => { |
|
^ |
|
spec/deck_spec.rb:84:15: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
|
'x' => 38, |
|
^^^^^^^^^ |
|
spec/deck_spec.rb:85:24: C: Avoid comma after the last item of a hash. |
|
'y' => 38, |
|
^ |
|
spec/deck_spec.rb:86:15: C: Indent the right brace the same as the first position after the preceding left parenthesis. |
|
}, |
|
^ |
|
spec/deck_spec.rb:91:29: C: Avoid comma after the last item of a hash. |
|
'width' => 100, |
|
^ |
|
spec/deck_spec.rb:92:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
} |
|
^ |
|
spec/deck_spec.rb:100:12: C: Redundant curly braces around a hash parameter. |
|
eq({'frame' => { |
|
^^^^^^^^^^^^^ |
|
spec/deck_spec.rb:100:12: C: Space inside { missing. |
|
eq({'frame' => { |
|
^ |
|
spec/deck_spec.rb:101:15: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
|
'x' => 38, |
|
^^^^^^^^^ |
|
spec/deck_spec.rb:102:24: C: Avoid comma after the last item of a hash. |
|
'y' => 38, |
|
^ |
|
spec/deck_spec.rb:103:15: C: Indent the right brace the same as the first position after the preceding left parenthesis. |
|
}, |
|
^ |
|
spec/deck_spec.rb:108:29: C: Avoid comma after the last item of a hash. |
|
'width' => 100, |
|
^ |
|
spec/deck_spec.rb:109:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
}, |
|
^ |
|
spec/deck_spec.rb:114:29: C: Avoid comma after the last item of a hash. |
|
'width' => 150, |
|
^ |
|
spec/deck_spec.rb:115:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
}, |
|
^ |
|
spec/deck_spec.rb:115:16: C: Avoid comma after the last item of a hash. |
|
}, |
|
^ |
|
spec/deck_spec.rb:123:12: C: Redundant curly braces around a hash parameter. |
|
eq({'aunt' => { |
|
^^^^^^^^^^^^ |
|
spec/deck_spec.rb:123:12: C: Space inside { missing. |
|
eq({'aunt' => { |
|
^ |
|
spec/deck_spec.rb:124:15: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
|
'a' => 101, |
|
^^^^^^^^^^ |
|
spec/deck_spec.rb:126:25: C: Avoid comma after the last item of a hash. |
|
'c' => 103, |
|
^ |
|
spec/deck_spec.rb:127:15: C: Indent the right brace the same as the first position after the preceding left parenthesis. |
|
}, |
|
^ |
|
spec/deck_spec.rb:131:25: C: Avoid comma after the last item of a hash. |
|
'b' => 106, |
|
^ |
|
spec/deck_spec.rb:132:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
}, |
|
^ |
|
spec/deck_spec.rb:134:28: C: Use %w or %W for array of words. |
|
'extends' => ['uncle','aunt'], |
|
^^^^^^^^^^^^^^^^ |
|
spec/deck_spec.rb:134:36: C: Space missing after comma. |
|
'extends' => ['uncle','aunt'], |
|
^ |
|
spec/deck_spec.rb:140:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
}, |
|
^ |
|
spec/deck_spec.rb:140:16: C: Avoid comma after the last item of a hash. |
|
}, |
|
^ |
|
spec/deck_spec.rb:148:12: C: Redundant curly braces around a hash parameter. |
|
eq({'frame' => { |
|
^^^^^^^^^^^^^ |
|
spec/deck_spec.rb:148:12: C: Space inside { missing. |
|
eq({'frame' => { |
|
^ |
|
spec/deck_spec.rb:149:15: C: Use 2 spaces for indentation in a hash, relative to the first position after the preceding left parenthesis. |
|
'x' => 38, |
|
^^^^^^^^^ |
|
spec/deck_spec.rb:150:24: C: Avoid comma after the last item of a hash. |
|
'y' => 38, |
|
^ |
|
spec/deck_spec.rb:151:15: C: Indent the right brace the same as the first position after the preceding left parenthesis. |
|
}, |
|
^ |
|
spec/deck_spec.rb:156:29: C: Avoid comma after the last item of a hash. |
|
'width' => 100, |
|
^ |
|
spec/deck_spec.rb:157:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
}, |
|
^ |
|
spec/deck_spec.rb:162:29: C: Avoid comma after the last item of a hash. |
|
'width' => 100, |
|
^ |
|
spec/deck_spec.rb:163:15: C: Indent the right brace the same as the start of the line where the left brace is. |
|
}, |
|
^ |
|
spec/deck_spec.rb:163:16: C: Avoid comma after the last item of a hash. |
|
}, |
|
^ |
|
spec/input_helpers_spec.rb:4:1: C: Missing top-level class documentation comment. |
|
class DummyDeck |
|
^^^^^ |
|
spec/input_helpers_spec.rb:5:10: C: Put one space between the method name and the first argument. |
|
include Squib::InputHelpers |
|
^^ |
|
spec/input_helpers_spec.rb:9:1: C: Missing top-level module documentation comment. |
|
module Squib |
|
^^^^^^ |
|
spec/input_helpers_spec.rb:10:3: C: Use attr_writer to define trivial writer methods. |
|
def logger=(l) |
|
^^^ |
|
spec/input_helpers_spec.rb:18:1: C: Extra blank line detected. |
|
spec/input_helpers_spec.rb:22:17: C: Space inside { missing. |
|
'blah' => {x: 25}, |
|
^ |
|
spec/input_helpers_spec.rb:22:23: C: Space inside } missing. |
|
'blah' => {x: 25}, |
|
^ |
|
spec/input_helpers_spec.rb:23:19: C: Space inside { missing. |
|
'apples' => {x: 35}, |
|
^ |
|
spec/input_helpers_spec.rb:23:25: C: Space inside } missing. |
|
'apples' => {x: 35}, |
|
^ |
|
spec/input_helpers_spec.rb:24:20: C: Space inside { missing. |
|
'oranges' => {y: 45}, |
|
^ |
|
spec/input_helpers_spec.rb:24:26: C: Space inside } missing. |
|
'oranges' => {y: 45}, |
|
^ |
|
spec/input_helpers_spec.rb:24:27: C: Avoid comma after the last item of a hash. |
|
'oranges' => {y: 45}, |
|
^ |
|
spec/input_helpers_spec.rb:34:81: C: Line is too long. [93/80] |
|
expect(Squib.logger).to receive(:warn).with("Layout entry 'foo' does not exist.").twice |
|
^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:36:37: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:36:37: C: Space inside { missing. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^ |
|
spec/input_helpers_spec.rb:36:50: C: Space inside } missing. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^ |
|
spec/input_helpers_spec.rb:36:60: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:36:60: C: Space inside { missing. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^ |
|
spec/input_helpers_spec.rb:36:74: C: Space missing after comma. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^ |
|
spec/input_helpers_spec.rb:36:80: C: Space inside } missing. |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^ |
|
spec/input_helpers_spec.rb:36:81: C: Line is too long. [81/80] |
|
expect(@deck.send(:layoutify, {layout: :foo})).to eq({layout: [:foo,:foo]}) |
|
^ |
|
spec/input_helpers_spec.rb:41:37: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:layoutify, {layout: :blah})).to \ |
|
^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:41:37: C: Space inside { missing. |
|
expect(@deck.send(:layoutify, {layout: :blah})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:41:51: C: Space inside } missing. |
|
expect(@deck.send(:layoutify, {layout: :blah})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:42:12: C: Redundant curly braces around a hash parameter. |
|
eq({layout: [:blah, :blah], x: [25, 25]}) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:42:12: C: Space inside { missing. |
|
eq({layout: [:blah, :blah], x: [25, 25]}) |
|
^ |
|
spec/input_helpers_spec.rb:42:48: C: Space inside } missing. |
|
eq({layout: [:blah, :blah], x: [25, 25]}) |
|
^ |
|
spec/input_helpers_spec.rb:46:37: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:layoutify, {layout: ['blah', 'apples']})).to \ |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:46:37: C: Space inside { missing. |
|
expect(@deck.send(:layoutify, {layout: ['blah', 'apples']})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:46:46: C: Use %w or %W for array of words. |
|
expect(@deck.send(:layoutify, {layout: ['blah', 'apples']})).to \ |
|
^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:46:64: C: Space inside } missing. |
|
expect(@deck.send(:layoutify, {layout: ['blah', 'apples']})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:47:12: C: Redundant curly braces around a hash parameter. |
|
eq({layout: ['blah','apples'], x: [25, 35]}) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:47:12: C: Space inside { missing. |
|
eq({layout: ['blah','apples'], x: [25, 35]}) |
|
^ |
|
spec/input_helpers_spec.rb:47:21: C: Use %w or %W for array of words. |
|
eq({layout: ['blah','apples'], x: [25, 35]}) |
|
^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:47:28: C: Space missing after comma. |
|
eq({layout: ['blah','apples'], x: [25, 35]}) |
|
^ |
|
spec/input_helpers_spec.rb:47:51: C: Space inside } missing. |
|
eq({layout: ['blah','apples'], x: [25, 35]}) |
|
^ |
|
spec/input_helpers_spec.rb:50:81: C: Line is too long. [85/80] |
|
it 'still has nils when not applied two different layouts differ in structure' do |
|
^^^^^ |
|
spec/input_helpers_spec.rb:51:37: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:layoutify, {layout: ['apples', 'oranges']})).to \ |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:51:37: C: Space inside { missing. |
|
expect(@deck.send(:layoutify, {layout: ['apples', 'oranges']})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:51:46: C: Use %w or %W for array of words. |
|
expect(@deck.send(:layoutify, {layout: ['apples', 'oranges']})).to \ |
|
^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:51:67: C: Space inside } missing. |
|
expect(@deck.send(:layoutify, {layout: ['apples', 'oranges']})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:52:12: C: Redundant curly braces around a hash parameter. |
|
eq({layout: ['apples','oranges'], x: [35], y: [nil, 45]}) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:52:12: C: Space inside { missing. |
|
eq({layout: ['apples','oranges'], x: [35], y: [nil, 45]}) |
|
^ |
|
spec/input_helpers_spec.rb:52:21: C: Use %w or %W for array of words. |
|
eq({layout: ['apples','oranges'], x: [35], y: [nil, 45]}) |
|
^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:52:30: C: Space missing after comma. |
|
eq({layout: ['apples','oranges'], x: [35], y: [nil, 45]}) |
|
^ |
|
spec/input_helpers_spec.rb:52:64: C: Space inside } missing. |
|
eq({layout: ['apples','oranges'], x: [35], y: [nil, 45]}) |
|
^ |
|
spec/input_helpers_spec.rb:53:7: C: Missing space after #. |
|
#...this might behavior that is hard to debug for users. Trying to come up with a warning or something... |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:53:81: C: Line is too long. [111/80] |
|
#...this might behavior that is hard to debug for users. Trying to come up with a warning or something... |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:57:37: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:layoutify, {layout: 'blah'})).to \ |
|
^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:57:37: C: Space inside { missing. |
|
expect(@deck.send(:layoutify, {layout: 'blah'})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:57:52: C: Space inside } missing. |
|
expect(@deck.send(:layoutify, {layout: 'blah'})).to \ |
|
^ |
|
spec/input_helpers_spec.rb:58:12: C: Redundant curly braces around a hash parameter. |
|
eq({layout: ['blah','blah'], x: [25, 25]}) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:58:12: C: Space inside { missing. |
|
eq({layout: ['blah','blah'], x: [25, 25]}) |
|
^ |
|
spec/input_helpers_spec.rb:58:21: C: Use %w or %W for array of words. |
|
eq({layout: ['blah','blah'], x: [25, 25]}) |
|
^^^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:58:28: C: Space missing after comma. |
|
eq({layout: ['blah','blah'], x: [25, 25]}) |
|
^ |
|
spec/input_helpers_spec.rb:58:49: C: Space inside } missing. |
|
eq({layout: ['blah','blah'], x: [25, 25]}) |
|
^ |
|
spec/input_helpers_spec.rb:65:13: C: Space missing to the left of {. |
|
expect{@deck.send(:rangeify, {range: 2..3})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:65:14: C: Space missing inside {. |
|
expect{@deck.send(:rangeify, {range: 2..3})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:65:36: C: Redundant curly braces around a hash parameter. |
|
expect{@deck.send(:rangeify, {range: 2..3})}.to \ |
|
^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:65:36: C: Space inside { missing. |
|
expect{@deck.send(:rangeify, {range: 2..3})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:65:48: C: Space inside } missing. |
|
expect{@deck.send(:rangeify, {range: 2..3})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:65:50: C: Space missing inside }. |
|
expect{@deck.send(:rangeify, {range: 2..3})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:70:13: C: Space missing to the left of {. |
|
expect{@deck.send(:rangeify, {range: nil})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:70:14: C: Space missing inside {. |
|
expect{@deck.send(:rangeify, {range: nil})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:70:36: C: Redundant curly braces around a hash parameter. |
|
expect{@deck.send(:rangeify, {range: nil})}.to \ |
|
^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:70:36: C: Space inside { missing. |
|
expect{@deck.send(:rangeify, {range: nil})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:70:47: C: Space inside } missing. |
|
expect{@deck.send(:rangeify, {range: nil})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:70:49: C: Space missing inside }. |
|
expect{@deck.send(:rangeify, {range: nil})}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:75:36: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:rangeify, {range: :all})).to eq({range: 0..1}) |
|
^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:75:36: C: Space inside { missing. |
|
expect(@deck.send(:rangeify, {range: :all})).to eq({range: 0..1}) |
|
^ |
|
spec/input_helpers_spec.rb:75:48: C: Space inside } missing. |
|
expect(@deck.send(:rangeify, {range: :all})).to eq({range: 0..1}) |
|
^ |
|
spec/input_helpers_spec.rb:75:58: C: Redundant curly braces around a hash parameter. |
|
expect(@deck.send(:rangeify, {range: :all})).to eq({range: 0..1}) |
|
^^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:75:58: C: Space inside { missing. |
|
expect(@deck.send(:rangeify, {range: :all})).to eq({range: 0..1}) |
|
^ |
|
spec/input_helpers_spec.rb:75:70: C: Space inside } missing. |
|
expect(@deck.send(:rangeify, {range: :all})).to eq({range: 0..1}) |
|
^ |
|
spec/input_helpers_spec.rb:81:13: C: Space missing to the left of {. |
|
expect{@deck.send(:fileify, {file: 'nonexist.txt'}, true)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:81:14: C: Space missing inside {. |
|
expect{@deck.send(:fileify, {file: 'nonexist.txt'}, true)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:81:35: C: Space inside { missing. |
|
expect{@deck.send(:fileify, {file: 'nonexist.txt'}, true)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:81:56: C: Space inside } missing. |
|
expect{@deck.send(:fileify, {file: 'nonexist.txt'}, true)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:81:64: C: Space missing inside }. |
|
expect{@deck.send(:fileify, {file: 'nonexist.txt'}, true)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:82:33: C: Space missing after comma. |
|
raise_error(RuntimeError,"File #{File.expand_path('nonexist.txt')} does not exist!") |
|
^ |
|
spec/input_helpers_spec.rb:82:81: C: Line is too long. [92/80] |
|
raise_error(RuntimeError,"File #{File.expand_path('nonexist.txt')} does not exist!") |
|
^^^^^^^^^^^^ |
|
spec/input_helpers_spec.rb:88:13: C: Space missing to the left of {. |
|
expect{@deck.send(:dirify, {dir: 'nonexist'}, :dir, false)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:88:14: C: Space missing inside {. |
|
expect{@deck.send(:dirify, {dir: 'nonexist'}, :dir, false)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:88:34: C: Space inside { missing. |
|
expect{@deck.send(:dirify, {dir: 'nonexist'}, :dir, false)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:88:50: C: Space inside } missing. |
|
expect{@deck.send(:dirify, {dir: 'nonexist'}, :dir, false)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:88:65: C: Space missing inside }. |
|
expect{@deck.send(:dirify, {dir: 'nonexist'}, :dir, false)}.to \ |
|
^ |
|
spec/input_helpers_spec.rb:89:33: C: Space missing after comma. |
|
raise_error(RuntimeError,"'nonexist' does not exist!") |
|
^ |
|
spec/input_helpers_spec.rb:95:37: C: Space inside { missing. |
|
color = @deck.send(:colorify, {color: ['#fff']}, true)[:color] |
|
^ |
|
spec/input_helpers_spec.rb:95:53: C: Space inside } missing. |
|
color = @deck.send(:colorify, {color: ['#fff']}, true)[:color] |
|
^ |
|
spec/input_helpers_spec.rb:100:13: C: Space missing to the left of {. |
|
expect{ @deck.send(:colorify, {color: [:nonexist]}, false) }.to \ |
|
^ |
|
spec/input_helpers_spec.rb:100:37: C: Space inside { missing. |
|
expect{ @deck.send(:colorify, {color: [:nonexist]}, false) }.to \ |
|
^ |
|
spec/input_helpers_spec.rb:100:56: C: Space inside } missing. |
|
expect{ @deck.send(:colorify, {color: [:nonexist]}, false) }.to \ |
|
^ |
|
spec/input_helpers_spec.rb:106:36: C: Space inside { missing. |
|
expect(@deck.send(:colorify, {color: [:foo]}, false)[:color][0].to_s).to \ |
|
^ |
|
spec/input_helpers_spec.rb:106:50: C: Space inside } missing. |
|
expect(@deck.send(:colorify, {color: [:foo]}, false)[:color][0].to_s).to \ |
|
^ |
|
spec/input_helpers_spec.rb:112:36: C: Space inside { missing. |
|
expect(@deck.send(:colorify, {color: ['foo']}, false)[:color][0].to_s).to \ |
|
^ |
|
spec/input_helpers_spec.rb:112:51: C: Space inside } missing. |
|
expect(@deck.send(:colorify, {color: ['foo']}, false)[:color][0].to_s).to \ |
|
^ |
|
spec/input_helpers_spec.rb:112:81: C: Line is too long. [81/80] |
|
expect(@deck.send(:colorify, {color: ['foo']}, false)[:color][0].to_s).to \ |
|
^ |
|
spec/input_helpers_spec.rb:117:4: C: Final newline missing. |
|
end |
|
|
|
spec/samples_run_spec.rb:9:7: W: Useless assignment to variable - p. |
|
p = double('ProgressBar') |
|
^ |
|
spec/samples_run_spec.rb:13:31: C: Missing space after #. |
|
Dir.chdir(samples) do #to save to _output |
|
^^^^^^^^^^^^^^^^^^^ |
|
spec/samples_run_spec.rb:20:4: C: Final newline missing. |
|
end |
|
|
|
spec/spec_helper.rb:12:4: C: Final newline missing. |
|
end |
|
|
|
squib.gemspec:8:81: C: Line is too long. [111/80] |
|
spec.required_rubygems_version = Gem::Requirement.new('>= 0') if spec.respond_to? :required_rubygems_version= |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
squib.gemspec:16:24: C: %q-literals should be delimited by ( and ) |
|
spec.summary = %q{A Ruby DSL for prototyping card games} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
squib.gemspec:16:24: C: Use %q only for strings that contain both single quotes and double quotes. |
|
spec.summary = %q{A Ruby DSL for prototyping card games} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
squib.gemspec:17:24: C: %q-literals should be delimited by ( and ) |
|
spec.description = %q{Squib is a Ruby DSL for prototyping card games} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
squib.gemspec:17:24: C: Use %q only for strings that contain both single quotes and double quotes. |
|
spec.description = %q{Squib is a Ruby DSL for prototyping card games} |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
squib.gemspec:23:27: C: %w-literals should be delimited by ( and ) |
|
spec.extra_rdoc_files = %w[README.md LICENSE.txt] |
|
^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
squib.gemspec:26:40: C: Use %r only for regular expressions matching more than 1 '/' character. |
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) } |
|
^^^^^^^^^ |
|
squib.gemspec:27:40: C: Use %r only for regular expressions matching more than 1 '/' character. |
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) |
|
^^^^^^^^^^^^^^^^^^^^^^^^^^ |
|
|
|
64 files inspected, 815 offenses detected
|
|
|