sonntagsgesicht/auxilium

View on GitHub

Showing 42 of 105 total issues

Function coverage has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def coverage(pkg=basename(getcwd()), test_dir=TEST_PATH,
Severity: Minor
Found in auxilium/tools/coverage_tools.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if lines:
                            new_lines = new_header + ['', ''] + lines
                        else:
                            new_lines = new_header
    
    
    Severity: Major
    Found in auxilium/tools/docmaintain_tools.py - About 45 mins to fix

      Function coverage_coverage has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def coverage_coverage(pkg=basename(getcwd()), test_dir=TEST_PATH,
      Severity: Minor
      Found in auxilium/tools/coverage_tools.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                            if removed and removed[0].startswith('#!'):
                                new_header[0] = removed[0]
        
                            # add new header
                            if lines:
        Severity: Major
        Found in auxilium/tools/docmaintain_tools.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if last.get(file, '') == str(getmtime(file)):
                                  this[file] = str(getmtime(file))
                                  log(LEVEL-1,
                                      ICONS[""] +
                                      "no file header update required for %s" % file)
          Severity: Major
          Found in auxilium/tools/docmaintain_tools.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                while lines and \
                                        (lines[0].strip() == '' or
                                         lines[0].startswith('#')):
                                    removed.append(lines.pop(0).strip())
            
            
            Severity: Major
            Found in auxilium/tools/docmaintain_tools.py - About 45 mins to fix

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

              def do(pkg=basename(getcwd()), commit=None, tag=None, header=None,
                     push=None, remote=None, remote_usr=None, remote_pwd=None,
                     deploy=None, pypi_usr=None, pypi_pwd=None, archive=None, cleanup=None,
                     path=None, env=None, **kwargs):
                  """run deploy process"""
              Severity: Minor
              Found in auxilium/methods/build.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

              Avoid deeply nested control flow statements.
              Open

                                  if new_lines[-1].strip():
                                      f.write(linesep)  # last empty line
                                  f.close()
              Severity: Major
              Found in auxilium/tools/docmaintain_tools.py - About 45 mins to fix

                Consider simplifying this complex logical expression.
                Open

                    if venv:
                        # clear virtual environment folder
                        del_tree(venv)
                        # create virtual environment
                        env = create_venv(pkg, venv_path=venv, path=project_path, venv=env)
                Severity: Major
                Found in auxilium/methods/create.py - About 40 mins to fix

                  Function coverage_test has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  def coverage_test(test_dir=TEST_PATH,
                  Severity: Minor
                  Found in auxilium/tools/coverage_tools.py - About 35 mins to fix

                    Function coverage_pytest has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    def coverage_pytest(test_dir=TEST_PATH,
                    Severity: Minor
                    Found in auxilium/tools/coverage_tools.py - About 35 mins to fix

                      Function python has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      def python(command, level=LEVEL, path=getcwd(), venv=None,
                      Severity: Minor
                      Found in auxilium/tools/system_tools.py - About 35 mins to fix

                        Function start_demo has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        def start_demo(demo=DEMO_PATH, verbosity=0, exit_status=0, env=None, **kwargs):
                        Severity: Minor
                        Found in auxilium/methods/root.py - About 35 mins to fix

                          Function tag_git has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def tag_git(tag, msg='few', level=LEVEL, path=getcwd(), venv=None):
                          Severity: Minor
                          Found in auxilium/tools/dulwich_tools.py - About 35 mins to fix

                            Function script has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def script(cmd, imports=(), level=LEVEL, path=getcwd(), venv=None):
                            Severity: Minor
                            Found in auxilium/tools/system_tools.py - About 35 mins to fix

                              Function shell has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def shell(command, level=LEVEL, path=getcwd(), venv=None,
                              Severity: Minor
                              Found in auxilium/tools/system_tools.py - About 35 mins to fix

                                Function module has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                def module(mdl, command='', level=LEVEL, path=getcwd(), venv=None):
                                Severity: Minor
                                Found in auxilium/tools/system_tools.py - About 35 mins to fix

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

                                  def del_tree(*paths, level=LEVEL):
                                      for f in paths:
                                          if exists(f):
                                              if isdir(f):
                                                  log(level, 'remove tree below %s' % f)
                                  Severity: Minor
                                  Found in auxilium/tools/system_tools.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 failure_exit(exit_status, command)
                                  Severity: Major
                                  Found in auxilium/methods/root.py - About 30 mins to fix

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

                                    def archive(name=basename(getcwd()), path=getcwd(), venv=None):
                                        """ archive project in zip file to '..' """
                                        log(INFO, ICONS["archive"] + 'archive project in zip file ')
                                        raise NotImplementedError()
                                        with ZipFile(join(path, '..', name + '.zip'), 'w') as z:
                                    Severity: Minor
                                    Found in auxilium/tools/archive_tools.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

                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language