exclude sources as well
This commit is contained in:
parent
a56a96d1c4
commit
61007cff09
1 changed files with 4 additions and 1 deletions
|
|
@ -37,7 +37,10 @@ check_sql() {
|
||||||
export -f check_sql
|
export -f check_sql
|
||||||
|
|
||||||
# Run in parallel (adjust `-P` to change concurrency level)
|
# Run in parallel (adjust `-P` to change concurrency level)
|
||||||
find "$SQL_DIR" -type f -name "*.sql" -not -path "*/schema.yml/*" | xargs -P 4 -I {} bash -c 'check_sql "$@"' _ {}
|
# We exclude files contained in folders named schema.yml or ended in sources.yml
|
||||||
|
# because those are dbt generated test SQL snippets which, by definition, are
|
||||||
|
# valid.
|
||||||
|
find "$SQL_DIR" -type f -name "*.sql" -not -path "*/schema.yml/*" -not -path "*/*sources.yml/*" | xargs -P 4 -I {} bash -c 'check_sql "$@"' _ {}
|
||||||
|
|
||||||
# Check exit status of xargs
|
# Check exit status of xargs
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue