check-patch.py
Interaktion und PortierbarkeitPython
#!/usr/bin/env python3 # SPDX-License-Identifier: GPL-2.0-or-later # # check-patch.py: run checkpatch.pl across all commits in a branch # # Based on qemu/.gitlab-ci.d/check-patch.py # # Copyright (C) 2020 Red Hat, Inc. # Copyright (C) 2022 Collabora Ltd.
import os import os.path import sys import subprocess
# GitLab CI environment does not give us any direct info about the # base for the user's branch. We thus need to figure out a common # ancestor between the user's branch and current git master.
os.environ["GIT_DEPTH"] = "1000"
subprocess.call(["git", "remote", "remove", "check-patch"], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
subprocess.check_call(["git", "remote", "add", "check-patch", repourl])
subprocess.check_call(["git", "fetch", "check-patch", os.environ["CI_MERGE_REQUEST_TARGET_BRANCH_NAME"]],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL)
if log == "":
print("\nNo commits since %s, skipping checks\n" % ancestor)
sys.exit(0)
errors = False
print("\nChecking all commits since %s...\n" % ancestor, flush=True)
ret = subprocess.run(["scripts/checkpatch.pl", "--terse", "--types", os.environ["CHECKPATCH_TYPES"], "--git", ancestor + "..."])
if ret.returncode != 0:
print(" ❌ FAIL one or more commits failed scripts/checkpatch.pl")
sys.exit(1)
sys.exit(0)
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.1Angebot
(Wie Sie bei der Firma Beratungs- und Dienstleistungen beauftragen können 2026-10-11)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.