Jonas Chevalier zimbatm
zimbatm approved numtide/treefmt#25 2024-01-13 19:19:27 +00:00
feat: create config package

👍cleaner code

zimbatm commented on pull request numtide/treefmt#22 2024-01-12 11:35:53 +00:00
Feature parity with treefmt.rs

In terms of behaviour, would you expect treefmt ./some/gitignored-file to format or ignore the file?

zimbatm approved numtide/treefmt#23 2024-01-12 11:07:52 +00:00
feat: use go-git index instead of git ls-files

yup, less concurrency is good.

zimbatm commented on pull request numtide/treefmt#19 2024-01-10 19:05:59 +00:00
feat: support .gitignore files

You didn't want to use the go-git package for this?

zimbatm approved numtide/treefmt#19 2024-01-10 19:05:59 +00:00
feat: support .gitignore files

LGTM

zimbatm commented on pull request numtide/treefmt#19 2024-01-10 14:36:24 +00:00
feat: support .gitignore files

The default could be added to the config file, or detected.

zimbatm commented on pull request numtide/treefmt#19 2024-01-10 14:36:24 +00:00
feat: support .gitignore files

I think a more idiomatic way would be to have an "internal/walker" package.

zimbatm approved numtide/treefmt#19 2024-01-10 14:36:24 +00:00
feat: support .gitignore files

Yeah that's great, I think it's going to make the project so much nicer

zimbatm commented on pull request numtide/treefmt#19 2024-01-08 17:19:26 +00:00
feat: support .gitignore files

If it's following git ls-files then I would not process the .gitignore files. If the user wants to ignore something, they can still ignore them by adding them to the global excludes list.

zimbatm commented on pull request numtide/treefmt#19 2024-01-08 17:09:07 +00:00
feat: support .gitignore files

The phrasing is a bit ambiguous. Maybe "Don't respect .gitignore files"?

zimbatm approved numtide/treefmt#19 2024-01-08 17:09:07 +00:00
feat: support .gitignore files

The rust ignore crate is a bit weird; it also loads .ignore files and generally doesn't traverse any files starting with a .. That has caused a few issues already. Eg: the latest: https://github.com/numtide/treefmt-nix/pull/146

zimbatm commented on pull request numtide/treefmt#20 2024-01-08 17:03:04 +00:00
support formatter ordering

formatter.Before is there 2 times

zimbatm commented on pull request numtide/treefmt#20 2024-01-08 17:03:04 +00:00
support formatter ordering

You need a second for loop here to check for the dependency cycle.

zimbatm commented on pull request numtide/treefmt#20 2024-01-08 17:03:04 +00:00
support formatter ordering

Personal taste thing: because of how many public/private fields there are, I would split this into a FormatterConfig that only contains the config and serializes/deserializes, and then the Formatter that gets generated from the config. That way, how to interact with the structs in the rest of the code becomes clearer. I don't think the Before field should be mutated in the code for example.

zimbatm approved numtide/treefmt#20 2024-01-08 17:03:04 +00:00
support formatter ordering

I haven't wrapped my head around the concurrent aspect of the code, but the rest looks good.

zimbatm approved numtide/treefmt#18 2024-01-07 18:53:28 +00:00
fix: stalling on large file sets
zimbatm deleted branch feat/change-work-directory from numtide/treefmt 2024-01-07 16:24:48 +00:00
zimbatm approved numtide/treefmt#15 2024-01-03 13:40:24 +00:00
feat: support changing work directory

magic :)

zimbatm approved numtide/treefmt#16 2024-01-03 12:53:59 +00:00
feat: support fail on change
zimbatm deleted branch clean-capacity from numtide/treefmt 2024-01-03 12:53:12 +00:00