cmake-lint(1)
πΈ NAME πΈ
okay so bestie, listen up β cmake-lint is the tool that checks your cmake listfile for lint. That's it, that's the job. She's the friend who reads your CMakeLists.txt and goes "girlβ¦" π
Oh and btw, this whole thing is the cmake-lint(1) page from the General Commands Manual β just so you know what you're reading. π
β¨ SYNOPSIS β¨
cmake-lint [-h] [--dump-config {yaml,json,python} | -o OUTFILE_PATH] [-c
CONFIG_FILE] infilepath [infilepath ...]
π¦ DESCRIPTION π¦
Check cmake listfile for lint.
that's the whole description. she said what she said. no notes. π
π OPTIONS π
infilepathsβ the file paths you want linted, and yeah you can pass more than one, she eats. π-v,--versionβ show the program's version number and then dip. exit stage left. β¨-l {error,warning,info,debug},--log-level {error,warning,info,debug}β how chatty do you want the logs? pick your volume:error,warning,info, ordebug. π₯--dump-config [{yaml,json,python}]β if you specify this, it prints the default configuration to stdout and then exits. like, "here's my whole personality" and then leaves. π-o OUTFILE_PATH,--outfile-path OUTFILE_PATHβ write errors to this file instead. default is stdout, so by default she's just yelling into the terminal. π--no-helpβ when used with--dump-config, it will omit helptext comments in the output. no little explanations, just the raw facts. π€«--no-defaultβ when used with--dump-config, it will omit any unmodified configuration value. if you didn't touch it, it's not invited. π--suppress-decorationsβ suppress the file title decoration and the summary statistics. minimalism era. π-c CONFIG_FILES [CONFIG_FILES ...],--config-files CONFIG_FILES [CONFIG_FILES ...]β path to configuration file(s). plural. she can hold more than one. π--vartags [VARTAGS ...]β specify variable tags. π·οΈ--proptags [PROPTAGS ...]β specify property tags. π·οΈ--disable [DISABLE]β disable formatting entirely, makingcmake-formata no-op. she's off duty, don't perceive her. π€--line-width LINE_WIDTHβ how wide to allow formatted cmake files. this is the lewkkk. π--tab-size TAB_SIZEβ how many spaces to tab for indent.--use-tabchars [USE_TABCHARS]β if true, lines are indented using tab characters (utf-80x09) instead of<tab_size>space characters (utf-80x20). In cases where the layout would require a fractional tab character, the behavior of the fractional indentation is governed by<fractional_tab_policy>. yes it's that specific, she's not playing around.--fractional-tab-policy {use-space,round-up}β if<use_tabchars>is True, then the value of this variable indicates how fractional indentions are handled during whitespace replacement. If set to'use-space', fractional indentation is left as spaces (utf-80x20). If set toround-upfractional indentation is replaced with a single tab character (utf-80x09) effectively shifting the column to the next tabstop.--max-subgroups-hwrap MAX_SUBGROUPS_HWRAPβ if an argument group contains more than this many sub-groups (parg or kwarg groups) then force it to a vertical layout. it's giving "too many friends in the group chat, everybody line up." π«Ά--max-pargs-hwrap MAX_PARGS_HWRAPβ if a positional argument group contains more than this many arguments, then force it to a vertical layout.--max-rows-cmdline MAX_ROWS_CMDLINEβ if a cmdline positional group consumes more than this many lines without nesting, then invalidate the layout (and nest).--separate-ctrl-name-with-space [SEPARATE_CTRL_NAME_WITH_SPACE]β if true, separate flow control names from their parentheses with a space. personal space matters. π§--separate-fn-name-with-space [SEPARATE_FN_NAME_WITH_SPACE]β if true, separate function names from parentheses with a space.--dangle-parens [DANGLE_PARENS]β if a statement is wrapped to more than one line, than dangle the closing parenthesis on its own line. (that "than" is literally what the original says, we don't edit the queen's words π)--dangle-align {prefix,prefix-indent,child,off}β if the trailing parenthesis must be 'dangled' on its on line, then align it to this reference:prefix: the start of the statement,prefix-indent: the start of the statement, plus one indentation level,child: align to the column of the arguments.--min-prefix-chars MIN_PREFIX_CHARSβ if the statement spelling length (including space and parenthesis) is smaller than this amount, then force reject nested layouts.--max-prefix-chars MAX_PREFIX_CHARSβ if the statement spelling length (including space and parenthesis) is larger than the tab width by more than this amount, then force reject un-nested layouts.--max-lines-hwrap MAX_LINES_HWRAPβ if a candidate layout is wrapped horizontally but it exceeds this many lines, then reject the layout. rejected. blocked. π«--line-ending {windows,unix,auto}β what style line endings to use in the output. pick your fighter. βοΈ--command-case {lower,upper,canonical,unchanged}β format command names consistently as'lower'or'upper'case.--keyword-case {lower,upper,unchanged}β format keywords consistently as'lower'or'upper'case.--always-wrap [ALWAYS_WRAP ...]β a list of command names which should always be wrapped.--enable-sort [ENABLE_SORT]β if true, the argument lists which are known to be sortable will be sorted lexicographically.--autosort [AUTOSORT]β if true, the parsers may infer whether or not an argument list is sortable (without annotation). she's intuitive like that. β¨--require-valid-layout [REQUIRE_VALID_LAYOUT]β by default, ifcmake-formatcannot successfully fit everything into the desired linewidth it will apply the last, most aggressive attempt that it made. If this flag is True, however,cmake-formatwill print error, exit with non-zero status code, and write-out nothing. she will simply not participate. zero output. periodt.--bullet-char BULLET_CHARβ what character to use for bulleted lists.--enum-char ENUM_CHARβ what character to use as punctuation after numerals in an enumerated list.--first-comment-is-literal [FIRST_COMMENT_IS_LITERAL]β if comment markup is enabled, don't reflow the first comment block in each listfile. Use this to preserve formatting of your copyright/license statements. protect the legal text bestie, do not touch it. β οΈ--literal-comment-pattern LITERAL_COMMENT_PATTERNβ if comment markup is enabled, don't reflow any comment block which matches this (regex) pattern. Default isNone(disabled).--fence-pattern FENCE_PATTERNβ regular expression to match preformat fences in comments default=r'^\s*([`~]{3}[`~]*)(.*)$'--ruler-pattern RULER_PATTERNβ regular expression to match rulers in comments default=r'^\s*[^\w\s]{3}.*[^\w\s]{3}$'--explicit-trailing-pattern EXPLICIT_TRAILING_PATTERNβ if a comment line matches starts with this pattern then it is explicitly a trailing comment for the preceding argument. Default is'#<'--hashruler-min-length HASHRULER_MIN_LENGTHβ if a comment line starts with at least this many consecutive hash characters, then don'tlstrip()them off. This allows for lazy hash rulers where the first hash char is not separated by space. lazy era, we respect it. π€--canonicalize-hashrulers [CANONICALIZE_HASHRULERS]β if true, then insert a space between the first hash char and remaining hash chars in a hash ruler, and normalize its length to fill the column.--enable-markup [ENABLE_MARKUP]β enable comment markup parsing and reflow. π--disabled-codes [DISABLED_CODES ...]β a list of lint codes to disable. block them, we don't want them here. π--function-pattern FUNCTION_PATTERNβ regular expression pattern describing valid function names.--macro-pattern MACRO_PATTERNβ regular expression pattern describing valid macro names.--global-var-pattern GLOBAL_VAR_PATTERNβ regular expression pattern describing valid names for variables with global (cache) scope.--internal-var-pattern INTERNAL_VAR_PATTERNβ regular expression pattern describing valid names for variables with global scope (but internal semantic).--local-var-pattern LOCAL_VAR_PATTERNβ regular expression pattern describing valid names for variables with local scope.--private-var-pattern PRIVATE_VAR_PATTERNβ regular expression pattern describing valid names for privatedirectory variables.--public-var-pattern PUBLIC_VAR_PATTERNβ regular expression pattern describing valid names for public directory variables.--argument-var-pattern ARGUMENT_VAR_PATTERNβ regular expression pattern describing valid names for function/macro arguments and loop variables.--keyword-pattern KEYWORD_PATTERNβ regular expression pattern describing valid names for keywords used in functions or macros.--max-conditionals-custom-parser MAX_CONDITIONALS_CUSTOM_PARSERβ in the heuristic forC0201, how many conditionals to match within a loop in before considering the loop a parser.--min-statement-spacing MIN_STATEMENT_SPACINGβ require at least this many newlines between statements. give the statements room to breathe. π¬οΈ--max-statement-spacing MAX_STATEMENT_SPACINGβ require no more than this many newlines between statements.--max-returns MAX_RETURNSβ the max returns. that's it, that's the description, she trusts you. π--max-branches MAX_BRANCHESβ the max branches.--max-arguments MAX_ARGUMENTSβ the max arguments.--max-localvars MAX_LOCALVARSβ the max localvars.--max-statements MAX_STATEMENTSβ the max statements.--emit-byteorder-mark [EMIT_BYTEORDER_MARK]β if true, emit the unicode byte-order mark (BOM) at the start of the file.--input-encoding INPUT_ENCODINGβ specify the encoding of the input file. Defaults toutf-8.--output-encoding OUTPUT_ENCODINGβ specify the encoding of the output file. Defaults toutf-8. Note that cmake only claims to supportutf-8so be careful when using anything else. fr fr, be careful, she only speaks utf-8. β οΈ
π AUTHORS π
cmake-lint was written by Josh Bialkowski <josh.bialkowski@gmail.com>. we love an author who's also a baddie. π
π DISTRIBUTION π
The latest version of cmake-lint may be downloaded from https://github.com/cheshirekow/cmake_format. go get her. π¦
and that's the page bestie!! this little masterpiece lives in the Manual section as cmake-lint(1) β you're literally reading the cmake-lint(1) manual page right now, so congrats, you were here for it. πβ¨ no cap. go lint something and slay. π
π
π¦ where this page comes from
- debian bookworm: cmake-format 0.6.13-3 Β· GPL-3.0-only
- ubuntu noble: cmake-format 0.6.13-5 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms