From 448e6f2096b855bee1464c514dfb73477fb39774 Mon Sep 17 00:00:00 2001 From: Akshay Date: Sun, 20 Feb 2022 11:39:17 +0530 Subject: 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 --- bin/src/config.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/src/config.rs b/bin/src/config.rs index 0f09618..07b3f17 100644 --- a/bin/src/config.rs +++ b/bin/src/config.rs @@ -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, -- cgit v1.2.3