saltstack/salt

View on GitHub
salt/modules/saltutil.py

Summary

Maintainability
F
1 wk
Test Coverage

File saltutil.py has 1374 lines of code (exceeds 250 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
'''
The Saltutil module is used to manage the state of the salt minion itself. It
is used to manage minion modules as well as automate updates to the salt
minion.
Severity: Major
Found in salt/modules/saltutil.py - About 3 days to fix

    Function signal_job has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring.
    Open

    def signal_job(jid, sig):
        '''
        Sends a signal to the named salt job's process
    
        CLI Example:
    Severity: Minor
    Found in salt/modules/saltutil.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 wheel has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
    Open

    def wheel(name, *args, **kwargs):
        '''
        Execute a wheel module and function. This function must be run against a
        minion that is local to the master.
    
    
    Severity: Minor
    Found in salt/modules/saltutil.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 runner has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
    Open

    def runner(name, arg=None, kwarg=None, full_return=False, saltenv='base', jid=None, asynchronous=False, **kwargs):
        '''
        Execute a runner function. This function must be run on the master,
        either by targeting a minion running on a master or by using
        salt-call on a master.
    Severity: Minor
    Found in salt/modules/saltutil.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 update has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def update(version=None):
        '''
        Update the salt minion from the URL defined in opts['update_url']
        SaltStack, Inc provides the latest builds here:
        update_url: https://repo.saltstack.com/windows/
    Severity: Minor
    Found in salt/modules/saltutil.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 find_cached_job has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
    Open

    def find_cached_job(jid):
        '''
        Return the data for a specific cached job id. Note this only works if
        cache_jobs has previously been set to True on the minion.
    
    
    Severity: Minor
    Found in salt/modules/saltutil.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 clear_job_cache has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def clear_job_cache(hours=24):
        '''
        Forcibly removes job cache folders and files on a minion.
    
        .. versionadded:: 2018.3.0
    Severity: Minor
    Found in salt/modules/saltutil.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 clear_cache has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
    Open

    def clear_cache(days=-1):
        '''
        Forcibly removes all caches on a minion.
    
        .. versionadded:: 2014.7.0
    Severity: Minor
    Found in salt/modules/saltutil.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 _exec has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def _exec(client, tgt, fun, arg, timeout, tgt_type, ret, kwarg, **kwargs):
        fcn_ret = {}
        seen = 0
        if 'batch' in kwargs:
            _cmd = client.cmd_batch
    Severity: Minor
    Found in salt/modules/saltutil.py - About 45 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 cmd has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
    Open

    def cmd(tgt,
            fun,
            arg=(),
            timeout=None,
            tgt_type='glob',
    Severity: Minor
    Found in salt/modules/saltutil.py - About 45 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 revoke_auth has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def revoke_auth(preserve_minion_cache=False):
        '''
        The minion sends a request to the master to revoke its own key.
        Note that the minion session will be revoked and the minion may
        not be able to return the result of this command back to the master.
    Severity: Minor
    Found in salt/modules/saltutil.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 _sync has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def _sync(form, saltenv=None, extmod_whitelist=None, extmod_blacklist=None):
        '''
        Sync the given directory in the given environment
        '''
        if saltenv is None:
    Severity: Minor
    Found in salt/modules/saltutil.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 _get_top_file_envs has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
    Open

    def _get_top_file_envs():
        '''
        Get all environments from the top file
        '''
        try:
    Severity: Minor
    Found in salt/modules/saltutil.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

    Avoid too many return statements within this function.
    Open

            return ret
    Severity: Major
    Found in salt/modules/saltutil.py - About 30 mins to fix

      Avoid too many return statements within this function.
      Open

              return ret
      Severity: Major
      Found in salt/modules/saltutil.py - About 30 mins to fix

        Avoid too many return statements within this function.
        Open

            return ret
        Severity: Major
        Found in salt/modules/saltutil.py - About 30 mins to fix

          Avoid too many return statements within this function.
          Open

                  return ret
          Severity: Major
          Found in salt/modules/saltutil.py - About 30 mins to fix

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

            def list_extmods():
                '''
                .. versionadded:: 2017.7.0
            
                List Salt modules which have been synced externally
            Severity: Minor
            Found in salt/modules/saltutil.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

                for root, dirs, files in salt.utils.files.safe_walk(__opts__['cachedir'], followlinks=False):
                    for name in files:
                        try:
                            file = os.path.join(root, name)
                            mtime = os.path.getmtime(file)
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 3 hrs to fix
            salt/modules/saltutil.py on lines 1222..1232

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

            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

                for root, dirs, files in salt.utils.files.safe_walk(os.path.join(__opts__['cachedir'], 'minion_jobs'),
                                                              followlinks=False):
                    for name in dirs:
                        try:
                            directory = os.path.join(root, name)
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 3 hrs to fix
            salt/modules/saltutil.py on lines 1190..1202

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

            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 name in wheel_client.functions:
                        aspec = salt.utils.args.get_function_argspec(
                            wheel_client.functions[name]
                        )
                        if 'saltenv' in aspec.args:
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 2 hrs to fix
            salt/modules/saltutil.py on lines 1671..1674

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

            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 name in rclient.functions:
                    aspec = salt.utils.args.get_function_argspec(rclient.functions[name])
                    if 'saltenv' in aspec.args:
                        kwarg['saltenv'] = saltenv
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 2 hrs to fix
            salt/modules/saltutil.py on lines 1761..1766

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

            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

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

                if 'master_uri_list' in __opts__:
                    for master_uri in __opts__['master_uri_list']:
                        masters.append(master_uri)
                else:
                    masters.append(__opts__['master_uri'])
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 1 hr to fix
            salt/modules/event.py on lines 59..63

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

            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 __opts__['__role'] == 'minion':
                    master_config = os.path.join(os.path.dirname(__opts__['conf_file']),
                                                 'master')
                    master_opts = salt.config.client_config(master_config)
                    wheel_client = salt.wheel.WheelClient(master_opts)
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 1 hr to fix
            salt/modules/saltutil.py on lines 1663..1667

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

            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 'master_job_cache' not in __opts__:
                    master_config = os.path.join(os.path.dirname(__opts__['conf_file']),
                                                 'master')
                    master_opts = salt.config.master_config(master_config)
                    rclient = salt.runner.RunnerClient(master_opts)
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 1 hr to fix
            salt/modules/saltutil.py on lines 1742..1746

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

            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 refresh_beacons():
                '''
                Signal the minion to refresh the beacons.
            
                CLI Example:
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 1 hr to fix
            salt/modules/saltutil.py on lines 1055..1070

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

            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 refresh_matchers():
                '''
                Signal the minion to refresh its matchers.
            
                CLI Example:
            Severity: Major
            Found in salt/modules/saltutil.py and 1 other location - About 1 hr to fix
            salt/modules/saltutil.py on lines 1037..1052

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

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

            def sync_beacons(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2015.5.1
            
                Sync beacons from ``salt://_beacons`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_log_handlers(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2015.8.0
            
                Sync log handlers from ``salt://_log_handlers`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_states(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 0.10.0
            
                Sync state modules from ``salt://_states`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_proxymodules(saltenv=None, refresh=False, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2015.8.2
            
                Sync proxy modules from ``salt://_proxy`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_thorium(saltenv=None, refresh=False, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2018.3.0
            
                Sync Thorium modules from ``salt://_thorium`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_output(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                Sync outputters from ``salt://_output`` to the minion
            
                saltenv
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_clouds(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2017.7.0
            
                Sync cloud modules from ``salt://_cloud`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_executors(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2019.2.1
            
                Sync executors from ``salt://_executors`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880

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

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

            def sync_returners(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 0.10.0
            
                Sync returners from ``salt://_returners`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_engines(saltenv=None, refresh=False, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2016.3.0
            
                Sync engine modules from ``salt://_engines`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_modules(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 0.10.0
            
                Sync execution modules from ``salt://_modules`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_matchers(saltenv=None, refresh=False, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2019.2.0
            
                Sync engine modules from ``salt://_matchers`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_serializers(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2019.2.0
            
                Sync serializers from ``salt://_serializers`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_utils(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 2014.7.0
            
                Sync utility modules from ``salt://_utils`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 436..473
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

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

            def sync_renderers(saltenv=None, refresh=True, extmod_whitelist=None, extmod_blacklist=None):
                '''
                .. versionadded:: 0.10.0
            
                Sync renderers from ``salt://_renderers`` to the minion
            Severity: Major
            Found in salt/modules/saltutil.py and 14 other locations - About 35 mins to fix
            salt/modules/saltutil.py on lines 192..228
            salt/modules/saltutil.py on lines 267..320
            salt/modules/saltutil.py on lines 323..359
            salt/modules/saltutil.py on lines 476..511
            salt/modules/saltutil.py on lines 514..550
            salt/modules/saltutil.py on lines 553..588
            salt/modules/saltutil.py on lines 591..626
            salt/modules/saltutil.py on lines 629..664
            salt/modules/saltutil.py on lines 667..701
            salt/modules/saltutil.py on lines 707..739
            salt/modules/saltutil.py on lines 742..778
            salt/modules/saltutil.py on lines 781..817
            salt/modules/saltutil.py on lines 844..880
            salt/modules/saltutil.py on lines 924..960

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

            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