codeclimate/codeclimate-duplication

View on GitHub
lib/cc/engine/analyzers/java/main.rb

Summary

Maintainability
A
0 mins
Test Coverage

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

            "(ImportDeclaration ___)".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

          REQUEST_PATH = "/java".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

          LANGUAGE = "java".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

            "(PackageDeclaration ___)".freeze,

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

Example:

# bad
CONST = 1.freeze

# good
CONST = 1

Avoid comma after the last item of an array.
Open

            "(PackageDeclaration ___)".freeze,

This cop checks for trailing comma in array and hash literals.

Example: EnforcedStyleForMultiline: consistent_comma

# bad
a = [1, 2,]

# good
a = [
  1, 2,
  3,
]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: comma

# bad
a = [1, 2,]

# good
a = [
  1,
  2,
]

Example: EnforcedStyleForMultiline: no_comma (default)

# bad
a = [1, 2,]

# good
a = [
  1,
  2
]

There are no issues that match your filters.

Category
Status