#!/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"