#newlines #trailing #find #ending #cli

app tnl

Find files with missing trailing newlines

2 unstable releases

0.2.0 Dec 18, 2023
0.1.0 Nov 25, 2023

#1497 in Command line utilities

MIT license

10KB
72 lines

tnl

Find files with missing trailing newlines.

warning: missing "blazingly fast" in description
  --> README.md:3:0
   |
3  | ...                   Find files with missing trailing newlines.
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `Blazingly fast tool to find files with missing trailing newlines.`
   |

Installation

cargo install tnl

Usage

tnl <files>

You can use the --fix flag to automatically add trailing newlines to files without. tnl prints a message upon completion, listing the number of files checked (and the number of files fixed, if ran with --fix). This message can be disabled with the --quiet flag.

Tests

Tests use assert_cmd to verify the exit codes and content of error messages and assert_fs to test with temporary files.

License

MIT

Dependencies

~8–19MB
~241K SLoC