[Qgis-psc] pre-commit for code-formatting
Denis Rouzaud
denis.rouzaud at gmail.com
Mon Dec 2 01:24:33 PST 2024
Dear devs,
A quick update on the recent work I pushed concerning the code-formatting.
Flake8 and black have been introduced for Python files and I am
progressively introducing clang-format for our cpp code.
All these tools are now configured individually as pre-commit instead of
globally called from prepare_commit.sh.
You can enable this by calling:
pre-commit install
(add -f if you had prepare_commit.sh set as a pre-commit hook before).
This work is still ongoing, and some files are still handled by
prepare_commit.sh. But it is defined as a local repo in the pre-commit
config. This means that you don't have to care about this :)
If you have any suggestions to improve the tools or formatting options,
this is all very welcome.
For more details:
pre-commit config:
https://github.com/qgis/QGIS/blob/master/.pre-commit-config.yaml
clang-format config: https://github.com/qgis/QGIS/blob/master/.clang-format
Best regards,
Denis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-psc/attachments/20241202/e81640f6/attachment.htm>
More information about the QGIS-PSC
mailing list