diff options
Diffstat (limited to 'Omni/Ide')
-rwxr-xr-x | Omni/Ide/ailint.bash | 7 |
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" |