From 345e1981e9a30e3ec8a90885e54f547b36aac613 Mon Sep 17 00:00:00 2001 From: fedotoff Date: Mon, 21 Aug 2023 18:46:02 +0300 Subject: [PATCH] One more fix --- casr/src/bin/casr-cli.rs | 2 +- docs/usage.md | 26 +++++++++++++------------- libcasr/src/sarif.rs | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/casr/src/bin/casr-cli.rs b/casr/src/bin/casr-cli.rs index 0fd922e2..0fda29bc 100644 --- a/casr/src/bin/casr-cli.rs +++ b/casr/src/bin/casr-cli.rs @@ -88,7 +88,7 @@ fn main() -> Result<()> { .value_name("NAME") .default_value("CASR") .action(ArgAction::Set) - .help("Analysis tool providing results for report"), + .help("Tool name that detected crashes/errors for SARIF report"), ) .get_matches(); diff --git a/docs/usage.md b/docs/usage.md index f46af285..d4a795cd 100644 --- a/docs/usage.md +++ b/docs/usage.md @@ -288,25 +288,25 @@ Frames that match these regular expressions will be not considered during analys App provides text-based user interface to view CASR reports, prints joint statistics for all reports, and converts CASR reports to SARIF format. -Usage: casr-cli [OPTIONS] + Usage: casr-cli [OPTIONS] -Arguments: - CASR report file to view or directory with reports + Arguments: + CASR report file to view or directory with reports -Options: - -v, --view View mode [default: tree] [possible values: tree, slider, - stdout] - -u, --unique Print only unique crash lines in joint statistics - --sarif Generate SARIF report from CASR reports - --source-root Source root path in CASR reports for SARIF report generation - --tool Analysis tool providing results for report [default: CASR] - -h, --help Print help - -V, --version Print version + Options: + -v, --view View mode [default: tree] [possible values: tree, slider, + stdout] + -u, --unique Print only unique crash lines in joint statistics + --sarif Generate SARIF report from CASR reports + --source-root Source root path in CASR reports for SARIF report generation + --tool Analysis tool providing results for report [default: CASR] + -h, --help Print help + -V, --version Print version There are three view modes: tree, slider (list), and stdout. In stdout mode `casr-cli` prints text-based CASR report to stdout. -`casr-cli` could convert a directory with casr reports or single report into SARIF +`casr-cli` can convert a directory with casr reports or single report into SARIF report. You could load resulting SARIF report into IDE and continue crash analysis. diff --git a/libcasr/src/sarif.rs b/libcasr/src/sarif.rs index 5c413301..49f96f5e 100644 --- a/libcasr/src/sarif.rs +++ b/libcasr/src/sarif.rs @@ -326,7 +326,7 @@ where if let Ok(norm_source_path) = path.as_ref().lexiclean().as_path().strip_prefix(root) { norm_source_path.to_path_buf() } else { - path.as_ref().to_path_buf() + path.as_ref().lexiclean() } }