Showing 9 of 9 total issues
Method to_i
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def to_i(str) str = str.to_s.tr(NUM_ALT_CHARS, NUM_NORMALIZED_CHARS) str.gsub!(/[,,、[:space:]]/, '') matched = REGEXP.match(str) or return 0 ret3 = 0
- Read upRead up
Method to_i
has 53 lines of code (exceeds 25 allowed). Consider refactoring. Open
def to_i(str) str = str.to_s.tr(NUM_ALT_CHARS, NUM_NORMALIZED_CHARS) str.gsub!(/[,,、[:space:]]/, '') matched = REGEXP.match(str) or return 0 ret3 = 0
Method call
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def call(num, _options = {}) return '零' if num.zero? ret = '' (UNIT_EXP4.reverse + ['']).each_with_index do |unit4, ridx4|
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
module Formatter # Formatter for Jpanese judicial style kansuji (arabic numerals version) module JudicH module_function
- Read upRead up
Similar blocks of code found in 2 locations. Consider refactoring. Open
module Formatter # Formatter for Jpanese judicial style kansuji (kanji numerals version) module JudicV module_function
- Read upRead up
Method call
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def call(num, _options = {}) return '0' if num.zero? ret = '' (UNIT_EXP4.reverse + ['']).each_with_index do |unit4, ridx4|
- Read upRead up
Method call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def call(num, _options = {}) return '0' if num.zero? parts = [] (UNIT_EXP4.reverse + ['']).each_with_index do |unit4, ridx4|
- Read upRead up
Method call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def call(num, _options = {}) return '〇' if num.zero? ret = '' head = true
- Read upRead up
Method call
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def call(num, _options = {}) return '0' if num.zero? ret = '' head = true
- Read upRead up