mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 23:09:44 -04:00
lint: Add get_subtrees() helper
This is needed for a future change.
This commit is contained in:
parent
45b2a91897
commit
fa10051267
1 changed files with 12 additions and 7 deletions
|
@ -34,17 +34,22 @@ fn get_git_root() -> PathBuf {
|
||||||
PathBuf::from(check_output(git().args(["rev-parse", "--show-toplevel"])).unwrap())
|
PathBuf::from(check_output(git().args(["rev-parse", "--show-toplevel"])).unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return all subtree paths
|
||||||
|
fn get_subtrees() -> Vec<&'static str> {
|
||||||
|
vec![
|
||||||
|
"src/crc32c",
|
||||||
|
"src/crypto/ctaes",
|
||||||
|
"src/leveldb",
|
||||||
|
"src/minisketch",
|
||||||
|
"src/secp256k1",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
fn lint_subtree() -> LintResult {
|
fn lint_subtree() -> LintResult {
|
||||||
// This only checks that the trees are pure subtrees, it is not doing a full
|
// This only checks that the trees are pure subtrees, it is not doing a full
|
||||||
// check with -r to not have to fetch all the remotes.
|
// check with -r to not have to fetch all the remotes.
|
||||||
let mut good = true;
|
let mut good = true;
|
||||||
for subtree in [
|
for subtree in get_subtrees() {
|
||||||
"src/crypto/ctaes",
|
|
||||||
"src/secp256k1",
|
|
||||||
"src/minisketch",
|
|
||||||
"src/leveldb",
|
|
||||||
"src/crc32c",
|
|
||||||
] {
|
|
||||||
good &= Command::new("test/lint/git-subtree-check.sh")
|
good &= Command::new("test/lint/git-subtree-check.sh")
|
||||||
.arg(subtree)
|
.arg(subtree)
|
||||||
.status()
|
.status()
|
||||||
|
|
Loading…
Add table
Reference in a new issue