rocketsofawesome/newgistics-ruby

View on GitHub
lib/newgistics/string_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage

Avoid the use of Perl-style backrefs.
Open

        s.gsub!(CAMEL_CASED_STRING_REGEX) { "#{$1}_#{$2}" }
Severity: Minor
Found in lib/newgistics/string_helper.rb by rubocop

This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.

Example:

# bad
puts $1

# good
puts Regexp.last_match(1)

Avoid the use of Perl-style backrefs.
Open

        s.gsub!(UNDERSCORED_STRING_REGEX) { $1.capitalize! || $1 }
Severity: Minor
Found in lib/newgistics/string_helper.rb by rubocop

This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.

Example:

# bad
puts $1

# good
puts Regexp.last_match(1)

Avoid the use of Perl-style backrefs.
Open

        s.gsub!(UNDERSCORED_STRING_REGEX) { $1.capitalize! || $1 }
Severity: Minor
Found in lib/newgistics/string_helper.rb by rubocop

This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.

Example:

# bad
puts $1

# good
puts Regexp.last_match(1)

Avoid the use of Perl-style backrefs.
Open

        s.gsub!(CAMEL_CASED_STRING_REGEX) { "#{$1}_#{$2}" }
Severity: Minor
Found in lib/newgistics/string_helper.rb by rubocop

This cop looks for uses of Perl-style regexp match backreferences like $1, $2, etc.

Example:

# bad
puts $1

# good
puts Regexp.last_match(1)

There are no issues that match your filters.

Category
Status