aureooms/sak

View on GitHub

Showing 350 of 350 total issues

File cpplint.py has 4007 lines of code (exceeds 250 allowed). Consider refactoring.
Open

#
# Copyright (c) 2009 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
Severity: Major
Found in lib/cpplint.py - About 1 wk to fix

    Function FindEndOfExpressionInLine has a Cognitive Complexity of 64 (exceeds 5 allowed). Consider refactoring.
    Open

    def FindEndOfExpressionInLine(line, startpos, stack):
        """Find the position just after the end of current parenthesized expression.
    
        Args:
                line: a CleansedLines line.
    Severity: Minor
    Found in lib/cpplint.py - About 1 day 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 63 (exceeds 5 allowed). Consider refactoring.
    Open

        def Update(self, filename, clean_lines, linenum, error):
            """Update nesting state with current line.
    
            Args:
                    filename: The name of the current file.
    Severity: Minor
    Found in lib/cpplint.py - About 1 day 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 CheckLanguage has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckLanguage(filename, clean_lines, linenum, file_extension,
                      include_state, nesting_state, error):
        """Checks rules from the 'C++ language rules' section of cppguide.html.
    
        Some of these rules are hard to test (function overloading, using
    Severity: Minor
    Found in lib/cpplint.py - About 1 day 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 IsRValueType has a Cognitive Complexity of 54 (exceeds 5 allowed). Consider refactoring.
    Open

    def IsRValueType(clean_lines, nesting_state, linenum, column):
        """Check if the token ending on (linenum, column) is a type.
    
        Assumes that text to the right of the column is "&&" or a function
        name.
    Severity: Minor
    Found in lib/cpplint.py - About 1 day 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 FindStartOfExpressionInLine has a Cognitive Complexity of 52 (exceeds 5 allowed). Consider refactoring.
    Open

    def FindStartOfExpressionInLine(line, endpos, stack):
        """Find position at the matching start of current expression.
    
        This is almost the reverse of FindEndOfExpressionInLine, but note
        that the input position and returned position differs by 1.
    Severity: Minor
    Found in lib/cpplint.py - About 1 day 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 CheckBraces has a Cognitive Complexity of 50 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckBraces(filename, clean_lines, linenum, error):
        """Looks for misplaced braces (e.g. at the end of line).
    
        Args:
                filename: The name of the current file.
    Severity: Minor
    Found in lib/cpplint.py - About 7 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 CheckForNonConstReference has a Cognitive Complexity of 46 (exceeds 5 allowed). Consider refactoring.
    Open

    def CheckForNonConstReference(filename, clean_lines, linenum,
                                  nesting_state, error):
        """Check for non-const references.
    
        Separate from CheckLanguage since it scans backwards from current
    Severity: Minor
    Found in lib/cpplint.py - About 7 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

    File github.py has 454 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    """
        Exposes Github API v3.
    """
    
    import sys
    Severity: Minor
    Found in lib/github.py - About 6 hrs to fix

      Function migrateissues has a Cognitive Complexity of 39 (exceeds 5 allowed). Consider refactoring.
      Open

      def migrateissues(owner, origin, destination, *issuenos, token=None):
      
          token = lib.github.pat(token)
      
          print("fetch issues to migrate")
      Severity: Minor
      Found in sak/github.py - About 5 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 diff has a Cognitive Complexity of 38 (exceeds 5 allowed). Consider refactoring.
      Open

      def diff(cwd = '.'):
      
          with lib.json.proxy(os.path.join(cwd, "package.json"), "r") as package:
              name = package['name']
              description = package['description']
      Severity: Minor
      Found in sak/js.py - About 5 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 CheckForNonStandardConstructs has a Cognitive Complexity of 36 (exceeds 5 allowed). Consider refactoring.
      Open

      def CheckForNonStandardConstructs(filename, clean_lines, linenum,
                                        nesting_state, error):
          r"""Logs an error if we see certain non-ANSI constructs ignored by gcc-2.
      
          Complain about several constructs which gcc-2 accepts, but which are
      Severity: Minor
      Found in lib/cpplint.py - About 5 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 CheckCasts has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
      Open

      def CheckCasts(filename, clean_lines, linenum, error):
          """Various cast related checks.
      
          Args:
                  filename: The name of the current file.
      Severity: Minor
      Found in lib/cpplint.py - About 5 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

      File github.py has 377 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      import lib.config
      import lib.git
      import lib.error
      import lib.check
      import lib.github
      Severity: Minor
      Found in sak/github.py - About 5 hrs to fix

        Function ProcessConfigOverrides has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
        Open

        def ProcessConfigOverrides(filename):
            """ Loads the configuration files and processes the config overrides.
        
            Args:
                    filename: The name of the file being processed by the linter.
        Severity: Minor
        Found in lib/cpplint.py - About 4 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 CheckCheck has a Cognitive Complexity of 33 (exceeds 5 allowed). Consider refactoring.
        Open

        def CheckCheck(filename, clean_lines, linenum, error):
            """Checks the use of CHECK and EXPECT macros.
        
            Args:
                    filename: The name of the current file.
        Severity: Minor
        Found in lib/cpplint.py - About 4 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 parse has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
        Open

        def parse(argv, args, kwargs):
            """
        
                    >>> from lib.args import *
        
        
        Severity: Minor
        Found in lib/args.py - About 4 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 CheckSpacing has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring.
        Open

        def CheckSpacing(filename, clean_lines, linenum, nesting_state, error):
            """Checks for the correctness of various spacing issues in the code.
        
            Things we check for: spaces around operators, spaces after
            if/for/while/switch, no spaces around parens in function calls, two
        Severity: Minor
        Found in lib/cpplint.py - About 4 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 CheckComment has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

        def CheckComment(line, filename, linenum, next_line_start, error):
            """Checks for common mistakes in comments.
        
            Args:
                    line: The line in question.
        Severity: Minor
        Found in lib/cpplint.py - About 4 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 CheckForIncludeWhatYouUse has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring.
        Open

        def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error,
                                      io=codecs):
            """Reports for missing stl includes.
        
            This function will output warnings to make sure you are including the headers
        Severity: Minor
        Found in lib/cpplint.py - About 4 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

        Severity
        Category
        Status
        Source
        Language