Commit f1b3847e authored by Sandor Molnar's avatar Sandor Molnar
Browse files

Backed out changeset 9cef54c30d49 (bug 1648114) for causing python unit test...

Backed out changeset 9cef54c30d49 (bug 1648114) for causing python unit test failures in test_mach_commands. CLOSED TREE
parent a57fa132
Loading
Loading
Loading
Loading
+3 −23
Original line number Diff line number Diff line
@@ -196,35 +196,15 @@ TOOLS_CHECKER_LIST_EMPTY = 9
TOOLS_GRADLE_FAILED = 10


@Command(
    "clang-tidy",
    category="devenv",
    description="Convenience alias for the static-analysis command",
)
def clang_tidy(command_context):
    # If no arguments are provided, just print a help message.
    """Detailed documentation:
    https://firefox-source-docs.mozilla.org/code-quality/static-analysis/index.html
    """
    mach = Mach(os.getcwd())

    def populate_context(key=None):
        if key == "topdir":
            return command_context.topsrcdir

    mach.populate_context_handler = populate_context
    mach.run(["static-analysis", "--help"])


@Command(
    "static-analysis",
    category="devenv",
    description="Run C++ static analysis checks using clang-tidy",
    category="testing",
    description="Run C++ static analysis checks",
)
def static_analysis(command_context):
    # If no arguments are provided, just print a help message.
    """Detailed documentation:
    https://firefox-source-docs.mozilla.org/code-quality/static-analysis/index.html
    https://firefox-source-docs.mozilla.org/code-quality/static-analysis.html
    """
    mach = Mach(os.getcwd())

+0 −4
Original line number Diff line number Diff line
@@ -339,10 +339,6 @@ def run(
            os.path.splitext(os.path.basename(l))[0] for l in lint_paths["lint_paths"]
        ]
        print("\n".join(sorted(linters)))
        print(
            "\nNote that clang-tidy checks are not run as part of this "
            "command, but using the static-analysis command."
        )
        return 0

    lint = LintRoller(**lintargs)