You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: remove deleted files from records file with --stage-record-file (#34)
* fix: remove deleted files from records file (#31)
When using --stage-record-file, deleted files are now automatically
removed from the records instead of throwing an error. This enables
pre-commit hooks to include deleted files (diff-filter=ACMRD) so the
tracker can clean up records for removed files.
- Add partitionByExistence() to separate existing/deleted files
- Update --stage-record-file to compile only existing files while
passing all files to records for cleanup
- Add log messages for deleted files being removed
- Fix grammar in log messages ("1 file" vs "1 files")
- Update README with new behavior and diff-filter guidance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* refactor: extract pluralize helper into utils module
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
* fix: only check existing files for error increases in stage mode
Pass existingFilePaths instead of allFilePaths to exitIfErrorsIncreased
since only existing files are compiled. Deleted files are handled
separately and don't need error checking.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Checks the provided files and updates the records. Exits with code 1 if errors increase (preventing the commit), otherwise updates the records file for the checked files.
77
+
Checks the provided files and updates the records. Exits with code 1 if errors increase (preventing the commit), otherwise updates the records file for the checked files. Deleted files are automatically removed from the records.
@@ -84,7 +84,7 @@ If no files are provided, exits cleanly with a success message.
84
84
85
85
### `--check-files <file1> <file2> ...`
86
86
87
-
Checks specific files without updating records. Exits with code 1 if checked files show increased error counts (or new errors). Primarily for CI to ensure PRs don't introduce new compiler errors.
87
+
Checks specific files without updating records. Exits with code 1 if checked files show increased error counts (or new errors), or if any provided file does not exist. Primarily for CI to ensure PRs don't introduce new compiler errors.
0 commit comments