{"id":17049808,"url":"https://github.com/marzer/check-cmake","last_synced_at":"2025-10-27T18:14:02.954Z","repository":{"id":216530371,"uuid":"741217534","full_name":"marzer/check-cmake","owner":"marzer","description":"A simple linter for CMake.","archived":false,"fork":false,"pushed_at":"2025-01-04T11:39:46.000Z","size":66,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-11T16:15:08.190Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pypi.org/project/check-cmake/","language":"Python","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/marzer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-01-09T23:55:39.000Z","updated_at":"2025-01-04T11:39:24.000Z","dependencies_parsed_at":"2024-01-17T20:17:04.068Z","dependency_job_id":"d510c3ef-f7c3-43ff-aaf1-83efa072331c","html_url":"https://github.com/marzer/check-cmake","commit_stats":null,"previous_names":["marzer/check_cmake","marzer/check-cmake"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzer%2Fcheck-cmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzer%2Fcheck-cmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzer%2Fcheck-cmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marzer%2Fcheck-cmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marzer","download_url":"https://codeload.github.com/marzer/check-cmake/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248594191,"owners_count":21130316,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-14T09:55:26.302Z","updated_at":"2025-10-27T18:14:02.934Z","avatar_url":"https://github.com/marzer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# check-cmake\n\nA simple linter for CMake.\n\n## Installation\n\n`check-cmake` requires Python 3.8 or higher.\n\n```\npip3 install check-cmake\n```\n\n## Usage\n\n`check-cmake` is a command-line application\n\n```\nusage: check-cmake [-h] [-v] [--version] [--recurse | --no-recurse] [--limit LIMIT] [root]\n\nCMake checker for C and C++ projects.\n\npositional arguments:\n  root                  path to the project root (default: .)\n\noptions:\n  -h, --help            show this help message and exit\n  -v, --verbose         enable verbose output\n  --version             print the version and exit\n  --recurse, --no-recurse\n                        recurse into subfolders (default: True)\n  --limit LIMIT         maximum errors to emit (default: 0)\n\nv0.3.0 - github.com/marzer/check-cmake\n```\n\n## Exit codes\n\n| Value | Meaning                |\n| :---- | :--------------------- |\n| 0     | No issues were found   |\n| 1     | Issues were found      |\n| -1    | A fatal error occurred |\n\n## Example output\n\n```\nerror: /my_lib/CMakeLists.txt:29:9: language standard level should be set on a per-target basis using target_compile_features()\n  Context:\n    29 | set_target_properties(\n    30 |     my_lib\n    31 |     PROPERTIES\n    32 |         CXX_STANDARD 14\n    33 |         CXX_STANDARD_REQUIRED ON\n    34 |         CXX_EXTENSIONS OFF\n    35 | )\n  Replace with:\n    target_compile_features(): https://cmake.org/cmake/help/latest/command/target_compile_features.html\n  More information:\n    CMAKE_CXX_KNOWN_FEATURES: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html\n    CMAKE_C_KNOWN_FEATURES: https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_C_KNOWN_FEATURES.html\n\nfound 1 error in 1 file.\n```\n\n## Suppressing checks\n\nChecks can be suppressed using comment-based 'pragmas' at the end of the source line:\n\n```cmake\nset_target_properties(\n    my_lib\n    PROPERTIES\n        CXX_STANDARD 14 # nocheck\n        CXX_STANDARD_REQUIRED ON\n        CXX_EXTENSIONS OFF\n)\n```\n\nFor compatibility with other tools, any the following will also work:\n\n```cmake\n# nolint\n\n# check-cmake ignore\n# lint-cmake ignore\n# cmake-check ignore\n# cmake-lint ignore\n\n# check-cmake disable\n# lint-cmake disable\n# cmake-check disable\n# cmake-lint disable\n\n# check-cmake: ignore\n# lint-cmake: ignore\n# cmake-check: ignore\n# cmake-lint: ignore\n\n# check-cmake: disable\n# lint-cmake: disable\n# cmake-check: disable\n# cmake-lint: disable\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarzer%2Fcheck-cmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarzer%2Fcheck-cmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarzer%2Fcheck-cmake/lists"}