[CI] Add function ensure-one-newline to scripts/check-format.sh since clang-13...
- Related MR: sa4/audio/ivas-basop!265 (closed)
- Requested reviewers: @kiene, @doehla
Reason why this change is needed
- When adding the clang-format job to the BASOP CI, it was found that it was not able to fix the formatting errors. It seems that clang-13 is not able to handle missing newlines. One fix could be to add a newline to each file before formatting. However, for one particular file, ending with a #endif and a comment, it was not able to remove excessive newlines. For this reason, a patch to the check-format.sh script is proposed. I am open to better solutions.
Description of the change
- A function ensure-one-newline is added to the check-format.sh script, which is applied before the formatting command.
Affected operating points
- CI only, but may affect formatting. Seems to work when I tested it on the BASOP repo, but should be verified.