From e2f8c2916a3f943699c60e094bec05153fb57505 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Thu, 5 Jun 2025 23:53:41 -0400 Subject: Add ailint script This just fixes my lint errors for me which is awesome. Very useful. --- Omni/Ide/ailint.bash | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100755 Omni/Ide/ailint.bash 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" -- cgit v1.2.3