meta-sca icon indicating copy to clipboard operation
meta-sca copied to clipboard

cmake-lint

Open priv-kweihmann opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe.

cmakelint parses CMake files and reports style issues

Describe a tool that might help here https://github.com/richq/cmake-lint

priv-kweihmann avatar Jul 27 '21 13:07 priv-kweihmann

CMake Warning at /abc/path/recipe-sysroot/usr/lib/cmake/grpc/gRPCTargets.cmake:197 (message):
  The imported target "gRPC::grpc_python_plugin" references the file

     "/abc/path"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "/abc/path/recipe-sysroot/usr/lib/cmake/grpc/gRPCTargets.cmake"

  but not all the files it references.

an example warning block

priv-kweihmann avatar Jul 27 '21 13:07 priv-kweihmann

Maybe this https://github.com/jenkinsci/analysis-model/blob/master/src/main/java/edu/hm/hafner/analysis/parser/CMakeParser.java can be of help

priv-kweihmann avatar Aug 02 '21 13:08 priv-kweihmann

Slightly tuned regex ^CMake\s+(?P<type>Warning|Deprecation Warning|Error)\s+at\s+(?P<file>.*?):(?P<line>\d+)(\s+\(message\):\n\s+(?P<message>.*))* does catch most of the issues

priv-kweihmann avatar Aug 02 '21 13:08 priv-kweihmann