deps/v8/tools/push-to-trunk/git_recipes.py

Summary

Maintainability
B
5 hrs
Test Coverage

GitRecipesMixin has 29 functions (exceeds 20 allowed). Consider refactoring.
Open

class GitRecipesMixin(object):
  def GitIsWorkdirClean(self):
    return self.Git("status -s -uno").strip() == ""

  @Strip
Severity: Minor
Found in deps/v8/tools/push-to-trunk/git_recipes.py - About 3 hrs to fix

    Function GitLog has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

      def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="",
    Severity: Major
    Found in deps/v8/tools/push-to-trunk/git_recipes.py - About 50 mins to fix

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

        def GitUpload(self, reviewer="", author="", force=False, cq=False,
      Severity: Minor
      Found in deps/v8/tools/push-to-trunk/git_recipes.py - About 35 mins to fix

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

          def GitLog(self, n=0, format="", grep="", git_hash="", parent_hash="",
                     branch="", reverse=False):
            assert not (git_hash and parent_hash)
            args = ["log"]
            if n > 0:
        Severity: Minor
        Found in deps/v8/tools/push-to-trunk/git_recipes.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

        There are no issues that match your filters.

        Category
        Status