Commit Graph

16 Commits

Author SHA1 Message Date
a-kenji
5b9d911bee
fix typos (#183) 2022-10-16 15:26:44 +02:00
zimbatm
da42d37d6c
terraform 1.3.0 accepts a list of files
Fixes #97
2022-09-22 16:25:28 +02:00
zimbatm
2af3933b4b
formatters-spec: clarify syntax and semantics rule 2022-08-09 10:37:45 +02:00
zimbatm
f400c2f320
fix typo 2022-08-09 10:27:10 +02:00
zimbatm
d19198044e
treefmt.toml: add warning for sh -c 2022-05-20 16:18:55 +02:00
zimbatm
f44033281e treefmt.toml: fix shell invocation
Put a dummy "--" as the first argument, otherwise the first file is
always ignored.

See https://github.com/numtide/treefmt/issues/77#issuecomment-997030856
2021-12-18 12:47:11 +01:00
zimbatm
aa4684a8d9
treefmt.toml: add shellcheck example 2021-12-17 18:35:06 +01:00
zimbatm
7fcb313c6d
doc: add inline script example
This is more flexible than creating an external script.
2021-12-12 16:19:41 +01:00
Jonas Chevalier
b25cfa461f
formatter: add rufo (#113) 2021-05-08 16:26:26 +00:00
zimbatm
f640dd9c9d
terraform fmt workaround
See #97
2021-05-07 00:21:06 +02:00
zimbatm
dc25c5a742
exclude CHANGELOG.md 2021-05-07 00:18:16 +02:00
Jonas Chevalier
f7e2aa079e
expand includes and excludes (#86)
If includes or excludes include a / we consider them to be paths and
expand them.
2021-03-02 17:26:50 +01:00
zimbatm
6b72db4087
docs: add list of known formatters 2021-02-26 22:02:16 +01:00
zimbatm
732439aff6
re-implement the core logic
I had to remove the evaluation cache and parallel formatting for now in
order to make this manageable.

* Load the config
* Prepare for filesystem traversal
* Match each path against the formatters and collect the ones that
  match. Get the mtime from the traversal entry to avoid additional
  syscalls.
* Now that we have a map from formatter to paths, run each formatter
  against its list. Collect a list of new mtimes.
* Finally display the list of files that have changed.
2021-02-25 14:48:13 +01:00
zimbatm
b2cb879ef6
singluarize formatters 2021-02-18 12:47:51 +01:00
zimbatm
941fadc964
move the examples/treefmt.toml to the top-level 2021-02-18 12:41:47 +01:00