Releases: ErykMroczek/mofmt
mofmt 0.6.0
[0.6.0] - 2024-12-09
This release does not contain any significant changes in how formatter works,
but it is important as a first step in refactoring and restructuring
that should lead to a more sophisticated tool. Main change is that parser that
previously was maintained as a separate crate moparse
is now a module of
mofmt
.
The release itself is created mainly because the previous one was 10 months ago,
and some fixes were introduced in the meantime.
Added
- add support for blank lines in block equations/statements (#48)
Fixed
- fix error of inserting unnecessary spaces in inheritance modifiers (#46)
- fix parser error when parsing block comments with additional '*'chars
mofmt 0.5.1
[0.5.1] - 2024-02-22
Small bugfixes.
Fixed
- remove error occuring when first function output is dropped
- fix class annotation indentation in empty classes
mofmt 0.5.0
[0.5.0] - 2024-02-18
This release is probably the last that introduces any significant changes to the
produced output.
It brings back the previous, better, approach to line wrapping inside
expressions. From now on expressions like arithmetical, logical etc. can only be
wrapped manually, and mofmt only ensures that the wrapped expression is
nicely indented.
Moreover, mofmt no longer allows wrapping of output-expression-list rule
in the similar fashion as function args etc. It looked strange when they
included discarded outputs.
With this release mofmt supports the check mode option, so it can be used as
a part of CI pipelines.
Added
- check mode (
--check
)
Changed
- expressions wrapped at binary operators are indented only once, and wrapping
is not applied automatically to remaining operators
Removed
- line wrapping in output-expression-list
mofmt 0.4.2
[0.4.2] - 2024-02-16
Fixed
- fix incorrect indent of "class" annotations that follow section
keywords likealgorithm
- fix the bug that caused mofmt to panic in element redeclared as
replaceable
- fix the issue of changed line endings when mofmt was used on Windows
mofmt 0.4.1
[0.4.1] - 2024-02-05
Fixed
- mofmt no longer inserts a blank line before the
within
mofmt 0.4.0
[0.4.0] - 2024-02-05
This release marks an important milestone. From now on mofmt
will be
implemented in Rust. The migration was motivated by very poor
performance of Python implementation. This was caused partially by the
ANTLR parser having a general runtime that couldn't be tailored in any
way, and mainly because of the inherent slowness of Python.
New Rust implementation was around 50x faster. After including better
and more detailed heuristics it is still between 30-40x faster without
any performance tweaks. This both creates significant performance
savings that can be spent in the future on more advanced features like
HTML formatting, and opens possibilities of performance gains through
multithreading etc.
Few long existing bugs were fixed along the way. There are some minor
changes in the style applied by mofmt
. Refer to the code-style.md
.
Added
- support for new syntactical constructs from Modelica 3.7
- cover output-expression-list production
Changed
- expressions are now wrapped at every operator inside the precedence
level where the original wrap occurred as well as in all outer levels
Fixed
- enum lists and argument lists are now wrapped if they contain
descriptions without the need to run formatter twice
mofmt 0.3.6
[0.3.6] - 2024-01-09
Bugfixes and performance improvements.
Changed
- Improve the performance up to 50%
Fixed
- Remove the false syntax error caused by two comments separated with a blank line
mofmt 0.3.5
[0.3.5] - 2023-12-12
Fixed
- Fix the issue with increasing indentation in expressions that are wrapped multiple times
- Remove unnecessary whitespaces inserted before matrices in function arguments
- Correct indentation in if-expressions
mofmt 0.3.4
[0.3.4] - 2023-12-06
Added
- Add CLI options to print help message and
mofmt
version number
Fixed
- Remove the parsing error when parsing function calls with mixed
positional and named arguments
mofmt 0.3.3
[0.3.3] - 2023-11-30
Fixed
- Fix increased indentation and empty lines in wrapped matrices
- Fix additional spaces placed in lines before type specifiers that use
global paths