thoughtbot/paperclip

View on GitHub

Showing 920 of 1,009 total issues

Line is too long. [90/80]
Open

    # that file. The intent is to make the attachment as much like a normal attribute. The
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [91/80]
Open

    #   to all of the thumbnails being generated. If you specify options for the :original,
Severity: Minor
Found in lib/paperclip.rb by rubocop

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'mimemagic'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/io_adapters/registry'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/io_adapters/identity_adapter'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Align join with attachment.path(style). on line 164.
Open

            join("/").
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

This cop checks the indentation of the method name part in method calls that span more than one line.

Example: EnforcedStyle: aligned

# bad
while myvariable
.b
  # do something
end

# good
while myvariable
      .b
  # do something
end

# good
Thing.a
     .b
     .c

Example: EnforcedStyle: indented

# good
while myvariable
  .b

  # do something
end

Example: EnforcedStyle: indentedrelativeto_receiver

# good
while myvariable
        .a
        .b

  # do something
end

# good
myvariable = Thing
               .a
               .b
               .c

Operator || should be surrounded by a single space.
Open

          @s3_options     = @options[:s3_options]     || {}
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Checks that operators have space around them, except for ** which should not have surrounding space.

Example:

# bad
total = 3*4
"apple"+"juice"
my_number = 38/4
a ** b

# good
total = 3 * 4
"apple" + "juice"
my_number = 38 / 4
a**b

Space inside } missing.
Open

        storage_class = {:default => storage_class} unless storage_class.respond_to?(:merge)
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Checks that braces used for hash literals have or don't have surrounding space depending on configuration.

Example: EnforcedStyle: space

# The `space` style enforces that hash literals have
# surrounding space.

# bad
h = {a: 1, b: 2}

# good
h = { a: 1, b: 2 }

Example: EnforcedStyle: no_space

# The `no_space` style enforces that hash literals have
# no surrounding space.

# bad
h = { a: 1, b: 2 }

# good
h = {a: 1, b: 2}

Example: EnforcedStyle: compact

# The `compact` style normally requires a space inside
# hash braces, with the exception that successive left
# braces or right braces are collapsed together in nested hashes.

# bad
h = { a: { b: 2 } }

# good
h = { a: { b: 2 }}

Line is too long. [90/80]
Open

    #   When using a Proc it provides a single parameter which is the attachment itself. A
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [89/80]
Open

    #   You can define the bucket as a Proc if you want to determine its name at runtime.
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [92/80]
Open

    #     by S3. The fourth option for the S3 url is :asset_host, which uses Rails' built-in
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [91/80]
Open

    # Paperclip::Attachment documentation for more specifics. There are a number of options
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [92/80]
Open

    #   as easily point to a directory served directly through Apache as it can to an action
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [86/80]
Open

    #   (http://www.imagemagick.org/script/command-line-options.php#resize). Paperclip
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [90/80]
Open

    # * +whiny+: Will raise an error if Paperclip cannot post_process an uploaded file due
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [92/80]
Open

    #   Note that this option takes a hash of options, each of which correspond to the style
Severity: Minor
Found in lib/paperclip.rb by rubocop

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/geometry_detector_factory'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/tempfile'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/interpolations/plural_cache'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
Open

require 'paperclip/attachment'
Severity: Minor
Found in lib/paperclip.rb by rubocop

Checks if uses of quotes match the configured preference.

Example: EnforcedStyle: single_quotes (default)

# bad
"No special symbols"
"No string interpolation"
"Just text"

# good
'No special symbols'
'No string interpolation'
'Just text'
"Wait! What's #{this}!"

Example: EnforcedStyle: double_quotes

# bad
'Just some text'
'No special chars or interpolation'

# good
"Just some text"
"No special chars or interpolation"
"Every string in #{project} uses double_quotes"
Severity
Category
Status
Source
Language