Skip to content

Commit

Permalink
improve error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
tgolsson committed Mar 17, 2023
1 parent ffdff6b commit 638d1a6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .buildkite/run-bandit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ pdm run bandit --r emote experiments tests -ll > diff.txt || EXIT_CODE=$?

if [ $EXIT_CODE -ne 0 ]; then
cat << EOF | buildkite-agent annotate --style "error" --context "bandit"
:warning: \`bandit\` found issues with your code. Please fix the below, and update your PR.
:warning: \`bandit\` found issues with your code. Please fix the below issues, and update your PR.
\`\`\`diff
$(cat diff.txt)
\`\`\`
EOF
else
buildkite-agent annotate "\`bandit\` found no code issues." --style "success" --context "eslint"
buildkite-agent annotate "\`bandit\` found no code issues." --style "success" --context "bandit"
fi

exit $EXIT_CODE
2 changes: 1 addition & 1 deletion .buildkite/run-black.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pdm run black --check --diff emote tests experiments > diff.txt || EXIT_CODE=$?

if [ $EXIT_CODE -ne 0 ]; then
cat << EOF | buildkite-agent annotate --style "error" --context "black"
:warning: Your code isn't formatted by \`black\`. Please fix the below diffs, or run \`pdm run black emote tests\` to automatically format it.
:warning: Your code isn't formatted by \`black\`. Please fix the below diffs, or run \`pdm run black emote tests experiments\` to automatically format it.
\`\`\`diff
$(cat diff.txt)
Expand Down
2 changes: 1 addition & 1 deletion .buildkite/run-isort.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cat diff.txt

if [ $EXIT_CODE -ne 0 ]; then
cat << EOF | buildkite-agent annotate --style "error" --context "isort"
:warning: Your imports aren't sorted by \`isort\`. Please fix the below diffs, or run \`pdm run isort emote\` to automatically format it.
:warning: Your imports aren't sorted by \`isort\`. Please fix the below diffs, or run \`pdm run isort emote experiments\` to automatically format it.
\`\`\`diff
$(cat diff.txt)
Expand Down

0 comments on commit 638d1a6

Please sign in to comment.