summaryrefslogtreecommitdiff
path: root/Omni/Ide/ailint.sh
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-07-26 08:28:17 -0400
committerBen Sima <ben@bsima.me>2025-07-26 08:28:17 -0400
commite759a230e3bd6d90552075a2fbfb0ff9a5438baa (patch)
tree092760caab2eeee243f373a4b8e7fa416af17698 /Omni/Ide/ailint.sh
parente2f8c2916a3f943699c60e094bec05153fb57505 (diff)
Add ailint script
This just fixes my lint errors for me which is awesome. Very useful.
Diffstat (limited to 'Omni/Ide/ailint.sh')
-rwxr-xr-xOmni/Ide/ailint.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/Omni/Ide/ailint.sh b/Omni/Ide/ailint.sh
new file mode 100755
index 0000000..55d6ebe
--- /dev/null
+++ b/Omni/Ide/ailint.sh
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+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"