Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/richq/cmake-lint
Check for coding style issues in CMake files
https://github.com/richq/cmake-lint
Last synced: about 2 months ago
JSON representation
Check for coding style issues in CMake files
- Host: GitHub
- URL: https://github.com/richq/cmake-lint
- Owner: richq
- License: apache-2.0
- Archived: true
- Created: 2012-11-08T21:16:51.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-06-07T13:48:40.000Z (about 5 years ago)
- Last Synced: 2024-04-02T06:02:53.632Z (3 months ago)
- Language: Python
- Size: 48.8 KB
- Stars: 102
- Watchers: 14
- Forks: 15
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-cmake - cmake-lint - Check for coding style issues in CMake files. cmakelint requires Python. [```[APACHE2]```][APACHE2] (Other)
README
cmakelint parses CMake files and reports style issues.
cmakelint requires Python.
## Installation
sudo pip install cmakelint
## Usage
Syntax: cmakelint [--config=file] [--filter=-x,+y] [file] ...
filter=-x,+y,...
Specify a comma separated list of filters to applyconfig=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/tabsAn 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## Changes
### 1.4
- Add --quiet flag to suppress "Total Errors: 0"
- Add --linelength=N flag to allow longer default lines (default remains 80)### 1.3.4
- fix false positives in indented blocks
### 1.3.3
- fix crash on invalid `# lint_cmake: pragma` line
- fix deprecation warning with Python 3.4
- fix false positive warnings related to non-CMake quoted chunks (Issue #2)### 1.3.2
- return error code 0, 1, 32 on error
### 1.3.1
- fix version number
### 1.3
- individual CMake files can control filters with `# lint_cmake: pragma` comment
- improved `SetFilters` function to allow spaces around the commas
- use `${XDG_CONFIG_HOME}` for the cmakelintrc file, with backwards compatible check for `~/.cmakelintrc`### 1.2.01
- Published on pypi
### 1.2
- Moved to github