powerful-scooter-95162
03/12/2024, 4:05 PMpants --changed-since=HEAD --changed-dependents=transitive check
and I think it is picking up files that are changed but not staged for commitpowerful-scooter-95162
03/12/2024, 4:06 PMcurved-manchester-66006
03/12/2024, 4:21 PM- id: pants-green
name: pants green
always_run: false
description: runs pants fmt/lint/check on python files
entry: pants --changed-since=HEAD --no-dynamic-ui green
language: system
pass_filenames: false
files: *pants_include_pattern
exclude: *pants_exclude_pattern
wide-midnight-78598
03/12/2024, 4:30 PMwonderful-boots-93625
03/12/2024, 4:53 PMpre-commit
tool doesn’t like giving you much feedback. So I have a wrapper that looks like
$ cat pre-commit-helper.sh
#!/bin/bash
set -e -o pipefail
LOG=$1
shift
2>&1 $@ | tee $LOG
then my precommit looks like
- id: pants-lint
name: Pants Lint (tail -f ./pre-commit-log-pants-lint.txt for progress)
entry: "./pre-commit-helper.sh pre-commit-log-pants-lint.txt ./pants --no-dynamic-ui --changed-since=HEAD lint"
language: script
types: [python]
pass_filenames: false
verbose: true
require_serial: true
so while it’s running you can tail the filewonderful-boots-93625
03/12/2024, 4:53 PMwonderful-boots-93625
03/12/2024, 4:56 PMcurved-manchester-66006
03/12/2024, 4:59 PMpre-commit
anymore.wonderful-boots-93625
03/12/2024, 5:01 PMcurved-manchester-66006
03/12/2024, 5:49 PMpowerful-scooter-95162
03/12/2024, 6:05 PM