best-doctor/we_are_venom

View on GitHub

Showing 9 of 9 total issues

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

def grand_code_review(  # noqa: CFQ002
Severity: Major
Found in we_are_venom/venom.py - About 1 hr to fix

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

    def grand_code_review(  # noqa: CFQ002
        path: str,
        date_from: datetime.datetime,
        date_to: datetime.datetime,
        web_base_repo_url: str,
    Severity: Minor
    Found in we_are_venom/venom.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

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

    def fetch_git_history(
    Severity: Minor
    Found in we_are_venom/utils/git.py - About 35 mins to fix

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

      def fetch_git_history(
      Severity: Minor
      Found in we_are_venom/utils/git.py - About 35 mins to fix

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

        def fetch_git_history(
        Severity: Minor
        Found in we_are_venom/utils/git.py - About 35 mins to fix

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

          def check(
          Severity: Minor
          Found in we_are_venom/venom.py - About 35 mins to fix

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

            def output_review_report(
            Severity: Minor
            Found in we_are_venom/utils/output.py - About 35 mins to fix

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

              def fetch_modules_total_lines_map(path: str, config: Mapping[str, Any]) -> Mapping[str, int]:
                  module_total_lines: DefaultDict[str, int] = collections.defaultdict(int)
                  for module in config['modules']:
                      wildcards = [
                          os.path.join(path, module, '**', f'*.{e}')
              Severity: Minor
              Found in we_are_venom/utils/files.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 get_touched_files_in_commit has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              def get_touched_files_in_commit(
                  commit: Commit,
                  config: Mapping[str, Any],
              ) -> Iterable[Tuple[str, int]]:
                  touched_lines_per_module: DefaultDict[str, int] = collections.defaultdict(int)
              Severity: Minor
              Found in we_are_venom/utils/accumulation.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