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, or debug. πŸ”₯
  • --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, making cmake-format a 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-8 0x09) instead of <tab_size> space characters (utf-8 0x20). 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-8 0x20). If set to round-up fractional indentation is replaced with a single tab character (utf-8 0x09) 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, if cmake-format cannot 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-format will 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 is None (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't lstrip() 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 for C0201, 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 to utf-8.
  • --output-encoding OUTPUT_ENCODING β€” specify the encoding of the output file. Defaults to utf-8. Note that cmake only claims to support utf-8 so 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