Skip to content

Commit

Permalink
extend analyze command output
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyorgy Orban committed Jun 29, 2017
1 parent 3e5bfd0 commit d819efa
Show file tree
Hide file tree
Showing 14 changed files with 73 additions and 0 deletions.
8 changes: 8 additions & 0 deletions libcodechecker/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,3 +291,11 @@ def main(args):
LOG.debug("Analysis metadata write to '" + metadata_path + "'")
with open(metadata_path, 'w') as metafile:
json.dump(metadata, metafile)

LOG.info("Analysis finished.")
LOG.info("To view results in the terminal use the "
"\"CodeChecker parse\" command.")
LOG.info("To store results use the \"CodeChecker store\" command.")
LOG.info("See --help and the user guide for further options about"
" parsing and storing the reports.")
LOG.info("----=================----")
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make multi_error" --quiet-build --ana
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
multi_error.cpp:3:3: Address of stack memory associated with local variable 'x' returned to caller [core.StackAddressEscape]
return &x;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make multi_error" --quiet-build --ana
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
multi_error.cpp:9:3: Value stored to 'y' is never read [deadcode.DeadStores]
y = 7;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make multi_error" --quiet-build --ana
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
multi_error.cpp:3:3: Address of stack memory associated with local variable 'x' returned to caller [core.StackAddressEscape]
return &x;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make multi_error" --quiet-build --ana
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
multi_error.cpp:3:3: Address of stack memory associated with local variable 'x' returned to caller [core.StackAddressEscape]
return &x;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ QUICKCHECK#CodeChecker quickcheck --build "make multi_error" --quiet-build --ana
[] - Total compilation commands: 1
[] - Skipped compilation commands: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make multi_error_suppress" --quiet-bu
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
multi_error_suppress.cpp:3:3: Address of stack memory associated with local variable 'x' returned to caller [core.StackAddressEscape]
return &x;
^
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/analyze_and_parse/test_files/nofail.output
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ QUICKCHECK#CodeChecker quickcheck --build "make nofail" --quiet-build --analyzer
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
clangsa found no defects while analyzing nofail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,9 @@ QUICKCHECK#CodeChecker quickcheck --build "make nofail" --quiet-build --analyzer
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
clangsa found no defects while analyzing nofail.cpp
5 changes: 5 additions & 0 deletions tests/functional/analyze_and_parse/test_files/simple1.output
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make simple1" --quiet-build --analyze
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
simple1.cpp:18:15: Division by zero [core.DivideZero]
return 2015 / x;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make simple1" --quiet-build --analyze
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
simple1.cpp:18:15: Division by zero [core.DivideZero]
return 2015 / x;
^
Expand Down
5 changes: 5 additions & 0 deletions tests/functional/analyze_and_parse/test_files/simple2.output
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make simple2" --quiet-build --analyze
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
simple2.cpp:17:14: Division by zero [core.DivideZero]
return 2015 / x;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make simple2" --quiet-build --analyze
[] - Successfully analyzed
[] - clangsa: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
simple2.cpp:17:14: Division by zero [core.DivideZero]
return 2015 / x;
^
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ QUICKCHECK#CodeChecker quickcheck --build "make tidy_check" --quiet-build --anal
[] - Successfully analyzed
[] - clang-tidy: 1
[] - ----=================----
[] - Analysis finished.
[] - To view results in the terminal use the "CodeChecker parse" command.
[] - To store results use the "CodeChecker store" command.
[] - See --help and the user guide for further options about parsing and storing the reports.
[] - ----=================----
tidy_check.cpp:5:5: found assert() with side effect [misc-assert-side-effect]
assert(++i);
^
Expand Down

0 comments on commit d819efa

Please sign in to comment.