Configure squawk rules (#16144)
This PR configures [`squawk`](https://squawkhq.com/) to match our database conventions. Release Notes: - N/A
This commit is contained in:
parent
b4c22cc861
commit
e662bfc74f
2 changed files with 8 additions and 2 deletions
|
@ -1,4 +1,10 @@
|
||||||
excluded_rules = [
|
excluded_rules = [
|
||||||
|
# We use `serial` already, no point changing now.
|
||||||
|
"prefer-identity",
|
||||||
|
|
||||||
|
# We store timestamps in UTC, so we don't care about the timezone.
|
||||||
|
"prefer-timestamptz",
|
||||||
|
|
||||||
"prefer-big-int",
|
"prefer-big-int",
|
||||||
"prefer-bigint-over-int",
|
"prefer-bigint-over-int",
|
||||||
]
|
]
|
||||||
|
|
|
@ -28,7 +28,7 @@ if [ -n "$SQUAWK_GITHUB_TOKEN" ]; then
|
||||||
export SQUAWK_GITHUB_REPO_NAME=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $2}')
|
export SQUAWK_GITHUB_REPO_NAME=$(echo $GITHUB_REPOSITORY | awk -F/ '{print $2}')
|
||||||
export SQUAWK_GITHUB_PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
export SQUAWK_GITHUB_PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')
|
||||||
|
|
||||||
$SQUAWK_BIN $SQUAWK_ARGS upload-to-github $(git diff --name-only origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF 'crates/collab/migrations/*.sql')
|
$SQUAWK_BIN $SQUAWK_ARGS upload-to-github $(git diff --name-only origin/$GITHUB_BASE_REF...origin/$GITHUB_HEAD_REF 'crates/collab/migrations/*.sql' 'crates/collab/migrations_llm/*.sql')
|
||||||
else
|
else
|
||||||
$SQUAWK_BIN $SQUAWK_ARGS $(git ls-files --others crates/collab/migrations/*.sql) $(git diff --name-only main crates/collab/migrations/*.sql)
|
$SQUAWK_BIN $SQUAWK_ARGS $(git ls-files --others crates/collab/migrations/*.sql crates/collab/migrations_llm/*.sql) $(git diff --name-only main crates/collab/migrations/*.sql crates/collab/migrations_llm/*.sql)
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue