Skip to content

Commit

Permalink
Merge pull request Ericsson#2388 from csordasmarton/cmd_diff_with_mul…
Browse files Browse the repository at this point in the history
…tiple_dirs

[cmd] cmd diff with multiple dirs
  • Loading branch information
Gyorgy Orban authored Dec 14, 2019
2 parents 8446918 + 334a532 commit 4aac198
Show file tree
Hide file tree
Showing 6 changed files with 239 additions and 119 deletions.
34 changes: 20 additions & 14 deletions docs/web/user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,9 @@ This mode shows analysis results (in the same format as `results`) does, but
from the comparison of two runs.

```
usage: CodeChecker cmd diff [-h] -b BASE_RUN -n NEW_RUN [--uniqueing {on,off}]
usage: CodeChecker cmd diff [-h] [-b BASE_RUNS [BASE_RUNS ...]]
[-n NEW_RUNS [NEW_RUNS ...]]
[--uniqueing {on,off}]
[--report-hash [REPORT_HASH [REPORT_HASH ...]]]
[--review-status [REVIEW_STATUS [REVIEW_STATUS ...]]]
[--detection-status [DETECTION_STATUS [DETECTION_STATUS ...]]]
Expand All @@ -903,22 +905,26 @@ Compare two analysis runs to show the results that differ between the two.
optional arguments:
-h, --help show this help message and exit
-b BASE_RUN, --basename BASE_RUN
The 'base' (left) side of the difference: this
analysis run is used as the initial state in the
comparison. The basename can contain * quantifiers
-b BASE_RUNS [BASE_RUNS ...], --basename BASE_RUNS [BASE_RUNS ...]
The 'base' (left) side of the difference: these
analysis runs are used as the initial state in the
comparison. The parameter can be multiple run names
(on the remote server) or multiple local report
directories (result of the analyze command). In case
of run name the the basename can contain * quantifiers
which matches any number of characters (zero or more).
So if you have run-a-1, run-a-2 and run-b-1 then
"run-a*" selects the first two.
-n NEW_RUN, --newname NEW_RUN
The 'new' (right) side of the difference: this
analysis run is compared to the -b/--basename run. The
parameter can be a run name(on the remote server) or a
local report directory (result of the analyze
command). In case of run name the newname can contain
* quantifiers which matches any number of characters
(zero or more). So if you have run-a-1, run-a-2 and
run-b-1 then "run-a*" selects the first two.
-n NEW_RUNS [NEW_RUNS ...], --newname NEW_RUNS [NEW_RUNS ...]
The 'new' (right) side of the difference: these
analysis runs are compared to the -b/--basename runs.
The parameter can be multiple run names (on the remote
server) or multiple local report directories (result
of the analyze command). In case of run name the
newname can contain * quantifiers which matches any
number of characters (zero or more). So if you have
run-a-1, run-a-2 and run-b-1 then "run-a*" selects the
first two.
comparison modes:
--new Show results that didn't exist in the 'base' but
Expand Down
53 changes: 26 additions & 27 deletions web/client/codechecker_client/cmd/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,38 +373,37 @@ def __register_diff(parser):

parser.add_argument('-b', '--basename',
type=str,
dest="basename",
metavar='BASE_RUN',
required=True,
nargs='+',
dest="base_run_names",
metavar='BASE_RUNS',
default=argparse.SUPPRESS,
help="The 'base' (left) side of the difference: this "
"analysis run is used as the initial state in "
"the comparison. The parameter can be a run name "
"(on the remote server) or a local report "
"directory (result of the analyze command). In "
"case of run name the the basename can contain * "
"quantifiers which matches any number of "
"characters (zero or more). So if you have "
"run-a-1, run-a-2 and run-b-1 "
"then \"run-a*\" selects the first two.")
help="The 'base' (left) side of the difference: these "
"analysis runs are used as the initial state in "
"the comparison. The parameter can be multiple "
"run names (on the remote server) or multiple "
"local report directories (result of the analyze "
"command). In case of run name the the basename "
"can contain * quantifiers which matches any "
"number of characters (zero or more). So if you "
"have run-a-1, run-a-2 and run-b-1 then "
"\"run-a*\" selects the first two.")

parser.add_argument('-n', '--newname',
type=str,
dest="newname",
metavar='NEW_RUN',
required=True,
nargs='+',
dest="new_run_names",
metavar='NEW_RUNS',
default=argparse.SUPPRESS,
help="The 'new' (right) side of the difference: this "
"analysis run is compared to the -b/--basename "
"run. The parameter can be a run name "
"(on the remote server) or a local "
"report directory "
"(result of the analyze command). In case of run "
"name the newname can contain * quantifiers "
"which matches any number of characters "
"(zero or more). So if you have "
"run-a-1, run-a-2 and run-b-1 "
"then \"run-a*\" selects the first two.")
help="The 'new' (right) side of the difference: these "
"analysis runs are compared to the -b/--basename "
"runs. The parameter can be multiple run names "
"(on the remote server) or multiple local "
"report directories (result of the analyze "
"command). In case of run name the newname can "
"contain * quantifiers which matches any number "
"of characters (zero or more). So if you have "
"run-a-1, run-a-2 and run-b-1 then "
"\"run-a*\" selects the first two.")

__add_filtering_arguments(parser, DEFAULT_FILTER_VALUES, True)

Expand Down
Loading

0 comments on commit 4aac198

Please sign in to comment.