show only available out-formats

the json out-format is displayed only when statix is compiled
with

    cargo bulid --all-features
    # or
    cargo build --features=json
This commit is contained in:
Akshay 2022-02-20 11:39:17 +05:30
parent 58e24a596d
commit 448e6f2096

View File

@ -50,7 +50,8 @@ pub struct Check {
unrestricted: bool,
/// Output format.
/// Supported values: stderr, errfmt, json (on feature flag only)
#[cfg_attr(feature = "json", doc = "Supported values: stderr, errfmt, json")]
#[cfg_attr(not(feature = "json"), doc = "Supported values: stderr, errfmt")]
#[clap(short = 'o', long, default_value_t, parse(try_from_str))]
pub format: OutFormat,