diff --git a/README.md b/README.md index 1e97d8da36..c2968a988a 100644 --- a/README.md +++ b/README.md @@ -194,11 +194,12 @@ Check your project using SQLite database. The database will be placed in your workspace directory (`~/.codechecker` by default), which can be provided via the `-w` flag. -Start a CodeChecker web and storage server in another terminal or as a background process. By default it will listen on `localhost:8001'. +Start a CodeChecker web and storage server in another terminal or as a +background process. By default it will listen on `localhost:8001`. CodeChecker server -Analyze your project with the check command. +Analyze your project with the check command: CodeChecker check -n test-check -b "cd ~/your-project && make clean && make" diff --git a/bin/CodeChecker.py b/bin/CodeChecker.py index 7795a1772e..9b5f08cb22 100755 --- a/bin/CodeChecker.py +++ b/bin/CodeChecker.py @@ -53,12 +53,13 @@ def signal_handler(sig, frame): Please specify a subcommand to access individual features.""", epilog="""Example scenario: Analyzing, and storing results ------------------------------------------------ +Start the server where the results will be stored and can be viewed +after the analysis is done: + CodeChecker server + Analyze a project with default settings: CodeChecker check -b "cd ~/myproject && make" -n myproject -Start the viewer to see the results: - CodeChecker server - The results can be viewed: * In a web browser: http://localhost:8001 * In the command line: diff --git a/docs/user_guide.md b/docs/user_guide.md index 62ce736ec9..f0420bf22a 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -793,7 +793,7 @@ CodeChecker analyze ../codechecker_myProject_build.log -o ./my_plists then the results of the analysis can be stored with this command: ~~~~ -CodeChecker store ./my_plists +CodeChecker store ./my_plists -n my_project ~~~~ @@ -1202,11 +1202,7 @@ optional arguments: ### Show differences between two runs (`diff`) This mode shows analysis results (in the same format as `results`) does, but -from the comparison of two runs. The command can be used in *local* or *remote* compare -modes. In *local mode* the results of a local analysis (see CodeChecker analyze command) -can be compared to the results stored on a remote CodeChecker server. In *remote* -compare mode two runs stored on a remote CodeChekcer server can be compared to each -other. +from the comparison of two runs. ~~~~~~~~~~~~~~~~~~~~~ usage: CodeChecker cmd diff [-h] -b BASE_RUN -n NEW_RUN [-s] [--filter FILTER] @@ -1243,6 +1239,23 @@ comparison modes: 'new' run. ~~~~~~~~~~~~~~~~~~~~~ +The command can be used in *local* or *remote* compare modes. + +In *local mode* the results of a local analysis (see `CodeChecker analyze`) +can be compared to the results stored (see `CodeChecker store`) on a remote +CodeChecker server: + +~~~~~~~~~~~~~~~~~~~~~ +CodeChecker cmd diff -p 8001 --basename my_project --newname ./my_updated_plists --new +~~~~~~~~~~~~~~~~~~~~~ + +In *remote* compare mode, two runs stored on a remote CodeChecker server can +be compared to each other: + +~~~~~~~~~~~~~~~~~~~~~ +CodeChecker cmd diff -p 8001 --basename my_project --newname my_new_checkin --new +~~~~~~~~~~~~~~~~~~~~~ + ### Show summarised count of results (`sum`) ~~~~~~~~~~~~~~~~~~~~~ @@ -1390,7 +1403,7 @@ action is used to perform an authentication in the command-line. optional arguments: -h, --help show this help message and exit -u USERNAME, --username USERNAME - The username to authenticate with. (default: ericsza) + The username to authenticate with. (default: ) -d, --deactivate, --logout Send a logout request to end your privileged session. ~~~~~~~~~~~~~~~~~~~~~