Broaden pattern in nits.sh to be less fragile (#8090)
* Broaden pattern in nits.sh to be less fragile * Even more general matching
This commit is contained in:
26
ci/nits.sh
26
ci/nits.sh
@ -18,20 +18,22 @@ declare prints=(
|
|||||||
|
|
||||||
# Parts of the tree that are expected to be print free
|
# Parts of the tree that are expected to be print free
|
||||||
declare print_free_tree=(
|
declare print_free_tree=(
|
||||||
'core/src'
|
':core/src/**.rs'
|
||||||
'faucet/src'
|
':faucet/src/**.rs'
|
||||||
'ledger/src'
|
':ledger/src/**.rs'
|
||||||
'metrics/src'
|
':metrics/src/**.rs'
|
||||||
'net-utils/src'
|
':net-utils/src/**.rs'
|
||||||
'runtime/src'
|
':runtime/src/**.rs'
|
||||||
'sdk/bpf/rust/rust-utils'
|
':sdk/bpf/rust/rust-utils/**.rs'
|
||||||
'sdk/src'
|
':sdk/**.rs'
|
||||||
'programs/bpf/rust'
|
':programs/**.rs'
|
||||||
'programs/stake/src'
|
':^**bin**.rs'
|
||||||
'programs/vote/src'
|
':^**bench**.rs'
|
||||||
|
':^**test**.rs'
|
||||||
|
':^**/build.rs'
|
||||||
)
|
)
|
||||||
|
|
||||||
if _ git --no-pager grep -n --max-depth=0 "${prints[@]/#/-e }" -- "${print_free_tree[@]}"; then
|
if _ git --no-pager grep -n "${prints[@]/#/-e}" -- "${print_free_tree[@]}"; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user