Cmake Format Versions Save

Source code formatter for cmake listfiles.

v0.6.13

3 years ago

This is a hotfix on v0.6.12. The python distribution package was missing somemodules.

v0.6.12

3 years ago

This release includes mostly internal housekeeping. The code organization was overhauled to better represent the division between different components.The cmake_format package has been replaced by cmakelang, with`format` now a subpackage. All the first class tools are now subpackages of cmakelang. For now, I'll leave the github repository at cmake_format but there's a good chance I'll move it to cmakelang in the future. Big refactors like this have a tendency to expose gaps in coverage so please report any breakages you observe.

In addition, the configuration now includes options for using tab characters in listfiles (though, I'm not sure who in the right mind would choose to do so). If enabled, the formatter will translate indentations from spaces to tabs,and the linter will enforce a consistent tab policy.

This release also includes a couple of minor bug fixes. See the release notes for more details.

v0.6.11

3 years ago

This release adds argcomplete handling to enable automatic shellcompletion to cmake-format and cmake-lint. argcomplete is not an installation dependency so if you wish to enable completion please install`argcomplete` (e.g. via pip) and then activate it (see the documentation for argcomplete).

The visual studio code extension now supports variable substitution for thingslike ${workspaceRoot} and ${workspaceFolder} in the args and cwd configuration options.

There is a new configuration option to disable formatting. This can be specified in a config file to conveniently no-op formatting within a subdirectory (such as third-party source code) of a project.

v0.6.10

4 years ago

This release fixes a number of issues with cmake-lint and activates cmake-lint as part of the lint build step in CI for this project and the upstream repository. There is still a lot of work to do on cmake-lint but at this point it is in a less experimental state and I am sufficiently confident in it enough to suggest that you start using it. Feel free to report any issues you encounter with it.

This release also includes some cleanup work under the hood of cmake-format and the parsing code. Most notably, the command specifications for all of the cmake functions and macros defined in standard modules have been generated using genparsers and are now included by default. I have not audited all of them so the detected specifications are probably not all correct. Please let me know if you observe any problems with them.

v0.6.9

4 years ago

The parser now performs token look-ahead when parsing a comment within astatement. This allows it to determine whether a comment belongs to the currentsemantic node or one higher up in the tree (previously it would assign allcomments to the most recent semantic node). This should prevent some unusualindentation of comments within deep statements.

Some cmake-lint crashes have been fixed and the test coverage has increasedsignificantly. There are still some outstanding issues but it should crash lessfrequently and with more helpful information.

Detailed documentation for configuration options is now generatedautomatically, including default value, command line syntax, and exampleconfiguration file entry.

v0.6.8

4 years ago

There is now an embeded a database of known variables and properties.cmake-lint uses this database to implement checks on assignment/use ofvariables that are likely to be typos of a builtin variable name. There arealso two new configuration options vartags and proptags that canbe used to affect how the parser and formatter treat certain variables andproperties.

Line comments within a statement are now consumed the same as line comments atblock-scope. This means that your multiline mid-statement comments will bereflowed whereas they would previously have been left alone.

The CI Build has gotten a little more complicated. Generated documentationsources are no longer committed to the repository. Instead, they are pushed toa separate staging repository from which the read-the-docs pages are built.

pseudo-staging

4 years ago

This is a hotfix on v0.6.12. The python distribution package was missing somemodules.

pseudo-master

4 years ago

This is a hotfix on v0.6.12. The python distribution package was missing somemodules.

v0.6.7

4 years ago

With this release, the specification format for custom commands has been updated to enable a number of new features. Positional argument groups now support "tags" which can be used to influence the formatting for some special cases. The format now also supports multiple positional argument groups. Lastly, there is a new experimental tool cmake-genparsers which can automatically generate parser specifications from your custom commands that use the standard cmake_parse_arguments.

There is a new configuration option max_rows_cmdline which applies only to shell commands and determines when a shell command should nest under it's keyword argument.

v0.6.6

4 years ago

The configuration datastructures have been overhauled and configuration options are now separated into different groupings based on which part of the processing pipeline they are relevent to. Legacy configuration files (without sections) are still supported, though they may be deprecated in the future. cmake-format can update your configuration file for you with the following command:

  cmake-format --config-file <your-config> --dump-config <your-format> \
    --no-help --no-default

There is a new configuration option explicit_trailing_pattern which can be used to define a particular character sequence used by comments that are explicitly matched as trailing comments of an argument or statement. See the docs for more information.

Configuration files can now include additional configuration files. This might help keep configurations organized if you are maintaining a database of custom command definitions.