Black listed name "{:s}"
Used when the name is listed in the "bad-names" black list.
This message belongs to the basic checker.
cmake-lint can be customized to help enforce coding guidelines that discourage or forbid use of certain names for variables, functions, etc.. These names are specified with the bad-names option. This message is raised whenever a name is in the list of names defined with the bad-names option.
Invalid {:s} name "{:s}" doesn't match `{:s}`
Used when a name doesn't doesn't fit the naming convention associated to its type (function, macro, variable, ...).
This message belongs to the basic checker.
The naming convention is defined with a regular expression, and the naming convention is satisfied if the name matches the regular expression.
Missing docstring on function or macro declaration
Used when a function or macro is defined without a documentation comment immediately preceeding it.
This message belongs to the basic checker.
So, you've written a some fancy function that makes it "easier" to declare build steps. Congratulations. You probably shouldn't have, but thats OK. Now that you did, how should people use it? What arguments does it take? What are the semantics of those arguements? You should include documentation in a comment block prior to the function declaration with this information.
Empty docstring on function or macro declaration
Used when a function or macro is preceeded by an empty comment string, rather that one with useful documentation.
This message belongs to the basic checker.
Ok so you saw C0111 and figured you'd be clever right? Sorry, no dice. Please include some useful documentation so that code readers know what your function/macro does and how to use it.
Missing {:s} in statement which allows it
Form descriminator hidden behind variable dereference
Used when a keyword used to descriminate betwen different forms of a command is hidden behind a variable dereference.
This message is implemented by individual command checkers.
Some cmake commands have very different behavior depending on the presence of a particular keyword (see e.g. the file command). And because cmake is a macro languge that keyword can actually be held inside a variable. Thus the keyword might not actually be visible to cmake-lint (or humans). In general there is no reason to do this and it really hurts readability since different descriminator keywords yield essentially different commands.
Consider replacing custom parser logic with cmake_parse_arguments
Used when custom parse logic is detected.
Argument name {:s} differs from existing argument only in case
Line too long ({:d}/{:d})
Used when a line is longer than the limit specified in the line-length option.
It is a good idea to keep each line within a maximum length to keep it from wrapping past the edge of an editing window. This improves readability and tempers other developers' irritability!
The default value of the line-length option is 80, the customary width of a terminal window.
Note that the line length and the limit are counted in characters, not in Bytes needed to represent these characters.
Trailing whitespace
Used when a line has one or more whitespace characters directly before the line end character(s).
This message belongs to the basic checker.
Such trailing whitespace is visually indistinguishable and some editors will trim them.
Final newline missing
Used when a listfile has no line end character(s) on its last line.
This message belongs to the basic checker.
While cmake itself does not require line end character(s) on the last line, is simply good practice to have it.
{:s} newlines between statements
Tab-policy violation. Found {:s} but should be {:s}
Bad indentation: {:s}{:s} {:s}^----{}
Multiple statements on a single line
Wrong line ending ({:s})
Used when a line ends with the wrong line ending character. e.g. A line ends with "rn" when configured for "n".
This message belongs to the basic checker.
While cmake itself does not enforce a particular line ending, it is good practice for a project to be consist with their line endings.
Unrecognized file option {:s}
Used when an unrecognized pragma is encountered.
cmake-lint allows for some inline comments to supress warnings (among other things). This lint is emitted if a bad option key is provided in such a pragma
Bad option value {:s}
Used when a cmake-lint pragma is encountered which attempts to alter some option in an invalid way.
This message belongs to the basic checker.
cmake-lint allows for some inline comments to supress warnings (among other things). This lint is emitted if a bad option is provided to one of these pragmas.
{:s} outside of loop
Used when a break() or continue() statement is used outside a loop.
This message belongs to the basic checker.
Duplicate argument name {:s} in function/macro definition
Invalid argument name {:s} in function/macro definition
Missing required positional argument
Used when a positional argument group expecting an exact number of arguments is closed (by a parenthesis) before that number of arguments is found.
This message belongs to the basic checker.
Too many positional arguments
Used when a positional argument is found when no argument group is expected.
This message is implemented by individual command checkers
Duplicate keyword argument {:s}
Used when a keyword shows up more than once within an argument group. In general, only COMMAND is allowed more than once.
Missing required keyword argument {:s}
Invalid form descriminator
Used when a keyword used to descriminate between different command forms is ommitted.
Too many return statements {:d}/{:d}
Too many branches {:d}/{:d}
Too many named arguments {:d}/{:d}
Too many local variables {:d}/{:d}
Too many statements {:d}/{:d}
Unreachable code
Use of deprecated command {:s}
{:s} variable '{:s}' which matches a built-in except for case
This warning means that you are using a variable such as, for example, cmake_cxx_standard which matches a builtin variable (CMAKE_CXX_STANDARD) except for the case. If this was intentional, then it's bad practice as it causes confusion (there are two variables in the namespace with identical name except for case), though it was probably not intentional and you probably aren't assigning to the correct variable.
This warning may be emitted for assignment (e.g. set() or list()) as well as for variable expansion in an argument (e.g. "${CMAKE_Cxx_STANDARD}").
String looks like a variable reference missing an {:s} tag '{:s}'