Brunomm/br_boleto

View on GitHub

Showing 37 of 92 total issues

Identical blocks of code found in 2 locations. Consider refactoring.
Open

                    def informacoes_da_conta
                        informacoes =  "#{conta.agencia}".adjust_size_to(5, '0', :right)
                        informacoes << "#{conta.agencia_dv}"
                        informacoes << "#{conta.conta_corrente}".adjust_size_to(12, '0', :right)
                        informacoes << "#{conta.conta_corrente_dv}".adjust_size_to(2)
Severity: Minor
Found in lib/br_boleto/remessa/cnab240/cecred.rb and 1 other location - About 35 mins to fix
lib/br_boleto/remessa/cnab240/banco_brasil.rb on lines 47..52

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 36.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        if (conta.conta_corrente_dv.to_s).size == 2                            # Para os Bancos que se utilizam de duas posições para o Dígito Verificador do Número da Conta Corrente.
                            informacoes << "#{(conta.conta_corrente_dv.to_s)[0]}"               # Preencher este campo com a 1a posição deste dígito.
                            informacoes << "#{(conta.conta_corrente_dv.to_s)[1]}"               # Preencher este campo com a 2a posição deste dígito.
                        else
                            informacoes << "#{conta.conta_corrente_dv}".adjust_size_to(2)       # Caso contrário ajustar o conta_corrente_dv para 2 digitos adicionando espaço em branco no final
Severity: Minor
Found in lib/br_boleto/remessa/cnab240/bradesco.rb and 1 other location - About 35 mins to fix
lib/br_boleto/remessa/cnab240/bradesco.rb on lines 77..81

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        if (conta.conta_corrente_dv.to_s).size == 2                             # Para os Bancos que se utilizam de duas posições para o Dígito Verificador do Número da Conta Corrente.
                            complemento << "#{(conta.conta_corrente_dv.to_s)[0]}"                # Preencher este campo com a 1a posição deste dígito.
                            complemento << "#{(conta.conta_corrente_dv.to_s)[1]}"                # Preencher este campo com a 2a posição deste dígito.
                        else
                            complemento << "#{conta.conta_corrente_dv}".adjust_size_to(2)        # Caso contrário ajustar o conta_corrente_dv para 2 digitos adicionando espaço em branco no final
Severity: Minor
Found in lib/br_boleto/remessa/cnab240/bradesco.rb and 1 other location - About 35 mins to fix
lib/br_boleto/remessa/cnab240/bradesco.rb on lines 41..45

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 34.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            def carteiras_suportadas
                %w[104 105 107 108 109 112 113 116 117 119 121 122 126 131 134 135 136 142 143 146 147 150 168 169 174 175 180 191 196 198]
