Skip to main content

Static code checker for CMake files

Project description

CMakeLint

Build Status PyPI PyPI - Downloads PyPI - Downloads

cmakelint parses CMake files and reports style issues.

cmakelint requires Python.

Installation

To install cpplint from PyPI, run:

.. code-block:: bash

$ pip install cmakelint

Usage

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.

Run the --filter= option with no filter to see available options. Currently these are:

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:

filter=-whitespace/indent

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmakelint-1.4.1.tar.gz (68.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cmakelint-1.4.1-py3-none-any.whl (12.9 kB view details)

Uploaded Python 3

File details

Details for the file cmakelint-1.4.1.tar.gz.

File metadata

  • Download URL: cmakelint-1.4.1.tar.gz
  • Upload date:
  • Size: 68.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for cmakelint-1.4.1.tar.gz
Algorithm Hash digest
SHA256 58aebd449baac4444fca2346f172821e7684f99312694128087617f50db0c4be
MD5 4c231a8b7d55dda7cd7c162730635721
BLAKE2b-256 35e732f25c37386e6eabfa5ba5f05423807a5bbac6ae64fa732bda277a0f4dab

See more details on using hashes here.

File details

Details for the file cmakelint-1.4.1-py3-none-any.whl.

File metadata

  • Download URL: cmakelint-1.4.1-py3-none-any.whl
  • Upload date:
  • Size: 12.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

File hashes

Hashes for cmakelint-1.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b8df7e5595d30ba8e3e047876ef5dab5bd1dda0f6716324efc6f216e3e8fc42d
MD5 a615e714727f35e91ab262f9224e1275
BLAKE2b-256 9b9bbee3494004b93ebc2938c40e103b804d4b13dd1855ca41145a3134bdb094

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page