From ec25a425aa5f1e49213aafa7af9394fa96ef9207 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=AE=B8=E6=9D=B0=E5=8F=8B=20Jieyou=20Xu=20=28Joe=29?= Date: Fri, 22 Mar 2024 19:03:29 +0000 Subject: [PATCH] Add comment for `include!()` usage --- src/tools/tidy/src/run_make_tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/tools/tidy/src/run_make_tests.rs b/src/tools/tidy/src/run_make_tests.rs index b591f3a7a22..0231ac0939e 100644 --- a/src/tools/tidy/src/run_make_tests.rs +++ b/src/tools/tidy/src/run_make_tests.rs @@ -9,6 +9,9 @@ pub fn check(root_path: &Path, bless: bool, bad: &mut bool) { let tests_path = &root_path.join("tests"); let allowed_makefiles = { + // We use `include!` here which includes the file as Rust syntax because we want to have + // a comment that discourages people from adding entries to + // `expected_run_make_makefiles.txt` unless *absolutely* necessary. let allowed_makefiles = include!("expected_run_make_makefiles.txt"); let is_sorted = allowed_makefiles.windows(2).all(|w| w[0] < w[1]); if !is_sorted && !bless {