sonntagsgesicht/auxilium

View on GitHub

Showing 105 of 105 total issues

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

if pkg.__theme__ and pkg.__theme__.replace('-', '_') not in extensions:
    extensions.append(pkg.__theme__.replace('-', '_'))
Severity: Major
Found in pkg/doc/sphinx/conf.py and 1 other location - About 1 hr to fix
doc/sphinx/conf.py on lines 49..50

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

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 pkg.__theme__ and pkg.__theme__.replace('-', '_') not in extensions:
    extensions.append(pkg.__theme__.replace('-', '_'))
Severity: Major
Found in doc/sphinx/conf.py and 1 other location - About 1 hr to fix
pkg/doc/sphinx/conf.py on lines 48..49

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

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

Function do has 11 arguments (exceeds 4 allowed). Consider refactoring.
Open

def do(pkg=basename(getcwd()), testpath=None, commit=None, fail_fast=None,
Severity: Major
Found in auxilium/methods/test.py - About 1 hr to fix

    Function auxilium has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def auxilium(args=None):
        # init config and argument parser
        config = ConfigParser(allow_no_value=True)
        config.read(Path.home().joinpath(CONFIG_PATH))
        config.read(join(getcwd(), CONFIG_PATH))
    Severity: Minor
    Found in auxilium/__init__.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

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

        parser.add_argument(
            '--push',
            metavar='BRANCH',
            nargs='?',
            const=config.getboolean('build', 'tag', fallback='master'),
    Severity: Major
    Found in auxilium/add_arguments/build.py and 1 other location - About 1 hr to fix
    auxilium/add_arguments/update.py on lines 61..66

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

        parser.add_argument(
            '--pull',
            nargs='?',
            metavar='BRANCH',
            const=config.get('update', 'pull', fallback='master'),
    Severity: Major
    Found in auxilium/add_arguments/update.py and 1 other location - About 1 hr to fix
    auxilium/add_arguments/build.py on lines 44..49

    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

    Function do has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    def do(pkg=basename(getcwd()), commit=None, fail_fast=None, pdf=None,
           api=None, doctest=None, show=None, cleanup=None, coverage=None,
           path=None, env=None, **kwargs):
        if cleanup:
            return _cleanup(venv=env)
    Severity: Minor
    Found in auxilium/methods/doc.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 do has 9 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def do(command=None, demo=None, verbosity=None, exit_status=None, env=None,
    Severity: Major
    Found in auxilium/methods/root.py - About 1 hr to fix

      Function create_project has 28 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def create_project(name=None, slogan=None, author=None, email=None, url=None,
                         pkg_zip_file=PKG_ZIP_FILE, path=getcwd()):
          """create a new project"""
      
          log(INFO, '')
      Severity: Minor
      Found in auxilium/tools/setup_tools.py - About 1 hr to fix

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

        def do(pkg=basename(getcwd()), testpath=None, commit=None, fail_fast=None,
               quality=None, security=None, coverage=None, cleanup=None,
               path=None, env=None, **kwargs):
            """run test process"""
        
        
        Severity: Minor
        Found in auxilium/methods/test.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 do has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
        Open

        def do(pkg=basename(getcwd()), header=None, status=None, commit=None,
               pull=None, remote=None, remote_usr=None, remote_pwd=None,
               install=None, upgrade=None, requirements=None, cleanup=None,
               path=getcwd(), env=None, **kwargs):
            if cleanup:
        Severity: Minor
        Found in auxilium/methods/update.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

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

        def quality_pylint(pkg=basename(getcwd()), path=getcwd(), venv=None):
            """evaluate quality of source code with pylint"""
            return module('pylint', pkg, path=path, venv=venv)
        Severity: Major
        Found in auxilium/tools/quality_tools.py and 1 other location - About 1 hr to fix
        auxilium/tools/quality_tools.py on lines 32..34

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

        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 quality_flake8(pkg=basename(getcwd()), path=getcwd(), venv=None):
            """evaluate quality of source code with flake8"""
            return module('flake8', pkg, path=path, venv=venv)
        Severity: Major
        Found in auxilium/tools/quality_tools.py and 1 other location - About 1 hr to fix
        auxilium/tools/quality_tools.py on lines 27..29

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

        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

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

        def start_demo(demo=DEMO_PATH, verbosity=0, exit_status=0, env=None, **kwargs):
            logging.log(logging.INFO, ICONS["demo"] + 'relax, just starting a demo')
            if exists(demo):
                yn = input(" " + ICONS["warn"] +
                           "demo path exists. "
        Severity: Minor
        Found in auxilium/methods/root.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

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

            if pull:
                remote = build_url(remote, remote_usr, remote_pwd)
                code = code or pull_git(
        Severity: Minor
        Found in auxilium/methods/update.py and 1 other location - About 55 mins to fix
        auxilium/methods/build.py on lines 45..47

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

        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 push:
                remote = build_url(remote, remote_usr, remote_pwd)
                code = code or push_git(remote=remote, branch=push, path=path)
        Severity: Minor
        Found in auxilium/methods/build.py and 1 other location - About 55 mins to fix
        auxilium/methods/update.py on lines 41..43

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

        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

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

        def do(command=None, demo=None, verbosity=None, exit_status=None, env=None,
               pre=None, pkg=None, path=None, **kwargs):
            exit = int if exit_status < 0 else sys.exit
            # check demo
            if demo:
        Severity: Minor
        Found in auxilium/methods/root.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 create_project has 7 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def create_project(name=None, slogan=None, author=None, email=None, url=None,
        Severity: Major
        Found in auxilium/tools/setup_tools.py - About 50 mins to fix

          Function do has 7 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def do(c='', m='', f='', stdin='', arg=(), env=None, **kwargs):
          Severity: Major
          Found in auxilium/methods/python.py - About 50 mins to fix

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

                    if not exists(join(project_path, GIT_PATH)):
                        code = code or init_git(path=project_path, venv=env)
            Severity: Minor
            Found in auxilium/methods/create.py and 1 other location - About 50 mins to fix
            auxilium/methods/update.py on lines 34..35

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 36.

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

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

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

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

            Refactorings

            Further Reading

            Severity
            Category
            Status
            Source
            Language