hackedteam/vector-edk

View on GitHub
AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py

Summary

Maintainability
F
3 days
Test Coverage

Function main has a Cognitive Complexity of 60 (exceeds 5 allowed). Consider refactoring.
Open

Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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

File pygettext.py has 495 lines of code (exceeds 250 allowed). Consider refactoring.
Open

Severity: Minor
Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py - About 7 hrs to fix

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

    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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 _get_modpkg_path has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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 getFilesForName has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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 __waiting has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
    Open

    Severity: Minor
    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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

    Avoid deeply nested control flow statements.
    Open

    Severity: Major
    Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py - About 45 mins to fix

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

      Severity: Minor
      Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py - About 35 mins to fix

        Avoid too many return statements within this function.
        Open

        Severity: Major
        Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.py - About 30 mins to fix

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

          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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

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

          Severity: Minor
          Found in AppPkg/Applications/Python/Python-2.7.2/Tools/i18n/pygettext.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

          There are no issues that match your filters.

          Category
          Status