- Support for new keywords in native commands available in CMake 4.3.
- Sorting order can be changed with
--sort-order. (#102)
- Extensions are now required to specify signature keyword as one of:
options,one_value_keywordsormulti_value_keywords.
- Formatting of commands with multiple signatures when keyword defining that signature is not at the first position. (#103)
- Nested multi-value arguments are expanded with favour-expansion. (#100)
- Avoid infinite loop when parsing incorrect code with not closed quoted argument. (#99)
- Missing definitions of macros produced by
check_required_components. (#97) pre-commithook now considersCMakeLists.txt.inand*.cmake.infiles. (#98)- Formatting of
add_custom_command(IMPLICIT_DEPENDS)now considers arguments as pairs.
- Switch from
setup.pytopyproject.toml.
- Template files like those supported used with
configure_filewhich use@-based substitution can be formatted in most circumstances. (#92) - Automatic file discovery will also consider
CMakeLists.txt.inand*.cmake.infiles. (#92) - Ignore files are respected by default when source or definition argument is a directory. (#91)
- Cache directory can be changed with
--cache-dir. (#86) - Single file executables are published since this release.
- Replaced deprecated
appdirsdependency withplatformdirs.
- Allow omitting signature keyword in extensions. (#82)
- Support files starting with BOM. (#83)
- Comments no longer break keyword formatters. (#78)
- Formatting of line range through
--line-ranges. (#72) - Whitespace can be added at the end of canonical name in extension. (#73)
- Support for new keywords in native commands available in CMake 4.2.
- Some builtin commands, like
list(APPEND)orstring(APPEND), are formatted in a way that signature keyword is considered a proper keyword with usually semantic of one value keyword. (#74) - Formatting can be disabled with pair of comments
# gersemi: off/# gersemi: onin more contexts.
- Support missing keywords in
export(EXPORT). - Support missing keywords in
list(TRANSFORM). (#77)
- Performance improvement.
- Relative paths work with
--config. (#69)
- Parsing regression regarding files with empty lines at the edges.
- Support custom block-like pair of commands. (#67)
- Hints in custom commands can be listed in multiple line comments to improve readability.
- Trim whitespaces at the end of line comments except for comments inside list of arguments of unknown command. (#64)
- Proper line breaking for
FILE_SETkeyword intarget_sources. (#63)
- Support extension files.
- Support
sort,uniqueandsort+uniquehints for custom commands. - Support overriding and tweaking builtin commands through extensions.
- Support for new keywords in native commands available in CMake 4.1.
- Proper formatting of
FILE_SETand associated keywords intarget_sources.
- Canoncial casing of
ExternalProject_Add_StepDependenciesandExternalProject_Add_StepTargets. (#61)
- Support for new keywords in native commands available in CMake 4.0.
- Correctly recognize multi value keywords of
protobuf_generate.
- Make
--diffusable with--check. (#58)
- Add
--warnings-as-errors. (#57)
- Fix "unknown command" regression. (#52)
- Proper formatting of first
<artifact-option>...group inINSTALL(TARGETS)command. (#51)
- Add support for extensions and provide example extension as a template.
- Recognize
unquoted_legacyrule of CMake language. (#49) - Cut down excessive memory usage when used on a project with big number of files.
- Correctly recognize keywords from download, upload and patch steps of
ExternalProject_AddinFetchContent_Declare. (#50)
- fix
--no-quiet(#43)
- Add
disable_formatting. (#35) --configcan be used to provide explicit path to configuration file. (#35)- Add
--print-configto print outcome configuration in one of three variants: minimal, verbose, default. (#35) - Warn about options not supported through configuration file.
- Configuration has been split into two kinds: outcome and control. Outcome configuration can be changed through either configuration file or command line arguments whereas control configuration be changed only through command line.
- Search strategy for
.gersemircfile has been changed so that the file closest to given source file is picked instead of using.gersemircthat it the most commont among files passed to gersemi. --default-configis removed because its functionality is subsumed by--print-config default.cache,color,quietandworkerscan be changed only through command line.
- custom command definitions nested inside other definitions are picked as well (#39)
- colors stripping when output is redirected (#40)
- support missing keywords in
file(MAKE_DIRECTORY)(#38) - support missing keywords in
try_compile - add support for experimental
install(PACKAGE_INFO)
- support for new keywords in native commands available in CMake 3.31
- incorrect keywords in
bison_targetandflex_target(#37)
- removed dependency to
dataclassespackage (#36) - supported Python versions changed from
>= 3.6to>= 3.8 - number of workers can now be specified with either integer or "max", default value will now be "max" instead of numerical value of max on given machine
- when source or definition path doesn't exist
gersemiwill fail early
- cache can be disabled through
--no-cache/cache: false, cache is still enabled by default - warnings about unknown commands can be suppressed through
--no-warn-about-unknown-commands/warn_about_unknown_commands: false, warnings are enabled by default
- only those files that were checked or formatted without warning will be cached
- warnings about unknown commands when
quietisn't used
- document the intent of only formatting command name and closing parenthesis in "Let's make a deal" section of README
set_propertyformatting
- non-deterministic formatting regression (#32)
- improve consistency of
add_executable
- improve consistency of
target_link_libraries
- support for new keywords in native commands available in CMake 3.30
- fix issue with cached results interfering with stdout mode
- fix issue with messing up whitespaces in between arguments of unknown custom commands
- support for using canonical casing of custom commands (#21)
- official CMake commands will be formatted with their canonical casing (like
FetchContent_Declare) instead of lower case version with the following deliberate exceptions:check_fortran_function_existscheck_include_file_cxxcheck_include_filecheck_include_filescheck_library_existscheck_struct_has_membercheck_variable_exists
- use specialized formatting of some previously omitted official commands
- improve consistency of
set_package_propertieswith similar commands - fix formatting of first command in
add_custom_target(#24) - fix incorrect detection of sections in commands like
install(#26)
- improve
find_packageformatting aroundREQUIREDkeyword (#20)
- support for different kinds of indentation, either specific number of spaces or tabs through
--indentargument (examples:--indent=2or--indent=tabs) orindententry in.gersemirc(examples:indent: 2orindent: tabs) (#15) - support for hints in custom command definition for specialized formatting, currently supported are
command_lineandpairs
- formatting of
installcommand will now correctly recognize sections likeRUNTIME,ARCHIVE,FILE_SETetc. (#19)
- inconsistent formatting of
add_library(#17) - edge cases of comments present in
COMMANDargument ofadd_custom_commandand similar commands - improve README and help about heuristic used in
favour-inliningstyle (#18)
- support for new keywords in native commands and new commands available in CMake 3.29
- fix issue with comments in
COMMANDargument ofadd_custom_command(#16)
- Number of workers spawned for formatting multiple files can be changed with
-w/--workers. By default it will be number of CPUs available in the system but limited to 60 for Windows machines due to this.
- configuration schema that can be used with yaml LSP server, see: JSON Schema and #12
- yaml header linking to configuration schema in configuration produced by
--default-config - support for Python 3.12
- meaningless but syntactically valid
target_link_librarieswith just library name won't crash gersemi (#13)
- support for new keywords in native commands available in CMake 3.28
- warn about conflicting definitions for macros and functions, make usage of conflicting definitions consistent and deterministic (#11)
- allow PyYAML version 6 as a dependency
- support for new keywords in native commands available in CMake 3.27
- Support for alternative style that favours list expansion for multi-value arguments (keyworded or standalone) through
--list-expansion=favour-expansioncommand line argument orlist_expansion: favour-expansionentry in.gersemirc. The explanation of the new style is available in the README. The original formatting style will be still the default one but it can be set explicitly through--list-expansion=favour-inliningorlist_expansion: favour-inlining.
- support for new keywords in native commands available in CMake 3.26
- support for block/endblock pair
- support for new keywords in native commands available in CMake 3.25
- support for new keywords in native commands available in CMake 3.24
- support for new keywords in native commands available in CMake 3.23
- support Python 3.10
- required version of lark has to be at least 1.0
- AST mismatch issue when reformatting unknown commands with comment inside arguments list
- specialized dumper for commands with multiple signatures like
fileno longer leaks keywords (#6)
- pre-commit hook
- support for new keywords in native commands available in CMake 3.22
- support for new keywords in native commands available in CMake 3.21
- relaxed lark version dependency
- support for new keywords in native commands available in CMake 3.20
- when input is provided through stdin
gersemiwill look for configuration file in current or any of the parent directories instead of only current directory
- on Python 3.6 sqlite related TypeError isn't raised anymore
- information about formatted files is cached so that subsequent runs can avoid processing already formatted files
- support for commands introduced between 3.16 and 3.19 releases of CMake
- minor change to how OUTPUT argument in file(GENERATE) is formatted
- minor performance improvements
- support for Python 3.6
- files are taken as input only once even if provided multiple times
- files are no longer overwritten if reformatting wouldn't lead to change of content
- removed dependency to
packaging
- some performance improvements
- relaxed dependency to lark so that 0.9 can be used as well
- loading configuration from
.gersemircbut command line arguments still take precedence - colorized diffs with
--color
- comments no longer interfere in splitting arguments by keywords which led to undesired formatting (#1)
- line comments in unknown custom commands are preserved in their original form
- fail-safe for AST mismatch (between before and after reformatting) now properly reports file where the problem occured
- utilize multiple cores if avaiable through
multiprocessingmodule - use
--quietto suppress non-error message on stderr - support for commands from
cmake-modulessection of CMake documentation - support formatting of custom commands without keyworded arguments
- custom command definitions can be marked now with
# gersemi: ignoreto suppress generating specialized formatter for these commands
- commands with
PROPERTIESkeyword such asset_directory_propertiesnow are formatted in uniform way as other commands with keyworded arguments
- idempotence of preserving formatting of unknown custom commands
- fixed condition syntax formatting edge-case with opening parenthesis indentation
- Missing value for one value keyword no longer leads to stopping formatting of remaining files in the batch
- custom commands formatting when definitions of these commands are provided with
--definitions - preserving CRLF style of newlines if formatted file used that style
--version- performance improvements
- bracket argument / bracket comment parsing bugfixes
- removed strict dependency to lark
0.8.0, now anything from0.8but below0.9should work
- formatting of COMMAND keyworded arguments look better when wrapped to line (or multiple lines) instead of listing each constituent of command in separate line
- added missing CHANGELOG
- some basic parsing error reporting
- bracket argument candidate which was not closed with proper ending bracket was interpreted as unquoted argument instead of being treated as parsing error
- first release of
gersemiwhich should do some nice formatting - using SemVer