summaryrefslogtreecommitdiff
path: root/Omni/Ide/ailint.bash
blob: 0291335c3e5fa58eb3aabc2ec67d1fa7aa1fde07 (plain)
1
2
3
4
5
6
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"