{"id":17329484,"url":"https://github.com/rizsotto/constantine","last_synced_at":"2025-04-14T13:12:10.267Z","repository":{"id":2885607,"uuid":"3892499","full_name":"rizsotto/Constantine","owner":"rizsotto","description":"A plugin for Clang compiler","archived":false,"fork":false,"pushed_at":"2021-12-22T11:59:54.000Z","size":289,"stargazers_count":117,"open_issues_count":6,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T02:21:27.393Z","etag":null,"topics":["checker","clang","plugin"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rizsotto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["rizsotto"]}},"created_at":"2012-04-01T12:51:23.000Z","updated_at":"2025-01-12T18:46:34.000Z","dependencies_parsed_at":"2022-09-17T20:21:24.148Z","dependency_job_id":null,"html_url":"https://github.com/rizsotto/Constantine","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizsotto%2FConstantine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizsotto%2FConstantine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizsotto%2FConstantine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rizsotto%2FConstantine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rizsotto","download_url":"https://codeload.github.com/rizsotto/Constantine/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248886324,"owners_count":21177643,"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":["checker","clang","plugin"],"created_at":"2024-10-15T14:48:22.144Z","updated_at":"2025-04-14T13:12:09.777Z","avatar_url":"https://github.com/rizsotto.png","language":"C++","funding_links":["https://github.com/sponsors/rizsotto"],"categories":[],"sub_categories":[],"readme":"Constantine\n===========\n\n[![Build Status](https://travis-ci.org/rizsotto/Constantine.svg?branch=master)](https://travis-ci.org/rizsotto/Constantine)\n[![Join the chat at https://gitter.im/rizsotto/Constantine](https://badges.gitter.im/rizsotto/Constantine.svg)](https://gitter.im/rizsotto/Constantine?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n\nConstantine is a toy project to learn how to write Clang plugin.\n\nImplements pseudo const analysis. Generates warnings about variables,\nwhich were declared without const qualifier.\n\n\nHow to build\n------------\n\nConstantine was tested on Linux only.\nFor Unbuntu/Debian build, you can take a look at the github workflow file.\n\n### Prerequisites\n\n1. **C++ compiler** to compile the sources.\n2. **cmake** to configure the build process.\n3. **make** to run the build. Makefiles generated by `cmake`.\n\n4. Install **LLVM/Clang**. Either you do install from sources or package\n   for your distribution, the Clang version shall match with Constantine version.\n   Make sure that `llvm-config` and `clang` executables are in the `PATH`\n   environment.\n\n5. Install **Lit**. This is optional, do only if you want to run the tests!\n   Lit is the [LLVM Integrated Tester][LIT]. If you installed Clang from\n   sources, you shall have it automaticaly. If your package manager does\n   not provide it, you can simply install from [PyPI][PyPI] because it is\n   written in python.\n\n   [LIT]: http://llvm.org/docs/CommandGuide/lit.html\n   [PyPI]: https://pypi.python.org/pypi/lit\n\n### Build Constantine\n\nIt could be the best to build it in a separate build directory.\n\n    cmake $CONSTANTINE_SOURCE_DIR\n    make all\n    make install  # to install\n    make check    # to run tests\n    make package  # to create tgz, rpm, deb packages\n\nYou can configure the build process with passing arguments to cmake.\n\n\nHow to use\n----------\n\nTo run the plugin against your sources you need to tune the build\nscript of your project. Sure you need to replace the compiler to\nClang. To hook the plugin into the Clang driver, you need to pass\nextra flags which are Clang specific, therefore those are 'escaped'\nlike this:\n\n    CC=\"clang\"\n    CXX=\"clang++\"\n    CXX_FLAGS+=\" -Xclang -load -Xclang $CONSTANTINE_LIB_PATH/libconstantine.so\"\n    CXX_FLAGS+=\" -Xclang -add-plugin -Xclang constantine\"\n\n\nProblem reports\n---------------\n\nIf you find a bug in this documentation or elsewhere in the program or would\nlike to propose an improvement, please use the project's [github issue\ntracker][ISSUES]. Please describing the bug and where you found it. If you\nhave a suggestion how to fix it, include that as well. Patches are also\nwelcome.\n\n  [ISSUES]: https://github.com/rizsotto/Constantine/issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizsotto%2Fconstantine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frizsotto%2Fconstantine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frizsotto%2Fconstantine/lists"}