{"id":19520931,"url":"https://github.com/sebastianbach/cpp-check-suite","last_synced_at":"2026-06-18T07:32:12.104Z","repository":{"id":241889166,"uuid":"808122591","full_name":"SebastianBach/cpp-check-suite","owner":"SebastianBach","description":"Checks for C++ code.","archived":false,"fork":false,"pushed_at":"2024-05-30T13:25:15.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-26T00:28:42.406Z","etag":null,"topics":["asan","clang-format","clang-tidy","coverage","cpp","cppcheck","ubsan","valgrind"],"latest_commit_sha":null,"homepage":"","language":"CMake","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SebastianBach.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-30T12:33:29.000Z","updated_at":"2024-05-30T13:25:16.000Z","dependencies_parsed_at":"2024-05-30T14:49:59.390Z","dependency_job_id":"1ed4c344-59ad-443d-adec-8ee5cfef80c1","html_url":"https://github.com/SebastianBach/cpp-check-suite","commit_stats":null,"previous_names":["sebastianbach/cpp-check-suite"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/SebastianBach/cpp-check-suite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianBach%2Fcpp-check-suite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianBach%2Fcpp-check-suite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianBach%2Fcpp-check-suite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianBach%2Fcpp-check-suite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SebastianBach","download_url":"https://codeload.github.com/SebastianBach/cpp-check-suite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SebastianBach%2Fcpp-check-suite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34481313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asan","clang-format","clang-tidy","coverage","cpp","cppcheck","ubsan","valgrind"],"created_at":"2024-11-11T00:28:25.798Z","updated_at":"2026-06-18T07:32:12.089Z","avatar_url":"https://github.com/SebastianBach.png","language":"CMake","funding_links":[],"categories":[],"sub_categories":[],"readme":"Sample project showing how to use sanitizers and analyzers to check C++ code.\n\n\n# Install Dependencies\n\nExample platform is Linux/Ubuntu using GCC:\n\n```shell\nsudo apt-get update\n\nsudo apt-get install build-essential cmake cppcheck clang-format clang-tidy valgrind\n\npip install gcovr\n```\n\n# Checks\n\n## Compiler Warnings\n\nEnable extensive compiler warnings-as-errors with the custom **cmake** option ```ENABLE_WARNINGS```.\n\n```shell\ncmake -DCMAKE_BUILD_TYPE=Release -DENABLE_WARNINGS=ON  ..\ncmake --build . -j\n```\n\n## Cppcheck\n\nUse **cppcheck** with the ``compile_commands.json`` file generated by **cmake**.\n\n```shell\ncmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ..\ncppcheck --project=compile_commands.json --cppcheck-build-dir=./temp/cppcheck --error-exitcode=1 --enable=all\n```\n\n\n## clang-format\n\nUse **[clang-format](https://clang.llvm.org/docs/ClangFormat.html)** to check the code style.\n\n```shell\nclang-format --dry-run -Werror --style=file src/bad_code.cpp\n```\n\n## clang-tidy\n\nUse **[clang-tidy](https://clang.llvm.org/extra/clang-tidy/)** to analyze code patterns.\n\nClang tidy can be used by **cmake** via [CXX_CLANG_TIDY](https://cmake.org/cmake/help/latest/prop_tgt/LANG_CLANG_TIDY.html) enabled with:\n\n```shell\ncmake -DENABLE_CLANG_TIDY=ON ..\ncmake --build . \n```\n\n\n## ASAN (AddressSanitizer)\n\nUse the **[AddressSanitizer](https://clang.llvm.org/docs/AddressSanitizer.html)** to check for memory issues at runtime.\n\n```shell\ncmake -DENABLE_ASAN=ON ..\ncmake --build . \nctest --output-on-failure\n```\n\n\n## UBSAN (UndefinedBehaviorSanitizer)\n\nUse the **[UndefinedBehaviorSanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html)** to check for cases of [undefined behaviour](https://en.cppreference.com/w/cpp/language/ub) at runtime.\n\nEnable and run with:\n\n```shell\ncmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UBSAN=ON ..\ncmake --build . -j \nctest --output-on-failure\n```\n\n## Valgrind\n\nUse **[Valgrind](https://valgrind.org/)** to check for memory issues at runtime.\n\n```shell\ncmake  -DUSE_VALGRIND=ON  ..\ncmake --build .\nctest -T memcheck --output-on-failure\n```\n\n## Coverage\n\nCreate a coverage report using **[gcovr](https://gcovr.com/en/stable/)** to see how much of the code is executed during tests. \n\n\n```shell\ncmake -DENABLE_COVERAGE=ON ..\ncmake --build . -j \nctest \n\ncd ..\ngcovr -r . --html --html-details -o build/coverage/coverage.html\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianbach%2Fcpp-check-suite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsebastianbach%2Fcpp-check-suite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsebastianbach%2Fcpp-check-suite/lists"}