You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// Output a diff against a pre-existing snapshot.
44
+
///
45
+
/// By default the comparison is done with .gas-snapshot.
43
46
#[clap(
44
-
help = "Compare against a snapshot and display changes from the snapshot. Takes an optional snapshot file, [default: .gas-snapshot]",
45
47
conflicts_with = "snap",
46
48
long,
47
49
value_hint = ValueHint::FilePath,
48
50
value_name = "SNAPSHOT_FILE",
49
51
)]
50
52
diff:Option<Option<PathBuf>>,
51
53
54
+
/// Compare against a pre-existing snapshot, exiting with code 1 if they do not match.
55
+
///
56
+
/// Outputs a diff if the snapshots do not match.
57
+
///
58
+
/// By default the comparison is done with .gas-snapshot.
52
59
#[clap(
53
-
help = "Run snapshot in 'check' mode and compares against an existing snapshot file, [default: .gas-snapshot]. Exits with 0 if snapshots match. Exits with 1 and prints a diff otherwise",
54
60
conflicts_with = "diff",
55
61
long,
56
62
value_hint = ValueHint::FilePath,
57
63
value_name = "SNAPSHOT_FILE",
58
64
)]
59
65
check:Option<Option<PathBuf>>,
60
66
61
-
#[clap(help = "How to format the output.", long)]
67
+
// Hidden because there is only one option
68
+
#[clap(help = "How to format the output.", long, hide(true))]
62
69
format:Option<Format>,
63
70
64
71
#[clap(
@@ -139,9 +146,9 @@ impl FromStr for Format {
139
146
/// Additional filters that can be applied on the test results
140
147
#[derive(Debug,Clone,Parser,Default)]
141
148
structSnapshotConfig{
142
-
#[clap(help = "sort results by ascending gas used.", long)]
149
+
#[clap(help = "Sort results by gas used (ascending).", long)]
143
150
asc:bool,
144
-
#[clap(help = "sort results by descending gas used.", conflicts_with = "asc", long)]
151
+
#[clap(help = "Sort results by gas used (descending).", conflicts_with = "asc", long)]
145
152
desc:bool,
146
153
#[clap(help = "Only include tests that used more gas that the given amount.", long)]
0 commit comments