PikachuEXE/rspec-json_matchers

View on GitHub
lib/rspec/json_matchers/utils/collection_keys_extractor.rb

Summary

Maintainability
A
0 mins
Test Coverage

Avoid comma after the last item of a hash.
Open

          Hash  => ->(collection) { collection.each_key.map(&:to_s).to_set },

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
]

Place the . on the next line, together with the method name.
Open

          COLLECTION_TYPE_TO_VALUE_EXTRACTION_PROC_MAP.

This cop checks the . position in multi-line method calls.

Example: EnforcedStyle: leading (default)

# bad
something.
  mehod

# good
something
  .method

Example: EnforcedStyle: trailing

# bad
something
  .method

# good
something.
  mehod

There are no issues that match your filters.

Category
Status