Static code checker for CMake files
cmakelint parses CMake files and reports style issues.
cmakelint requires Python.
To install cpplint from PyPI, run:
.. code-block:: bash
$ pip install cmakelint
Syntax: cmakelint [--config=file] [--filter=-x,+y] <file> [file] ... filter=-x,+y,... Specify a comma separated list of filters to apply config=file Use the given file for configuration. By default the file $HOME/.cmakelintrc is used if it exists. Use the value "None" to use no configuration file (./None for a file called literally None) Only the option "filter=" is currently supported in this file.
--filter= option with no filter to see available options. Currently
convention/filename linelength package/consistency readability/logic readability/mixedcase readability/wonkycase syntax whitespace/eol whitespace/extra whitespace/indent whitespace/mismatch whitespace/newline whitespace/tabs
An example .cmakelintrc file would be as follows:
With this file in your home directory, running these commands would have the same effect:
cmakelint.py CMakeLists.txt cmakelint.py --filter=-whitespace/indent CMakeLists.txt
Output status codes
The program should exit with the following status codes:
- 0 if everything went fine
- 1 if an error message was issued
- 32 on usage error
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size cmakelint-1.4.1-py3-none-any.whl (12.9 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size cmakelint-1.4.1.tar.gz (68.5 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for cmakelint-1.4.1-py3-none-any.whl