summaryrefslogtreecommitdiff
path: root/Omni/Ide/ailint.sh
diff options
context:
space:
mode:
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"