From fa2b2aa27c29fe810e296ef82126553b8f0d56e6 Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Tue, 13 May 2025 12:18:34 +0200 Subject: [PATCH] lint: Add archived notes to default excludes No need to touch or lint them. --- test/lint/test_runner/src/main.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/test/lint/test_runner/src/main.rs b/test/lint/test_runner/src/main.rs index dec43a71342..fdf87debb54 100644 --- a/test/lint/test_runner/src/main.rs +++ b/test/lint/test_runner/src/main.rs @@ -209,10 +209,13 @@ fn get_subtrees() -> Vec<&'static str> { ] } -/// Return the pathspecs to exclude all subtrees -fn get_pathspecs_exclude_subtrees() -> Vec { +/// Return the pathspecs to exclude by default +fn get_pathspecs_default_excludes() -> Vec { get_subtrees() .iter() + .chain(&[ + "doc/release-notes/release-notes-*", // archived notes + ]) .map(|s| format!(":(exclude){}", s)) .collect() } @@ -333,7 +336,7 @@ fn lint_py_lint() -> LintResult { let files = check_output( git() .args(["ls-files", "--", "*.py"]) - .args(get_pathspecs_exclude_subtrees()), + .args(get_pathspecs_default_excludes()), )?; let mut cmd = Command::new(bin_name); @@ -459,7 +462,7 @@ expected to follow the naming "/doc/release-notes-.md". /// Return the pathspecs for whitespace related excludes fn get_pathspecs_exclude_whitespace() -> Vec { - let mut list = get_pathspecs_exclude_subtrees(); + let mut list = get_pathspecs_default_excludes(); list.extend( [ // Permanent excludes @@ -468,7 +471,6 @@ fn get_pathspecs_exclude_whitespace() -> Vec { "contrib/windeploy/win-codesign.cert", "doc/README_windows.txt", // Temporary excludes, or existing violations - "doc/release-notes/release-notes-0.*", "contrib/init/bitcoind.openrc", "contrib/macdeploy/macdeployqtplus", "src/crypto/sha256_sse4.cpp", @@ -569,7 +571,7 @@ fn lint_includes_build_config() -> LintResult { "*.cpp", "*.h", ]) - .args(get_pathspecs_exclude_subtrees()) + .args(get_pathspecs_default_excludes()) .args([ // These are exceptions which don't use bitcoin-build-config.h, rather CMakeLists.txt adds // these cppflags manually.