diff options
author | Ben Sima <ben@bsima.me> | 2025-08-26 11:05:33 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2025-08-28 12:14:06 -0400 |
commit | 208d4beb9d1ce6d826f11b0274bc587c37e0f4b8 (patch) | |
tree | 700aba4e6537cbb9279c3591693e7ec36081f883 /Omni/Ide/ailint.sh | |
parent | 40aa809c494019a3e9d69250133baa2d7c8c3394 (diff) |
If there are no lints to fix, this should just exit without starting aider.
Diffstat (limited to 'Omni/Ide/ailint.sh')
-rwxr-xr-x | Omni/Ide/ailint.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Omni/Ide/ailint.sh b/Omni/Ide/ailint.sh index 55d6ebe..a107be8 100755 --- a/Omni/Ide/ailint.sh +++ b/Omni/Ide/ailint.sh @@ -3,4 +3,9 @@ set -xu target=${1:?} instructions=$(mktemp) echo "Fix the following lint errors, or silence them with a `# noqa:` comment if they aren't problematic:" >> "$instructions" -[[ ! $(lint -f "$target" >> "$instructions" 2>&1) ]] && aider --yes --message-file "$instructions" "$target" +if lint -f "$target" >> "$instructions" 2>&1 +then + echo "no bad lints" +else + aider --yes --message-file "$instructions" "$target" +fi |