Severity: Minor
Found in lib/br_boleto/conta/itau.rb and 1 other location - About 30 mins to fix
lib/br_boleto/boleto/itau.rb on lines 20..21

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_especie_titulo_400
                    super.merge(
                        #  Padrão    Código para  
                        {# da GEM     o Banco
                            '02'    =>   '01' , # DUPLICATA MERCANTIL
Severity: Minor
Found in lib/br_boleto/conta/itau.rb and 1 other location - About 30 mins to fix
lib/br_boleto/conta/itau.rb on lines 114..131

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def valid_carteira_inclusion
                    %w[104 105 107 108 109 112 113 116 117 119 121 122 126 131 134 135 136 142 143 146 147 150 168 169 174 175 180 191 196 198]
Severity: Minor
Found in lib/br_boleto/boleto/itau.rb and 1 other location - About 30 mins to fix
lib/br_boleto/conta/itau.rb on lines 94..95

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_especie_titulo_240
                    super.merge(
                        #  Padrão    Código para  
                        {# da GEM     o Banco
                            '02'    =>   '01' , # DUPLICATA MERCANTIL
Severity: Minor
Found in lib/br_boleto/conta/itau.rb and 1 other location - About 30 mins to fix
lib/br_boleto/conta/itau.rb on lines 134..151

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 33.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_codigo_moeda_240
                    {
                        '01'  => '01', # Reservado para Uso Futuro
                        '02'  => '02', # Dólar Americano Comercial (Venda)
                        '03'  => '03', # Dólar Americano Turismo (Venda)
Severity: Minor
Found in lib/br_boleto/helper/default_codes.rb and 1 other location - About 25 mins to fix
lib/br_boleto/conta/banco_brasil.rb on lines 138..154

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 31.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_especie_titulo_400
                    #  Padrão    Código para  
                    {# da GEM     o Banco
                        '01'    =>   '10' , #  Cheque
                        '02'    =>   '01' , #  Duplicata Mercantil
Severity: Minor
Found in lib/br_boleto/conta/banco_brasil.rb and 1 other location - About 25 mins to fix
lib/br_boleto/helper/default_codes.rb on lines 480..495

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 31.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                    {# da GEM     o Banco
                        '01'     =>    '01' ,       # Entrada de título
                        '02'     =>    '02' ,       # Pedido de baixa
                        '04'     =>    '04' ,       # Concessão de abatimento
                        '05'     =>    '05' ,       # Cancelamento de abatimento
Severity: Minor
Found in lib/br_boleto/conta/santander.rb and 1 other location - About 20 mins to fix
lib/br_boleto/conta/sicredi.rb on lines 161..174

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_codigo_movimento_retorno_400
                    super.merge(
                        #  Padrão    Código para  
                        {# do Banco    a GEM
                            '07'   =>   '102',  # LIQUIDAÇÃO PARCIAL – COBRANÇA INTELIGENTE (B2B)
Severity: Minor
Found in lib/br_boleto/conta/itau.rb and 1 other location - About 20 mins to fix
lib/br_boleto/conta/santander.rb on lines 217..231

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_codigo_movimento_retorno_400
                    super.merge(
                        #  Padrão    Código para  
                        {# do Banco    a GEM
                            '01'   =>  '104',  # título não existe
Severity: Minor
Found in lib/br_boleto/conta/santander.rb and 1 other location - About 20 mins to fix
lib/br_boleto/conta/itau.rb on lines 272..286

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        info << "#{pagamento.pagador.nome_avalista}".adjust_size_to(25)      # Sacador/Avalista (Nome)
                        info << ''.adjust_size_to(1)                                         # Complemento Registro (Branco)
                        info << "CPF"                                                        # CPF
                        info << "#{pagamento.pagador.documento_avalista}".adjust_size_to(11) # Sacador/Avalista (CPF)
Severity: Minor
Found in lib/br_boleto/remessa/cnab400/banco_brasil.rb and 1 other location - About 20 mins to fix
lib/br_boleto/remessa/cnab400/banco_brasil.rb on lines 248..251

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        info << "#{pagamento.pagador.nome_avalista}".adjust_size_to(21)      # Sacador/Avalista (Nome)
                        info << ''.adjust_size_to(1)                                         # Complemento Registro (Branco)
                        info << "CNPJ"                                                       # CNPJ
                        info << "#{pagamento.pagador.documento_avalista}".adjust_size_to(14) # Sacador/Avalista (CNPJ)
Severity: Minor
Found in lib/br_boleto/remessa/cnab400/banco_brasil.rb and 1 other location - About 20 mins to fix
lib/br_boleto/remessa/cnab400/banco_brasil.rb on lines 253..256

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                        {# da GEM     o Banco
                            '01'    =>   'A',
                            '02'    =>   'A',
                            '03'    =>   'A',  # Duplicata Mercantil por Indicação (DMI)
                            '06'    =>   'B',  # Duplicata Rural (DR)
Severity: Minor
Found in lib/br_boleto/conta/sicredi.rb and 1 other location - About 20 mins to fix
lib/br_boleto/conta/santander.rb on lines 133..146

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 27.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_codigo_movimento_retorno_400
                    super.merge(
                        #  Padrão    Código para  
                        {# do Banco    a GEM
                            '15'   =>   '101',  # Liquidação em Cartório (sem motivo)
Severity: Minor
Found in lib/br_boleto/conta/bradesco.rb and 1 other location - About 15 mins to fix
lib/br_boleto/conta/caixa.rb on lines 186..199

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

                def equivalent_codigo_motivo_ocorrencia_B_240 codigo_movimento_gem
                    super.merge(
                    #  Padrão    Código para  
                    {# do Banco    a GEM
                        '12'     =>   'B21', # Redisponibilização de Arquivo Retorno Eletrônico
Severity: Minor
Found in lib/br_boleto/conta/caixa.rb and 1 other location - About 15 mins to fix
lib/br_boleto/conta/bradesco.rb on lines 127..140

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 25.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Severity
Category
Status
Source
Language