NullVoxPopuli/skinny_controllers

View on GitHub
lib/skinny_controllers/default_verbs.rb

Summary

Maintainability
A
0 mins
Test Coverage

Use SCREAMING_SNAKE_CASE for constants. (https://github.com/bbatsov/ruby-style-guide#screaming-snake-case)
Open

    Delete = 'Delete'.freeze

This cop checks whether constant names are written using SCREAMINGSNAKECASE.

To avoid false positives, it ignores cases in which we cannot know for certain the type of value that would be assigned to a constant.

Example:

# bad
InchInCm = 2.54
INCHinCM = 2.54
Inch_In_Cm = 2.54

# good
INCH_IN_CM = 2.54

Add an empty line after magic comments. (https://github.com/bbatsov/ruby-style-guide#separate-magic-comments-from-code)
Open

module SkinnyControllers

Checks for a newline after the final magic comment.

Example:

# good
# frozen_string_literal: true

# Some documentation for Person
class Person
  # Some code
end

# bad
# frozen_string_literal: true
# Some documentation for Person
class Person
  # Some code
end

Use SCREAMING_SNAKE_CASE for constants. (https://github.com/bbatsov/ruby-style-guide#screaming-snake-case)
Open

    Read = 'Read'.freeze

This cop checks whether constant names are written using SCREAMINGSNAKECASE.

To avoid false positives, it ignores cases in which we cannot know for certain the type of value that would be assigned to a constant.

Example:

# bad
InchInCm = 2.54
INCHinCM = 2.54
Inch_In_Cm = 2.54

# good
INCH_IN_CM = 2.54

Do not freeze immutable objects, as freezing them has no effect.
Open

    Create = 'Create'.freeze

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Do not freeze immutable objects, as freezing them has no effect.
Open

    Delete = 'Delete'.freeze

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Do not freeze immutable objects, as freezing them has no effect.
Open

    Read = 'Read'.freeze

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Do not freeze immutable objects, as freezing them has no effect.
Open

    ReadAll = 'ReadAll'.freeze

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Use SCREAMING_SNAKE_CASE for constants. (https://github.com/bbatsov/ruby-style-guide#screaming-snake-case)
Open

    ReadAll = 'ReadAll'.freeze

This cop checks whether constant names are written using SCREAMINGSNAKECASE.

To avoid false positives, it ignores cases in which we cannot know for certain the type of value that would be assigned to a constant.

Example:

# bad
InchInCm = 2.54
INCHinCM = 2.54
Inch_In_Cm = 2.54

# good
INCH_IN_CM = 2.54

Use SCREAMING_SNAKE_CASE for constants. (https://github.com/bbatsov/ruby-style-guide#screaming-snake-case)
Open

    Create = 'Create'.freeze

This cop checks whether constant names are written using SCREAMINGSNAKECASE.

To avoid false positives, it ignores cases in which we cannot know for certain the type of value that would be assigned to a constant.

Example:

# bad
InchInCm = 2.54
INCHinCM = 2.54
Inch_In_Cm = 2.54

# good
INCH_IN_CM = 2.54

Use SCREAMING_SNAKE_CASE for constants. (https://github.com/bbatsov/ruby-style-guide#screaming-snake-case)
Open

    Update = 'Update'.freeze

This cop checks whether constant names are written using SCREAMINGSNAKECASE.

To avoid false positives, it ignores cases in which we cannot know for certain the type of value that would be assigned to a constant.

Example:

# bad
InchInCm = 2.54
INCHinCM = 2.54
Inch_In_Cm = 2.54

# good
INCH_IN_CM = 2.54

Do not freeze immutable objects, as freezing them has no effect.
Open

    Update = 'Update'.freeze

This cop check for uses of Object#freeze on immutable objects.

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

There are no issues that match your filters.

Category
Status