🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Tools to enhance code and documentation quality

Started by
0 comments, last by DerTroll 4 years, 6 months ago

Hi guys,

I recently started a new job (nothing game related - :( ) where I had to setup a new GitHub repository for python code. It was requested to add some tools that help you maintain a good code quality. In the process of creating this repository I learned a lot about some nice tools (for python), that I find really useful. Now I am wondering if there are equivalent tools for C++, that I can use for my game engine. I will give you a short overview of the kind of tools I am interested in:


pylint/flake8 equivalent:

In python these tools check if your coding style is consistent with the PEP8 coding standard. For example variable, function and class names. It also checks the formatting of the code. So far I have always used clang-format that is automatically applied when I save a file, but that is only for formatting and so far I do not test if pull requests are properly formatted. So I would like to know, if there is the possibility to setup a GitHub action, that checks if the code format of the whole pull request is correct and fails if not. Maybe clang-format itself offers this?

Additionally I want to know, if there is a configurable tool where I can define a coding standard (variable, function, class names etc.) and that allows me to run a check on my repository which I can also use for another GitHub action which is required to pass.


pydocstyle equivalent:

Currently I am doing my documentation with doxygen and have no plans in changing that. However, at the moment I am not really paying much attention to the documentation. I always add the doc-strings, but I don't check if they are consistent. In python, pydocstring checks for you, if your docstrings are correctly formatted and if all files and functions are documented correctly. This involves checking if all function parameters have a docsting. I would like to have something equivalent for c++ and doxygen. I know that doxygen itself produces warnings if something is not documented correctly, but can I actually tell doxygen to fail on warnings? If yes, I can just use a simple GitHub action to check the documentation style.


other tools YOU use:

I am currently using automated tests (Travis CI) to check my builds and CodeCov to ensure that everything is tested. However, if I have a look at the GitHub marketplace, there are tons of tools. So, I am quite curious to know which tools you can recommend to enhance your code quality. I am mainly interested in tools you can run locally on your machine. I would use GitHub actions to run them during a pull request. But I would also like to know about useful GitHub Apps, that you find useful.

Greetings

This topic is closed to new replies.

Advertisement