Code style is missing (src/README-DEVEL)
I suppose the code style describing brackets/spaces/tabs/etc was either never there or was deleted. See here: https://github.com/ea4k/klog/blob/d308f9862ddb2f3895f3c6f7452f2327f94ea83e/src/README-DEVEL#L133-L134
Suggestions:
- Move
README-DEVELand any other text files out of/src/and into/(or maybe/docs/or/txt/) - Regarding the code style:
- See if the code style was ever present, restore it and update it to reflect modern C++ features/recommendations
- Maybe just write a new code style altogether from scratch
- Maybe add a
make linttarget to run a linter (should be a separate issue)
I believe there are recommendations for header include order. The recommended way being: First the most specific header, then library headers, then standard libraries. klog does the exact opposite, which is a common coding style even in other C++ projects.
I can't find the exact Core C++ guideline, but it may be in there. Or maybe it's bad advice. Please let me know. But if it's good advice, put it in the klog coding style I guess?
Here's at least someone's blog post about it: https://blog.knatten.org/2010/07/01/the-order-of-include-directives-matter/
There are ~5500 qDebug() statements in the codebase of which only about 77 are currently active and not commented out.
There are 0 qInfo(), qWarn(), qCritical() and qFatal() messages. The coding style should mention using other log levels as well where appropriate.
Debugging would be a lot easier if you can just set the log level, get to testing and see other unrelated messages. The log is kind of sparse right now.
qDebug()/Info()/etc messages are supposedly not "meant" to be visible to the user and these macros may be disabled in release builds. Should klog have logging enabled even in release builds?