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