Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd diff -o html does not work if -n is a report directory #1277

Closed
dkrupp opened this issue Jan 4, 2018 · 0 comments
Closed

cmd diff -o html does not work if -n is a report directory #1277

dkrupp opened this issue Jan 4, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@dkrupp
Copy link
Member

dkrupp commented Jan 4, 2018

CodeChecker cmd diff --url http://localhost:15002/Default -b redis_2017-12-08_19:51:44_noXTU -n /home/xtu-service/projects/curl/build/.xtu-out-xtu/ --new -o html --export-dir ~/test-postgres-html --verbose debug
[2018-01-03 19:13:30] {CONTEXT} [7210] <139756435293952> - generic_package_context.py:337 get_context() - Loading package config.
[2018-01-03 19:13:30] {CONTEXT} [7210] <139756435293952> - generic_package_context.py:342 get_context() - Reading config: /mnt/storage/ednikru/codechecker/build/CodeChecker/config/config.json
[2018-01-03 19:13:30] {CONTEXT} [7210] <139756435293952> - generic_package_context.py:346 get_context() - {u'environment_variables': {u'ld_preload': u'LD_PRELOAD', u'cc_logger_compiles': u'CC_LOGGER_GCC_LIKE', u'cc_logger_bin': u'CC_LOGGER_BIN', u'codechecker_workspace': u'CODECHECKER_WORKSPACE', u'cc_logger_file': u'CC_LOGGER_FILE', u'env_ld_lib_path': u'LD_LIBRARY_PATH', u'env_path': u'PATH', u'env_package_root': u'CC_PACKAGE_ROOT'}, u'available_profiles': {u'default': u'High-quality standard checks with a low false positive rate.', u'sensitive': u'Default checks + more comprehensive checks with a low false positive rate.', u'extreme': u'Sensitive checks + more comprehensive checks with a manageable false positive rate.'}, u'checker_config': {u'clang-tidy_checkers': {u'google-build-using-namespace': [u'sensitive', u'extreme'], u'misc-move-forwarding-reference': [u'default', u'sensitive', u'extreme'], u'cert-err52-cpp': [u'sensitive', u'extreme'], u'cppcoreguidelines-interfaces-global-init': [u'extreme'], u'google-runtime-member-string-references': [u'sensitive', u'extreme'], u'misc-string-compare': [u'default', u'sensitive', u'extreme'], u'bugprone-integer-division': [u'default', u'sensitive', u'extreme'], u'performance-type-promotion-in-math-fn': [u'sensitive', u'extreme'], u'misc-misplaced-widening-cast': [u'default', u'sensitive', u'extreme'], u'misc-unused-alias-decls': [u'sensitive', u'extreme'], u'misc-use-after-move': [u'default', u'sensitive', u'extreme'], u'misc-suspicious-semicolon': [u'default', u'sensitive', u'extreme'], u'cert-dcl59-cpp': [u'sensitive', u'extreme'], u'misc-inefficient-algorithm': [u'default', u'sensitive', u'extreme'], u'misc-macro-repeated-side-effects': [u'default', u'sensitive', u'extreme'], u'mpi-buffer-deref': [u'sensitive', u'extreme'], u'cppcoreguidelines-pro-type-static-cast-downcast': [u'sensitive', u'extreme'], u'misc-lambda-function-name': [u'default', u'sensitive', u'extreme'], u'cppcoreguidelines-pro-type-member-init': [u'extreme'], u'performance-for-range-copy': [u'sensitive', u'extreme'], u'misc-assert-side-effect': [u'default', u'sensitive', u'extreme'], u'performance-faster-string-find': [u'sensitive', u'extreme'], u'misc-argument-comment': [u'sensitive', u'extreme'], u'cert-err58-cpp': [u'sensitive', u'extreme'], u'performance-inefficient-string-concatenation': [u'sensitive', u'extreme'], u'misc-sizeof-container': [u'default', u'sensitive', u'extreme'], u'cppcoreguidelines-no-malloc': [u'sensitive', u'extreme'], u'performance-unnecessary-copy-initialization': [u'sensitive', u'extreme'], u'cppcoreguidelines-owning-memory': [u'sensitive', u'extreme'], u'misc-non-copyable-objects': [u'default', u'sensitive', u'extreme'], u'cert-dcl58-cpp': [u'default', u'sensitive', u'extreme'], u'misc-forward-declaration-namespace': [u'default', u'sensitive', u'extreme'], u'cert-env33-c': [u'sensitive', u'extreme'], u'cert-dcl21-cpp': [u'sensitive', u'extreme'], u'misc-string-constructor': [u'default', u'sensitive', u'extreme'], u'misc-inaccurate-erase': [u'default', u'sensitive', u'extreme'], u'misc-uniqueptr-reset-release': [u'default', u'sensitive', u'extreme'], u'cppcoreguidelines-special-member-functions': [u'default', u'sensitive', u'extreme'], u'performance-inefficient-vector-operation': [u'sensitive', u'extreme'], u'misc-move-constructor-init': [u'default', u'sensitive', u'extreme'], u'cert-msc50-cpp': [u'sensitive', u'extreme'], u'misc-dangling-handle': [u'default', u'sensitive', u'extreme'], u'misc-unused-raii': [u'default', u'sensitive', u'extreme'], u'misc-bool-pointer-implicit-conversion': [u'default', u'sensitive', u'extreme'], u'misc-string-literal-with-embedded-nul': [u'default', u'sensitive', u'extreme'], u'misc-string-integer-assignment': [u'sensitive', u'extreme'], u'misc-suspicious-missing-comma': [u'default', u'sensitive', u'extreme'], u'modernize-replace-random-shuffle': [u'sensitive', u'extreme'], u'misc-sizeof-expression': [u'default', u'sensitive', u'extreme'], u'bugprone-suspicious-memset-usage': [u'default', u'sensitive', u'extreme'], u'misc-suspicious-string-compare': [u'sensitive', u'extreme'], u'misc-unused-using-decls': [u'sensitive', u'extreme'], u'misc-static-assert': [u'sensitive', u'extreme'], u'bugprone-undefined-memory-manipulation': [u'default', u'sensitive', u'extreme'], u'misc-swapped-arguments': [u'default', u'sensitive', u'extreme'], u'cert-dcl50-cpp': [u'sensitive', u'extreme'], u'misc-unconventional-assign-operator': [u'default', u'sensitive', u'extreme'], u'modernize-replace-auto-ptr': [u'sensitive', u'extreme'], u'google-default-arguments': [u'extreme'], u'google-build-namespaces': [u'default', u'sensitive', u'extreme'], u'misc-misplaced-const': [u'default', u'sensitive', u'extreme'], u'misc-forwarding-reference-overload': [u'default', u'sensitive', u'extreme'], u'boost-use-to-string': [u'sensitive', u'extreme'], u'modernize-deprecated-headers': [u'sensitive', u'extreme'], u'google-runtime-operator': [u'sensitive', u'extreme'], u'misc-suspicious-enum-usage': [u'default', u'sensitive', u'extreme'], u'performance-unnecessary-value-param': [u'sensitive', u'extreme'], u'cert-err34-c': [u'extreme'], u'misc-redundant-expression': [u'default', u'sensitive', u'extreme'], u'misc-undelegated-constructor': [u'default', u'sensitive', u'extreme'], u'performance-implicit-conversion-in-loop': [u'sensitive', u'extreme'], u'google-explicit-constructor': [u'sensitive', u'extreme'], u'misc-definitions-in-headers': [u'default', u'sensitive', u'extreme'], u'misc-multiple-statement-macro': [u'sensitive', u'extreme'], u'cppcoreguidelines-slicing': [u'sensitive', u'extreme'], u'cert-flp30-c': [u'sensitive', u'extreme'], u'misc-virtual-near-miss': [u'default', u'sensitive', u'extreme'], u'misc-new-delete-overloads': [u'default', u'sensitive', u'extreme'], u'google-build-explicit-make-pair': [u'sensitive', u'extreme'], u'misc-move-const-arg': [u'default', u'sensitive', u'extreme'], u'cppcoreguidelines-pro-type-reinterpret-cast': [u'sensitive', u'extreme'], u'misc-fold-init-type': [u'default', u'sensitive', u'extreme'], u'misc-incorrect-roundings': [u'default', u'sensitive', u'extreme'], u'misc-noexcept-move-constructor': [u'default', u'sensitive', u'extreme'], u'mpi-type-mismatch': [u'sensitive', u'extreme'], u'google-global-names-in-headers': [u'default', u'sensitive', u'extreme'], u'cppcoreguidelines-pro-type-const-cast': [u'extreme'], u'misc-throw-by-value-catch-by-reference': [u'default', u'sensitive', u'extreme']}, u'clangsa_checkers': {u'nullability.NullablePassedToNonnull': [u'sensitive', u'extreme'], u'alpha.core.TestAfterDivZero': [u'sensitive', u'extreme'], u'core.CallAndMessage': [u'default', u'sensitive', u'extreme'], u'alpha.unix.Stream': [u'sensitive', u'extreme'], u'security.FloatLoopCounter': [u'default', u'sensitive', u'extreme'], u'alpha.unix.Chroot': [u'sensitive', u'extreme'], u'apiModeling.google.GTest': [u'default', u'sensitive', u'extreme'], u'alpha.core.BoolAssignment': [u'sensitive', u'extreme'], u'core.uninitialized.ArraySubscript': [u'default', u'sensitive', u'extreme'], u'alpha.core.FixedAddr': [u'extreme'], u'alpha.unix.PthreadLock': [u'sensitive', u'extreme'], u'core.uninitialized.Assign': [u'default', u'sensitive', u'extreme'], u'cplusplus.SelfAssignment': [u'default', u'sensitive', u'extreme'], u'nullability.NullPassedToNonnull': [u'default', u'sensitive', u'extreme'], u'core.uninitialized.Branch': [u'default', u'sensitive', u'extreme'], u'core.NullDereference': [u'default', u'sensitive', u'extreme'], u'optin.portability.UnixAPI': [u'sensitive', u'extreme'], u'deadcode.DeadStores': [u'default', u'sensitive', u'extreme'], u'unix.Malloc': [u'default', u'sensitive', u'extreme'], u'alpha.security.ArrayBoundV2': [u'extreme'], u'alpha.unix.BlockInCriticalSection': [u'sensitive', u'extreme'], u'alpha.security.ArrayBound': [u'extreme'], u'alpha.core.DynamicTypeChecker': [u'sensitive', u'extreme'], u'valist.Unterminated': [u'default', u'sensitive', u'extreme'], u'valist.Uninitialized': [u'default', u'sensitive', u'extreme'], u'core.StackAddressEscape': [u'default', u'sensitive', u'extreme'], u'alpha.cplusplus.MisusedMovedObject': [u'sensitive', u'extreme'], u'security.insecureAPI.UncheckedReturn': [u'default', u'sensitive', u'extreme'], u'unix.MallocSizeof': [u'default', u'sensitive', u'extreme'], u'security.insecureAPI.gets': [u'default', u'sensitive', u'extreme'], u'security.insecureAPI.mkstemp': [u'default', u'sensitive', u'extreme'], u'alpha.cplusplus.DeleteWithNonVirtualDtor': [u'sensitive', u'extreme'], u'alpha.core.Conversion': [u'sensitive', u'extreme'], u'alpha.unix.SimpleStream': [u'sensitive', u'extreme'], u'unix.StdCLibraryFunctions': [u'default', u'sensitive', u'extreme'], u'unix.MismatchedDeallocator': [u'default', u'sensitive', u'extreme'], u'nullability.NullableDereferenced': [u'sensitive', u'extreme'], u'alpha.core.SizeofPtr': [u'sensitive', u'extreme'], u'alpha.security.taint.TaintPropagation': [u'sensitive', u'extreme'], u'nullability.NullableReturnedFromNonnull': [u'sensitive', u'extreme'], u'alpha.core.CastSize': [u'sensitive', u'extreme'], u'security.insecureAPI.getpw': [u'default', u'sensitive', u'extreme'], u'cplusplus.NewDelete': [u'default', u'sensitive', u'extreme'], u'alpha.unix.cstring.NotNullTerminated': [u'sensitive', u'extreme'], u'nullability.NullReturnedFromNonnull': [u'default', u'sensitive', u'extreme'], u'core.DivideZero': [u'default', u'sensitive', u'extreme'], u'security.insecureAPI.vfork': [u'default', u'sensitive', u'extreme'], u'unix.cstring.NullArg': [u'default', u'sensitive', u'extreme'], u'unix.API': [u'default', u'sensitive', u'extreme'], u'alpha.core.IdenticalExpr': [u'extreme'], u'unix.cstring.BadSizeArg': [u'default', u'sensitive', u'extreme'], u'core.builtin.NoReturnFunctions': [u'default', u'sensitive', u'extreme'], u'alpha.security.MallocOverflow': [u'sensitive', u'extreme'], u'alpha.unix.cstring.OutOfBounds': [u'sensitive', u'extreme'], u'alpha.unix.cstring.BufferOverlap': [u'sensitive', u'extreme'], u'alpha.core.CallAndMessageUnInitRefArg': [u'extreme'], u'core.uninitialized.CapturedBlockVariable': [u'default', u'sensitive', u'extreme'], u'core.uninitialized.UndefReturn': [u'default', u'sensitive', u'extreme'], u'security.insecureAPI.mktemp': [u'default', u'sensitive', u'extreme'], u'optin.mpi.MPI-Checker': [u'sensitive', u'extreme'], u'valist.CopyToSelf': [u'default', u'sensitive', u'extreme'], u'unix.Vfork': [u'default', u'sensitive', u'extreme'], u'core.builtin.BuiltinFunctions': [u'default', u'sensitive', u'extreme'], u'alpha.cplusplus.IteratorRange': [], u'security.insecureAPI.rand': [u'default', u'sensitive', u'extreme'], u'core.DynamicTypePropagation': [u'default', u'sensitive', u'extreme'], u'alpha.security.ReturnPtrRange': [u'sensitive', u'extreme'], u'core.UndefinedBinaryOperatorResult': [u'default', u'sensitive', u'extreme'], u'cplusplus.NewDeleteLeaks': [u'default', u'sensitive', u'extreme'], u'core.NonNullParamChecker': [u'default', u'sensitive', u'extreme'], u'core.VLASize': [u'default', u'sensitive', u'extreme']}}}
[2018-01-03 19:13:30] {CONTEXT} [7210] <139756435293952> - generic_package_context.py:348 get_context() - Loading layout config.
[2018-01-03 19:13:30] {CONTEXT} [7210] <139756435293952> - generic_package_context.py:352 get_context() - /mnt/storage/ednikru/codechecker/build/CodeChecker/config/package_layout.json
[2018-01-03 19:13:30] {CONTEXT} [7210] <139756435293952> - generic_package_context.py:360 get_context() - {u'checker_md_docs': u'www/docs/checker_md_docs', u'bin': u'bin', u'www': u'www', u'gencodechecker': u'lib/python2.7/gencodechecker', u'docs': u'www/docs', u'checkers_severity_map_file': u'config/checker_severity_map.json', u'lib_plist_to_html': u'lib/python2.7/plist_to_html', u'analyzers': {u'clangsa': u'clang', u'clang-tidy': u'clang-tidy'}, u'ld_logger_lib_path': u'ld_logger/lib', u'web_client_dojo': u'www/scripts/plugins/dojo', u'plist_to_html_bin': u'bin/plist-to-html', u'ld_logger_bin': u'bin/ldlogger', u'plist_to_html_dist_path': u'plist_to_html/dist', u'plist_to_html': u'plist_to_html', u'web_client_codemirror': u'www/scripts/plugins/codemirror', u'ld_logger': u'ld_logger', u'lib': u'lib', u'plugin': u'plugin', u'web_client_jsplumb': u'www/scripts/plugins/jsplumb', u'config_db_migrate': u'lib/python2.7/config_migrate', u'gdb_config_file': u'config/gdbScript.gdb', u'libcodechecker': u'lib/python2.7/libcodechecker', u'web_client_highlightjs': u'www/scripts/plugins/highlightjs', u'web_client_plugins': u'www/scripts/plugins', u'run_db_migrate': u'lib/python2.7/run_migrate', u'web_client_marked': u'www/scripts/plugins/marked', u'cc_bin': u'cc_bin', u'version_file': u'config/version.json', u'js_thrift': u'www/scripts/plugins/thrift', u'userguide': u'www/userguide', u'config': u'config', u'ld_logger_lib_name': u'ldlogger.so', u'web_client': u'www/scripts/codechecker-api', u'ctu_func_map_cmd': u'clang-func-mapping'}
[2018-01-03 19:13:30] {UTIL} [7210] <139756435293952> - util.py:282 split_product_url() - Parsing product url 'http://localhost:15002/Default'
[2018-01-03 19:13:30] {UTIL} [7210] <139756435293952> - util.py:323 split_product_url() - Result: With 'http' on server 'localhost:15002', product 'Default'
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:439 init() - Loading session config
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:445 init() - /home/ednikru/.codechecker.passwords.json
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:147 load_session_cfg() - Failed to open user authentication file: /home/ednikru/.codechecker.passwords.json
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:462 init() - /home/ednikru/.codechecker.session.json
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:439 init() - Loading session config
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:445 init() - /home/ednikru/.codechecker.passwords.json
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:147 load_session_cfg() - Failed to open user authentication file: /home/ednikru/.codechecker.passwords.json
[2018-01-03 19:13:30] {SESSION MANAGER} [7210] <139756435293952> - session_manager.py:462 init() - /home/ednikru/.codechecker.session.json
[2018-01-03 19:13:30] {CLIENT} [7210] <139756435293952> - client.py:274 setup_client() - returning service client
[2018-01-03 19:13:30] {CMD} - cmd_line_client.py:490 handle_diff_results() - Matching against runs: redis_2017-12-08_19:51:44_noXTU
[2018-01-03 19:13:30] {CMD} [7210] <139756435293952> - cmd_line_client.py:219 get_report_dir_results() - Parsing:/home/xtu-service/projects/curl/build/.xtu-out-xtu/url.c_93f7ccaabf8f54fc01ac248e7c249d55.plist
[2018-01-03 19:13:30] {PLIST_PARSER} [7210] <139756435293952> - plist_parser.py:81 parse_plist() - Parsing plist: /home/xtu-service/projects/curl/build/.xtu-out-xtu/url.c_93f7ccaabf8f54fc01ac248e7c249d55.plist
[2018-01-03 19:13:30] {SUPPRESS HANDLER} [7210] <139756435293952> - suppress_handler.py:141 check_source_suppress() - Checking for suppress comment in the source file: /mnt/storage/xtu_service/projects/curl/build/lib/url.c
[2018-01-03 19:13:30] {SUPPRESS HANDLER} [7210] <139756435293952> - suppress_handler.py:177 check_source_suppress() - Suppress comment found: False
Generating HTML output files to file:///home/ednikru/test-postgres-html directory:

