cleanup_file
Removes BOM, trailing whitespace, NUL bytes, fixes line endings, and ensures a final newline in text files. Options are configurable for selective cleanup.
Instructions
Remove BOM, trailing whitespace, fix line endings, remove NUL bytes. Configurable per-option.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file | |
| remove_bom | No | ||
| remove_trailing_whitespace | No | ||
| normalize_line_endings | No | lf | |
| remove_nul_bytes | No | ||
| ensure_final_newline | No | ||
| dry_run | No |