Closed Mic92 closed 2 months ago
Its technically showing the docs for main. There's a version dropdown with 2.0.4.
I'll have a look later today and see about making it redirect to the latest release. I'll pin them to 2.0.4 in the short term if I really have to.
I've not been happy for a while with how to version the docs, making it easy to write latest docs but only showing the latest release version. It just got bumped down the list and I never came back to it.
Just checked and 2.0.4
does have --ci
flag: https://treefmt.com/v2.0.4/usage:
❯ nix run github:numtide/treefmt/v2.0.4 -- --help
Usage: treefmt [<paths> ...] [flags]
Arguments:
[<paths> ...] Paths to format. Defaults to formatting the whole tree.
Flags:
-h, --help Show context-sensitive help.
--allow-missing-formatter Do not exit with error if a configured formatter is missing.
-C, --working-directory="." Run as if treefmt was started in the specified working directory instead of the current working directory.
--no-cache Ignore the evaluation cache entirely. Useful for CI.
-c, --clear-cache Reset the evaluation cache. Use in case the cache is not precise enough.
--config-file=STRING Load the config file from the given path (defaults to searching upwards for treefmt.toml or .treefmt.toml).
--fail-on-change Exit with error if any changes were made. Useful for CI.
-f, --formatters=FORMATTERS,... Specify formatters to apply. Defaults to all formatters.
--tree-root=STRING The root directory from which treefmt will start walking the filesystem (defaults to the directory containing the config file) ($PRJ_ROOT).
--tree-root-file=STRING File to search for to find the project root (if --tree-root is not passed).
--walk="auto" The method used to traverse the files within --tree-root. Currently supports 'auto', 'git' or 'filesystem'.
-v, --verbose Set the verbosity of logs e.g. -vv ($LOG_LEVEL).
-V, --version Print version.
-i, --init Create a new treefmt.toml.
-u, --on-unmatched=warn Log paths that did not match any formatters at the specified log level, with fatal exiting the process with an error. Possible values are <debug|info|warn|error|fatal>.
--stdin Format the context passed in via stdin.
--cpu-profile=STRING The file into which a cpu profile will be written.
--ci Runs treefmt in a CI mode, enabling --no-cache, --fail-on-change and adjusting some other settings best suited to a CI use case.
2.0.4
made its way into unstable recently: https://nixpkgs-tracker.ocfox.me/?pr=333200
Default in treefmt-nix
was recently bumped to 2.0.4
as well: https://github.com/numtide/treefmt-nix/pull/223
Regardless, we need a better story for versioning the docs.
I.e here it says: https://treefmt.com/usage#ci-integration
However current treefmt doesn't have a
--ci
flag