summaryrefslogtreecommitdiff
path: root/Omni/Ide/ailint.bash
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2025-06-05 23:53:41 -0400
committerBen Sima <ben@bsima.me>2025-06-14 18:55:20 -0400
commite2f8c2916a3f943699c60e094bec05153fb57505 (patch)
tree9fc073f2296a6e603293f7b088a5bc1b456ff2be /Omni/Ide/ailint.bash
parent21927558d3f9cf573834a2746efa4fd421bee189 (diff)
Add ailint scriptHEADlive
This just fixes my lint errors for me which is awesome. Very useful.
Diffstat (limited to 'Omni/Ide/ailint.bash')
-rwxr-xr-xOmni/Ide/ailint.bash7
1 files changed, 7 insertions, 0 deletions
diff --git a/Omni/Ide/ailint.bash b/Omni/Ide/ailint.bash
new file mode 100755
index 0000000..0291335
--- /dev/null
+++ b/Omni/Ide/ailint.bash
@@ -0,0 +1,7 @@
+#!/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" 2>&1 1>> "$instructions"
+[[ $? -ne 0 ]] && aider --yes --message-file "$instructions" "$target"