From 12c13a0e1e43a28a09097f29ecb52c3f6a710e59 Mon Sep 17 00:00:00 2001 From: Sergey Bronnikov Date: Thu, 12 Feb 2026 15:44:36 +0300 Subject: [PATCH] Check that patch has dependencies update To disable the new checks, one can add NO_DEPS tag to the commit message. --- checkpatch.pl | 9 +++++++++ doc/checkpatch.rst | 6 ++++++ 2 files changed, 15 insertions(+) diff --git a/checkpatch.pl b/checkpatch.pl index e2049ac..c0fa37b 100755 --- a/checkpatch.pl +++ b/checkpatch.pl @@ -498,6 +498,7 @@ sub hash_show_words { NO_DOC| NO_TEST| NO_CHANGELOG + NO_DEPS )}; our $github_ref = qr{(https?:\/\/)?(www\.)?github\.com\b([-a-zA-Z0-9()@:%_\+.~\#?&\/=]*)}; @@ -2156,6 +2157,7 @@ sub process { my $new_file = 0; my $has_doc = 0; my $has_test = 0; + my $has_deps = 0; my $is_test = 0; # Pre-scan the patch sanitizing the lines. @@ -2767,6 +2769,9 @@ sub process { if ($realfile =~ /^(?:static-build\/)?test\/.*\//) { $has_test = 1; } + if ($realfile =~ /^third_party\//) { + $has_deps = 1; + } $is_test = ($realfile =~ /^(?:test|perf)\//); @@ -5293,6 +5298,10 @@ sub process { ERROR("NO_TEST", "Please add test or NO_TEST= tag\n"); } + if (!$has_deps && !exists($commit_log_tags{'NO_DEPS'})) { + ERROR("NO_DEPS", + "Please update dependencies or add NO_DEPS= tag\n"); + } } print report_dump(); diff --git a/doc/checkpatch.rst b/doc/checkpatch.rst index b44a759..db4e059 100644 --- a/doc/checkpatch.rst +++ b/doc/checkpatch.rst @@ -766,6 +766,12 @@ Others If the patch doesn't need a test (e.g. it fixes a CI issue), please add NO_TEST= to the commit log. + **NO_DEPS** + The patch has dependencies update. Please update dependencies versions or + add a new entry to the file with dependencies extra/dependencies.yaml. + If the patch doesn't update dependencies (e.g. it fixes a typo), please add + NO_DEPS= to the commit log. + **NOT_UNIFIED_DIFF** The patch file does not appear to be in unified-diff format. Please regenerate the patch file before sending it to the maintainer.