saltstack/salt

View on GitHub
salt/states/glassfish.py

Summary

Maintainability
F
2 wks
Test Coverage

File glassfish.py has 550 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
'''
Manage Glassfish/Payara server
.. versionadded:: Carbon

Severity: Major
Found in salt/states/glassfish.py - About 1 day to fix

    Function connection_factory_present has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring.
    Open

    def connection_factory_present(name,
                                   restype='connection_factory',
                                   description='',
                                   enabled=True,
                                   min_size=1,
    Severity: Minor
    Found in salt/states/glassfish.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function jdbc_datasource_present has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring.
    Open

    def jdbc_datasource_present(name,
                                description='',
                                enabled=True,
                                restype='datasource',
                                vendor='mysql',
    Severity: Minor
    Found in salt/states/glassfish.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function _do_element_present has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring.
    Open

    def _do_element_present(name, elem_type, data, server=None):
        '''
        Generic function to create or update an element
        '''
        ret = {'changes': {}, 'update': False, 'create': False, 'error': None}
    Severity: Minor
    Found in salt/states/glassfish.py - About 3 hrs to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function destination_present has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def destination_present(name,
                            physical,
                            restype='queue',
                            description='',
                            enabled=True,
    Severity: Minor
    Found in salt/states/glassfish.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function system_properties_present has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def system_properties_present(server=None, **kwargs):
        '''
        Ensures that the system properties are present
    
        properties
    Severity: Minor
    Found in salt/states/glassfish.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function system_properties_absent has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def system_properties_absent(name, server=None):
        '''
        Ensures that the system property doesn't exists
    
        name
    Severity: Minor
    Found in salt/states/glassfish.py - About 1 hr to fix

    Cognitive Complexity

    Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

    A method's cognitive complexity is based on a few simple rules:

    • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
    • Code is considered more complex for each "break in the linear flow of the code"
    • Code is considered more complex when "flow breaking structures are nested"

    Further reading

    Function jdbc_datasource_present has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def jdbc_datasource_present(name,
                                description='',
                                enabled=True,
                                restype='datasource',
                                vendor='mysql',
    Severity: Minor
    Found in salt/states/glassfish.py - About 1 hr to fix

      Function _do_element_absent has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      def _do_element_absent(name, elem_type, data, server=None):
          '''
          Generic function to delete an element
          '''
          ret = {'delete': False, 'error': None}
      Severity: Minor
      Found in salt/states/glassfish.py - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _is_updated has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def _is_updated(old_conf, new_conf):
          '''
          Compare the API results to the current statefile data
          '''
          changed = {}
      Severity: Minor
      Found in salt/states/glassfish.py - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _json_to_unicode has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
      Open

      def _json_to_unicode(data):
          '''
          Encode json values in unicode to match that of the API
          '''
          ret = {}
      Severity: Minor
      Found in salt/states/glassfish.py - About 55 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function connection_factory_absent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def connection_factory_absent(name, both=True, server=None):
          '''
          Ensures the transaction factory is absent.
      
          name
      Severity: Minor
      Found in salt/states/glassfish.py - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function jdbc_datasource_absent has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def jdbc_datasource_absent(name, both=True, server=None):
          '''
          Ensures the JDBC Datasource doesn't exists
      
          name
      Severity: Minor
      Found in salt/states/glassfish.py - About 35 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function destination_absent has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      def destination_absent(name, server=None):
          '''
          Ensures that the JMS Destination doesn't exists
      
          name
      Severity: Minor
      Found in salt/states/glassfish.py - About 25 mins to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

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

          if not pool_ret['error'] and not res_ret['error']:
              if not __opts__['test']:
                  ret['result'] = True
      
              if pool_ret['create'] or res_ret['create']:
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 3 days to fix
      salt/states/glassfish.py on lines 512..536

      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 331.

      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 not pool_ret['error'] and not res_ret['error']:
              if not __opts__['test']:
                  ret['result'] = True
      
              if pool_ret['create'] or res_ret['create']:
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 3 days to fix
      salt/states/glassfish.py on lines 234..258

      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 331.

      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 3 locations. Consider refactoring.
      Open

          if not pool_ret['error']:
              if __opts__['test'] and pool_ret['delete']:
                  ret['comment'] = 'Connection Factory set to be deleted'
              elif pool_ret['delete']:
                  ret['result'] = True
      Severity: Major
      Found in salt/states/glassfish.py and 2 other locations - About 1 day to fix
      salt/states/glassfish.py on lines 366..377
      salt/states/glassfish.py on lines 553..564

      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 137.

      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 3 locations. Consider refactoring.
      Open

          if not pool_ret['error']:
              if __opts__['test'] and pool_ret['delete']:
                  ret['comment'] = 'JDBC Datasource set to be deleted'
              elif pool_ret['delete']:
                  ret['result'] = True
      Severity: Major
      Found in salt/states/glassfish.py and 2 other locations - About 1 day to fix
      salt/states/glassfish.py on lines 277..288
      salt/states/glassfish.py on lines 366..377

      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 137.

      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 3 locations. Consider refactoring.
      Open

          if not jms_ret['error']:
              if __opts__['test'] and jms_ret['delete']:
                  ret['comment'] = 'JMS Queue set to be deleted'
              elif jms_ret['delete']:
                  ret['result'] = True
      Severity: Major
      Found in salt/states/glassfish.py and 2 other locations - About 1 day to fix
      salt/states/glassfish.py on lines 277..288
      salt/states/glassfish.py on lines 553..564

      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 137.

      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 transaction_support:
              if transaction_support == 'xa_transaction':
                  pool_data['transactionSupport'] = 'XATransaction'
              elif transaction_support == 'local_transaction':
                  pool_data['transactionSupport'] = 'LocalTransaction'
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 4 hrs to fix
      salt/states/glassfish.py on lines 198..207

      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 91.

      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 restype == 'topic_connection_factory':
              pool_data['connectionDefinitionName'] = 'javax.jms.TopicConnectionFactory'
          elif restype == 'queue_connection_factory':
              pool_data['connectionDefinitionName'] = 'javax.jms.QueueConnectionFactory'
          elif restype == 'connection_factory':
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 4 hrs to fix
      salt/states/glassfish.py on lines 218..228

      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 91.

      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 restype == 'datasource':
              pool_data['resType'] = 'javax.sql.DataSource'
          elif restype == 'xa_datasource':
              pool_data['resType'] = 'javax.sql.XADataSource'
          elif restype == 'connection_pool_datasource':
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 2 hrs to fix
      salt/modules/vsphere.py on lines 8653..8658

      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 65.

      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 not __opts__['test']:
                      try:
                          __salt__['glassfish.update_{0}'.format(elem_type)](name, server=server, **data)
                      except CommandExecutionError as error:
                          ret['error'] = error
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 2 hrs to fix
      salt/states/glassfish.py on lines 131..135

      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 59.

      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 not __opts__['test']:
                  try:
                      __salt__['glassfish.delete_{0}'.format(elem_type)](name, server=server, **data)
                  except CommandExecutionError as error:
                      ret['error'] = error
      Severity: Major
      Found in salt/states/glassfish.py and 1 other location - About 2 hrs to fix
      salt/states/glassfish.py on lines 106..110

      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 59.

      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

      There are no issues that match your filters.

      Category
      Status