{
"category": "Dead store",
"check_name": "deadcode.DeadStores",
"description": "Value stored to 'result' is never read",
"issue_context": "Curl_open",
"issue_context_kind": "function",
"issue_hash_content_of_line_in_context": "8888b9ed2b6e8c46247647b14b34af82",
"issue_hash_function_offset": "26",
"location": {
"col": 5,
"file": 0,
"file_name": "/mnt/storage/xtu_service/projects/curl/build/lib/url.c",
"line": 653
},
"type": "Dead assignment"
}
Traceback (most recent call last):
File "/mnt/storage/ednikru/codechecker/build/CodeChecker/cc_bin/CodeChecker.py", line 101, in main
args.func(args)
File "/mnt/storage/ednikru/codechecker/build/CodeChecker/lib/python2.7/libcodechecker/libhandlers/cmd.py", line 241, in __handle
cmd_line_client.handle_diff_results(args)
File "/mnt/storage/ednikru/codechecker/build/CodeChecker/lib/python2.7/libcodechecker/cmd/cmd_line_client.py", line 512, in handle_diff_results
print_reports(client, results, args.output_format)
File "/mnt/storage/ednikru/codechecker/build/CodeChecker/lib/python2.7/libcodechecker/cmd/cmd_line_client.py", line 411, in print_reports
report_to_html(client, reports, output_dir)
File "/mnt/storage/ednikru/codechecker/build/CodeChecker/lib/python2.7/libcodechecker/cmd/cmd_line_client.py", line 369, in report_to_html
file_report_map[report.fileId].append(report)
AttributeError: 'Report' object has no attribute 'fileId'

@dkrupp dkrupp self-assigned this Jan 4, 2018
@dkrupp dkrupp added the bug 🐛 label Jan 4, 2018
@dkrupp dkrupp added this to the release 6.3.1 milestone Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant