Coding style, license headers updates
Our codebase uses old kdelibs styling with 2 space indentation (see astyle-kmymoney.sh
)
However, KDE Frameworks current guidelines match Qt styling, which dictates 4 spaces, amongst other syntax rules. Many IDEs come with Qt syntax stylers built in, so in order to keep things simple for new devs and ourselves, we should consider re-formatting all our codebase.
This will also enable us to enforce consistent styling checks in Merge Requests using CI/CD.
Tasks:
-
decide if and when to perform code restyling -
updategit-hooks help making sure the code checked-in is well formatted, so this would be redundant.style-kmymoney.sh
script and adapt for CI/CD purposes. I saw some examples in other projects on invent.kde.org that we may just adapt straight-up. -
see if git-hooks are still available in GitLab to enforce compliance when checking-in to master
(main
) directly (by blocking the check-in with an appropriate message) -
update source file to use SPDX instead of full-text license: https://community.kde.org/Guidelines_and_HOWTOs/Licensing#Conversion_from_Traditional_License_Headers_to_SPDX_Expressions -
remove obsolete COPYING, AUTHORS after migrating all the source to SPDX -
reformat the complete codebase (we wait until GSoC 2021 additions have been merged to avoid conflicts for the students)
Edited by Thomas Baumgart