Skip to content

Commit fa10051

Browse files
author
MarcoFalke
committed
lint: Add get_subtrees() helper
This is needed for a future change.
1 parent 45b2a91 commit fa10051

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

test/lint/test_runner/src/main.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,22 @@ fn get_git_root() -> PathBuf {
3434
PathBuf::from(check_output(git().args(["rev-parse", "--show-toplevel"])).unwrap())
3535
}
3636

37+
/// Return all subtree paths
38+
fn get_subtrees() -> Vec<&'static str> {
39+
vec![
40+
"src/crc32c",
41+
"src/crypto/ctaes",
42+
"src/leveldb",
43+
"src/minisketch",
44+
"src/secp256k1",
45+
]
46+
}
47+
3748
fn lint_subtree() -> LintResult {
3849
// This only checks that the trees are pure subtrees, it is not doing a full
3950
// check with -r to not have to fetch all the remotes.
4051
let mut good = true;
41-
for subtree in [
42-
"src/crypto/ctaes",
43-
"src/secp256k1",
44-
"src/minisketch",
45-
"src/leveldb",
46-
"src/crc32c",
47-
] {
52+
for subtree in get_subtrees() {
4853
good &= Command::new("test/lint/git-subtree-check.sh")
4954
.arg(subtree)
5055
.status()

0 commit comments

Comments
 (0)