isbecker/treefmt GitHub Action
Installs and runs treefmt on your repository
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| version | Version of treefmt to install and use. Allowed values: - "latest" (default): install the latest available version, determined via GitHub releases - "system": use the system-provided version (no install), for usage with e.g., treefmt.nix - SemVer (e.g. "1.2.3"), to install a specific version | yes | latest |
| github-token | GitHub token for accessing the API. Used to allow this action to download and install treefmt releases from GitHub. | yes | — |
| config-file | Path to a treefmt configuration file. If not provided, treefmt will search upwards for treefmt.toml or .treefmt.toml from the working directory. Set working_dir input to change the working directory. | no | — |
| allow-missing-formatter | Do not exit with error if a configured formatter is missing | no | — |
| working-dir | Run as if treefmt was started in the specified working directory instead of the current working directory. | no | — |
| 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. Recommended when using treefmt in CI workflows, like this action. | no | true |
| no-cache | Ignore the evaluation cache entirely. Useful for CI. | no | — |
| fail-on-change | Exit with error if any changes were made. Useful for CI. | no | — |
| formatters | Specify formatters to apply. Defaults to all formatters. | no | — |
| tree-root | The root directory from which treefmt will start walking the filesystem. Defaults to the root of the current git or jujutsu worktree. If not in a git or jujutsu repo, defaults to the directory containing the config file. | no | — |
| tree-root-file | File to search for to find the tree root. | no | — |
| tree-root-cmd | Command to run to find the tree root. It is parsed using shlex, to allow quoting arguments that contain whitespace. If you wish to pass arguments containing quotes, you should use nested quotes e.g. "'" or '"'. | no | — |
| walk | The method used to traverse the files within tree root. Allowed values: - "auto": automatically choose the best method (default) - "git": use git to list files - "jujutsu": use jujutsu to list files - "filesystem": traverse the filesystem directly | no | — |
| verbose | Set the verbosity of logs. | no | — |
| quiet | Disable all logs except errors. | no | — |
| on-unmatched | Log paths that did not match any formatters at the specified log level. Defaults to "info". Allowed values: - "debug" - "info" - "warn" - "error" - "fatal" | no | — |
| clear-cache | Reset the evaluation cache. Use in case the cache is not precise enough. | no | — |
| excludes | Exclude files or directories matching the specified globs. | no | — |
Outputs
no outputs