Skip to content

Reformat code with clang-format and pre-commit

Sergey Ilinykh requested to merge rion/qca:master into master

Current QCA code has no single code style and uses tabs for indentation which looks different in every new viewer/editor.

This change fixes both these problems by switching to spaces and reformatting everything with clang-format and pre-commit. For formatting details see .clang-format and .pre-commit-config.yaml configuration files. On how to use pre-commit see https://pre-commit.com/ Except all the reformatting one manual change was made: windows.h header inclusion was glued to the top with a small trick. Otherwise compilation breaks on Windows

Testing:

Psi IM project has the same change in its QCA fork and it builds and works fine both on Linux and Windows.

Edited by Sergey Ilinykh

Merge request reports