rosa-abf/rosa-build

View on GitHub
lib/ext/core/string.rb

Summary

Maintainability
A
2 hrs
Test Coverage

Showing 2 of 2 total issues

Method default_encoding! has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

def default_encoding!
default_encoding = Encoding.default_internal || Encoding::UTF_8
if ascii_only? # no need to encode if ascii
force_encoding(default_encoding)
else # should encode
Severity: Minor
Found in lib/ext/core/string.rb - About 1 hr to fix

Method rtruncate has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
Open

def rtruncate(length, options = {})
chars = self.dup.mb_chars
return self if chars.length <= length
options[:omission] ||= "..."
options[:separator] ||= '/'
Severity: Minor
Found in lib/ext/core/string.rb - About 25 mins to fix

There are no issues that match your filters.

Category
Status