Commit Graph

7 Commits

Author SHA1 Message Date
Brian McGee
4f086c204e
Revert "fix: --stdin flag"
This reverts commit 9934a5764d.
2024-06-04 17:05:56 +01:00
Brian McGee
9934a5764d
fix: --stdin flag
This was incorrectly ported from Rust to Go.

When provided, `treefmt` will take the contents of stdin and place them into the file provided with the `--stdin` flag, then format it according to the configured formatters.

If the file doesn't exist it is created. If it exists, it is first truncated and then populated with stdin.

Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-06-03 17:07:34 +01:00
Brian McGee
2e77e123d1
feat: optimize git walker
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-05-07 18:02:50 +01:00
Brian McGee
8b92dca9c6
feat: streaming processing of paths from stdin and paths argument
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-05-07 17:20:04 +01:00
Brian McGee
ed10f976f8
fix: fmt.Errorf formats
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-05-02 11:40:49 +01:00
Brian McGee
5a5c1ea03e
fix: record cache entries for files that don't match formatters
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-05-02 08:58:02 +01:00
Brian McGee
d4ab015bc6
chore: remove internal directory
Signed-off-by: Brian McGee <brian@bmcgee.ie>
2024-02-15 13:59:55 +00:00