Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
cmakelint parses CMake files and reports style issues.
cmakelint requires Python.
To install cmakelint 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
$PWD/.cmakelintrc, ~/.config/cmakelintrc, $XDG_CONFIG_DIR/cmakelintrc or
~/.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
Filters can optionally be directly enabled/disabled from within a CMake file, overriding the configuration from file or CLI argument:
# lint_cmake: <+ or -><filter name>
# e.g.:
# lint_cmake: -readability/wonkycase
# add multiple filters as list:
# lint_cmake: <+/-><filter1>, <+/-><filter2>
cmakelint can also be run with pre-commit. Add the following configuration block to your .pre-commit-config.yaml
:
- repo: https://github.com/cmake-lint/cmake-lint
hooks:
- id: cmakelint
The program should exit with the following status codes:
FAQs
Static code checker for CMake files
We found that cmakelint demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.