ManageIQ/manageiq

View on GitHub
lib/miq_expression/count_field.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Do not mix named captures and numbered captures in a Regexp literal.
Open

  REGEX = /
(?<model_name>([[:upper:]][[:alnum:]]*(::)?)+)
\.(?<associations>[a-z_.]+)
/x
Severity: Minor
Found in lib/miq_expression/count_field.rb by rubocop

Do not mix named captures and numbered captures in a Regexp literal because numbered capture is ignored if they're mixed. Replace numbered captures with non-capturing groupings or named captures.

Example:

# bad
/(?<foo>FOO)(BAR)/

# good
/(?<foo>FOO)(?<bar>BAR)/

# good
/(?<foo>FOO)(?:BAR)/

# good
/(FOO)(BAR)/</foo></bar></foo></foo>

There are no issues that match your filters.

Category
Status