mirror of
https://github.com/zizmorcore/zizmor.git
synced 2025-12-23 08:47:33 +00:00
feat: add ZIZMOR_CONFIG (#789)
This commit is contained in:
parent
de2e68f63c
commit
1e123cfbe5
4 changed files with 15 additions and 2 deletions
|
|
@ -22,6 +22,11 @@ of `zizmor`.
|
|||
will redirect to the new one, but users should update any old
|
||||
links to limit confusion
|
||||
|
||||
### New Features 🌈
|
||||
|
||||
* `zizmor` now supports the `ZIZMOR_CONFIG` environment variable as an
|
||||
alternative to `--config` (#789)
|
||||
|
||||
## v1.7.0
|
||||
|
||||
This release comes with **four** new audits: [obfuscation], [stale-action-refs],
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Options:
|
|||
--color <MODE>
|
||||
Control the use of color in output [possible values: auto, always, never]
|
||||
-c, --config <CONFIG>
|
||||
The configuration file to load. By default, any config will be discovered relative to $CWD
|
||||
The configuration file to load. By default, any config will be discovered relative to $CWD [env: ZIZMOR_CONFIG=]
|
||||
--no-config
|
||||
Disable all configuration loading
|
||||
--no-exit-codes
|
||||
|
|
|
|||
|
|
@ -502,6 +502,14 @@ the `--config` argument. With `--config`, the file can be named anything:
|
|||
zizmor --config my-zizmor-config.yml /dir/to/audit
|
||||
```
|
||||
|
||||
!!! tip
|
||||
|
||||
Starting with `v1.8.0`, you can use the `ZIZMOR_CONFIG` environment
|
||||
variable to specify a configuration file.
|
||||
|
||||
`ZIZMOR_CONFIG=my-config.yml` is equivalent to
|
||||
`--config my-config.yml`.
|
||||
|
||||
[will discover it]: ./configuration.md#precedence
|
||||
|
||||
See [Configuration: `rules.<id>.ignore`](./configuration.md#rulesidignore) for
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ struct App {
|
|||
|
||||
/// The configuration file to load. By default, any config will be
|
||||
/// discovered relative to $CWD.
|
||||
#[arg(short, long, group = "conf")]
|
||||
#[arg(short, long, env = "ZIZMOR_CONFIG", group = "conf")]
|
||||
config: Option<Utf8PathBuf>,
|
||||
|
||||
/// Disable all configuration loading.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue