Skip to content

Commit fb4c65a

Browse files
authored
Merge pull request #11 from Technolution/rename_json_output
Rename json output to --json-stream
2 parents b9c4a05 + 3207e87 commit fb4c65a

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ members = [
88
[package]
99
name = "rustig"
1010
description = "A tool to detect code paths leading to Rust's panic handler"
11-
version = "0.1.0"
11+
version = "0.2.0"
1212
license = "MIT OR Apache-2.0"
1313
keywords = ["cli", "compilation", "proof"]
1414
homepage = "https://github.com/Technolution/rustig"

src/cmd_args.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub fn get_args() -> Result<(AnalysisOptions, OutputOptions)> {
5757

5858
let file_options = parse_config(config_opt.unwrap_or("rustig.toml"), required)?;
5959

60-
let rdp_options = AnalysisOptions {
60+
let rustig_options = AnalysisOptions {
6161
binary_path: Some(cmd_matches.value_of("binary").unwrap().to_string()), // Required by clap, can safely be unwrapped.
6262
crate_names,
6363
whitelisted_functions: file_options.function_whitelists,
@@ -69,10 +69,10 @@ pub fn get_args() -> Result<(AnalysisOptions, OutputOptions)> {
6969
let output_options = OutputOptions {
7070
verbose: cmd_matches.is_present("verbose"),
7171
silent: cmd_matches.is_present("silent"),
72-
json: cmd_matches.is_present("json"),
72+
json: cmd_matches.is_present("json-stream"),
7373
};
7474

75-
Ok((rdp_options, output_options))
75+
Ok((rustig_options, output_options))
7676
}
7777

7878
fn get_app_definition<'a, 'b>() -> App<'a, 'b> {
@@ -108,16 +108,15 @@ fn get_app_definition<'a, 'b>() -> App<'a, 'b> {
108108
.help("Turn on verbose mode for full stack traces of panic calls"),
109109
)
110110
.arg(
111-
Arg::with_name("json")
112-
.short("j")
113-
.long("json")
111+
Arg::with_name("json-stream")
112+
.long("json-stream")
114113
.conflicts_with("silent")
115114
.help("Output full stack traces of panic calls into JSON"),
116115
)
117116
.arg(
118117
Arg::with_name("config")
119118
.long("config")
120-
.help("Path to RDP configuration file (default: rdp.toml)")
119+
.help("Path to rustig! configuration file (default: rustig.toml)")
121120
.takes_value(true),
122121
)
123122
.arg(
@@ -141,7 +140,7 @@ fn get_app_definition<'a, 'b>() -> App<'a, 'b> {
141140
.value_name("CALLGRAPH")
142141
.long("callgraph")
143142
.short("g")
144-
.help("Write a callgraph of the given binary to a file. The output filename will be: `rdp-callgraph-{projectname}-{type}`, where `type` is either `full` or `filtered`. The full callgraph contains all function calls that are detected by RDP, while filtered callgraph only contains paths that possibly lead to panic calls")
143+
.help("Write a callgraph of the given binary to a file. The output filename will be: `rustig-callgraph-{projectname}-{type}`, where `type` is either `full` or `filtered`. The full callgraph contains all function calls that are detected by rustig!, while filtered callgraph only contains paths that possibly lead to panic calls")
145144
.possible_values(&CALL_GRAPH_BUILD_MODES),
146145
)
147146
}

src/output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! This module is concerned with formatting and outputting panic traces from [panic_analysis](../panic_analysis/fn.find_panics.html) to the standard output.
1212
//!
1313
//! ## Output modes
14-
//! The library offers two different output modes:
14+
//! The library offers three different output modes:
1515
//!
1616
//! ### 1. Simple
1717
//! The simple output mode prints the most relevant information about the panic trace. The output consists of one line per _panic_ trace.

0 commit comments

Comments
 (0)