diff options
| author | Angus Gratton <angus@redyak.com.au> | 2022-08-29 16:50:49 +1000 |
|---|---|---|
| committer | Angus Gratton <angus@redyak.com.au> | 2022-10-04 14:34:54 +1100 |
| commit | bdac8272d8b1a726012bec897dc51dacbe70b295 (patch) | |
| tree | 7745965d61d5f802425d5e52a59627ce62a52fa9 | |
| parent | 0ee877a20732039e603b41c63a221bfc2c8fbde9 (diff) | |
tools: Add note about uncrustify versions.
Uncrustify versions are not mutually compatible:
1. Version 0.73 or newer produce slightly different formatting. It may be
possible to tweak these by adding more config items, but this will cause
older versions to error out with 'Unknown option'.
2. Version 0.75 prints a range of deprecation warnings due to config file
changes, and returns a non-zero exit code. These are actually fixable
as most are the default value, and pp_indent has changed from 'true' to '1'
which is backwards compatible. However issue 1 remains, so probably better
to have it fail explicitly.
This work was funded through GitHub Sponsors.
Signed-off-by: Angus Gratton <angus@redyak.com.au>
| -rw-r--r-- | CODECONVENTIONS.md | 4 | ||||
| -rw-r--r-- | tools/uncrustify.cfg | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/CODECONVENTIONS.md b/CODECONVENTIONS.md index 78fb912a6..bceab7461 100644 --- a/CODECONVENTIONS.md +++ b/CODECONVENTIONS.md @@ -65,6 +65,10 @@ changes to the correct style. Without arguments this tool will reformat all source code (and may take some time to run). Otherwise pass as arguments to the tool the files that changed and it will only reformat those. +**Important**: Use only [uncrustify](https://github.com/uncrustify/uncrustify) +v0.71 or v0.72 for MicroPython. Different uncrustify versions produce slightly +different formatting, and the configuration file formats are often incompatible. + Python code conventions ======================= diff --git a/tools/uncrustify.cfg b/tools/uncrustify.cfg index 221fb458e..28eb49faf 100644 --- a/tools/uncrustify.cfg +++ b/tools/uncrustify.cfg @@ -1,5 +1,8 @@ # Uncrustify-0.71.0_f +# IMPORTANT: Output is different if using Uncrustify 0.73 or newer, and config file format has changed in newer versions. +# Use version 0.71 or 0.72 to get matching code formatting. + # # General options # |
