aureooms/sak

View on GitHub

Showing 271 of 350 total issues

Function CheckSectionSpacing has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error):
    """Checks for additional blank line issues related to sections.

    Currently the only thing checked here is blank line before protected/private.

Severity: Minor
Found in lib/cpplint.py - About 2 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 ProcessFile has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

def ProcessFile(filename, vlevel, extra_check_functions=[]):
    """Does google-lint on a single file.

    Args:
            filename: The name of the file to parse.
Severity: Minor
Found in lib/cpplint.py - About 2 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

Consider simplifying this complex logical expression.
Open

    if explicit_constructor_match:
        is_marked_explicit = explicit_constructor_match.group(1)

        if not explicit_constructor_match.group(2):
            constructor_args = []
Severity: Critical
Found in lib/cpplint.py - About 2 hrs to fix

    Function issues has 16 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def issues(owner=None, repo=None, number=None, user=False, org=None, token=None, milestone=None, filter=None, state=None, creator=None, assignee=None, mentioned=None, labels=None, sort=None, direction=None, since=None):
    Severity: Major
    Found in sak/github.py - About 2 hrs to fix

      Function UpdatePreprocessor has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
      Open

          def UpdatePreprocessor(self, line):
              """Update preprocessor stack.
      
              We need to handle preprocessors due to classes like this:
                      #ifdef SWIG
      Severity: Minor
      Found in lib/cpplint.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 _ShouldPrintError has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      def _ShouldPrintError(category, confidence, linenum):
          """If confidence >= verbose, category passes filter and is not suppressed."""
      
          # There are three ways we might decide not to print an error message:
          # a "NOLINT(category)" comment appears in the source,
      Severity: Minor
      Found in lib/cpplint.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 depforeach has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      def depforeach(action, pred, *args, **kwargs):
      
          with lib.cpm.package() as p:
              for dep in DEPENDENCIES:
                  for name, package in p[dep].items():
      Severity: Minor
      Found in lib/cpm.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 args has 14 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def args(name, subject, keywords, username, org, slugprefix='', fullnameprefix='@{scope}/', subjectsuffix=' for JavaScript', license_template="agpl-3.0", version='0.0.0', emoji=None, scope=None, author=None, packageType='commonjs'):
      Severity: Major
      Found in lib/js.py - About 1 hr to fix

        Function InTemplateArgumentList has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
        Open

            def InTemplateArgumentList(self, clean_lines, linenum, pos):
                """Check if current position is inside template argument list.
        
                Args:
                        clean_lines: A CleansedLines instance containing the file.
        Severity: Minor
        Found in lib/cpplint.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 new has 13 arguments (exceeds 4 allowed). Consider refactoring.
        Open

        def new(name, org=None, team_id=None, token=None, auto_init=FALSE, private=FALSE, description=None, homepage=None, has_issues=TRUE, has_wiki=TRUE, has_downloads=TRUE, gitignore_template=None, license_template=None):
        Severity: Major
        Found in sak/github.py - About 1 hr to fix

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

          def mostlikely(target, stringset):
              """
          
                      Determines which strings out of stringset are most likely to be
                      targeted by the target string.
          Severity: Minor
          Found in lib/str.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 deprecated_fromjs has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring.
          Open

          def deprecated_fromjs(oldrepo, name, subject, keywords=None, username=None, token=None, **rest):
          
              fork(oldrepo, name, subject, keywords=keywords, username=username, token=token, **rest)
          
              license, slug, description, github_description, repository, homepage, keywords, fmtargs = lib.js.args(name,subject,keywords,username, **rest)
          Severity: Minor
          Found in sak/js.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 issues has 12 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          def issues(owner=None, repo=None, number=None, user=False, org=None, token=None, filter=None, state=None, labels=None, sort=None, direction=None, since=None):
          Severity: Major
          Found in lib/github.py - About 1 hr to fix

            Function new has 12 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            def new(repository, owner=None, username=None, password=None, is_private=TRUE, scm=GIT, fork_policy=NO_PUBLIC_FORKS, name=None, description=None, language=None, has_issues=FALSE, has_wiki=FALSE):
            Severity: Major
            Found in sak/bitbucket.py - About 1 hr to fix

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

              def convert(handle=lib.error.throws(Exception), **convertors):
                  """
              
                          >>> from lib.args import *
              
              
              Severity: Minor
              Found in lib/args.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 RepositoryName has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

                  def RepositoryName(self):
                      """FullName after removing the local path to the repository.
              
                      If we have a real absolute path name here we can try to do something smart:
                      detecting the root of the checkout and truncating /path/to/checkout from
              Severity: Minor
              Found in lib/cpplint.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 submit has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

              def submit(name, cmd, nodes=None, cpu=None, output=None, error=None, walltime=None, memory=None, redirect=False):
                  """
                          qsub python wrapper
                  """
              
              
              Severity: Minor
              Found in lib/queue.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 IsInitializerList has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

              def IsInitializerList(clean_lines, linenum):
                  """Check if current line is inside constructor initializer list.
              
                  Args:
                          clean_lines: A CleansedLines instance containing the file.
              Severity: Minor
              Found in lib/cpplint.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 __init__ has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
              Open

              def __init__():
                  import os
                  root = os.path.dirname(os.path.abspath(__file__))
                  module = os.path.basename(root)
              
              
              Severity: Minor
              Found in lib/__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

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

              def CheckBracesSpacing(filename, clean_lines, linenum, error):
                  """Checks for horizontal spacing near commas.
              
                  Args:
                          filename: The name of the current file.
              Severity: Minor
              Found in lib/cpplint.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

              Severity
              Category
              Status
              Source
              Language