From e759a230e3bd6d90552075a2fbfb0ff9a5438baa Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 26 Jul 2025 08:28:17 -0400 Subject: Add ailint script This just fixes my lint errors for me which is awesome. Very useful. --- Omni/Ide/ailint.bash | 7 ------- Omni/Ide/ailint.sh | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) delete mode 100755 Omni/Ide/ailint.bash create mode 100755 Omni/Ide/ailint.sh (limited to 'Omni') diff --git a/Omni/Ide/ailint.bash b/Omni/Ide/ailint.bash deleted file mode 100755 index 0291335..0000000 --- a/Omni/Ide/ailint.bash +++ /dev/null @@ -1,7 +0,0 @@ -#!/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" 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" -- cgit v1.2.3