thoughtbot/paperclip

View on GitHub

Showing 1,009 of 1,009 total issues

Line is too long. [90/80]
Open

    # * +storage+: Chooses the storage backend where the files will be stored. The current
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/missing_attachment_styles'
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/helpers'
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"

Freeze mutable objects assigned to constants.
Open

    SENSIBLE_DEFAULT = "application/octet-stream"

This cop checks whether some constant value isn't a mutable literal (e.g. array or hash).

Example:

# bad
CONST = [1, 2, 3]

# good
CONST = [1, 2, 3].freeze

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. [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

Line is too long. [95/80]
Open

    #     has_attached_file :avatar, :styles => { :large => "300x300", :negative => "100x100" }
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    #   It is recommended that :convert_options option be included in the hash passed to each
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/callbacks'
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/content_type_detector'
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"

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

Line is too long. [94/80]
Open

    # * +url+: There are four options for the S3 url. You can choose to have the bucket's name
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [92/80]
Open

    #   path-style, or :s3_path_url). But in some cases paths don't work and you need to use
Severity: Minor
Found in lib/paperclip/storage/s3.rb by rubocop

Line is too long. [92/80]
Open

    # thumbnails will be created when the new file is assigned, but they will *not* be saved
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [89/80]
Open

    # until +save+ is called on the record. Likewise, if the attribute is set to +nil+ is
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    # * +preserve_files+: Keep the existing attachment files in all cases, even if the parent
Severity: Minor
Found in lib/paperclip.rb by rubocop

Line is too long. [93/80]
Open

    #   it would be best if you did not specify destructive options, as the intent of keeping
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 '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'
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_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"
Severity
Category
Status
Source
Language