codeclimate/codeclimate

View on GitHub
lib/cc/workspace/exclusion.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%

Redundant escape inside regexp literal
Open

        pattern.to_s.sub(%r{(/\*\*)?(/\*)?$}, "").sub(/^\!/, "")
Severity: Minor
Found in lib/cc/workspace/exclusion.rb by rubocop

Checks for redundant escapes inside Regexp literals.

Example:

# bad
%r{foo\/bar}

# good
%r{foo/bar}

# good
/foo\/bar/

# good
%r/foo\/bar/

# good
%r!foo\!bar!

# bad
/a\-b/

# good
/a-b/

# bad
/[\+\-]\d/

# good
/[+\-]\d/

There are no issues that match your filters.

Category
Status