-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make it easy to list files that are covered/uncovered by formatting matches #244
Comments
I have another use-case for this request. I am looking into ways to integrate treefmt into Emacs for formatting on-save. For this it would be useful to be able to determine if one particular file can be formatted using treefmt. (The behavior of That way I can enable calling treefmt on-save only if it's supported and otherwise maybe fall back to formatters that are configured globally by the editor (in my case by the Emacs format-all package). |
@tmuehlbacher I have just implemented 1b517c6, which does a couple things. By default, treefmt will log a warning for every path which does not match one or more formatters. Note Cached paths will not be emitted again until they have changed. So you'll see the warning the first time a file is added to the cache, and not on subsequent runs.
You can change this behaviour using the
In the long term I would like to add something like you describe above, but in the short term this might help. |
Is your feature request related to a problem? Please describe.
I would like to be able to reliably tell that all of the files in my repo are covered by treefmt and also see files that are missing a formatter.
Describe the solution you'd like
An output similar to
git ls-files
, perhaps.I could be a command line switch to report the status, a message when using the
--verbose
flag or separate CLI flags to report either one of the two groups.Describe alternatives you've considered
I ran
git ls-files
and reduced the output using a manually written regex based on my treefmt.toml file.The text was updated successfully, but these errors were encountered: