I'm currently working on enhancing our approach to enforcing code documentation coverage across several repositories. We manage three main repositories: one in C++, one in C and C++, and another in Python. For the C and C++ repositories, we utilize Doxygen with Javadoc-style comments, while for Python, we apply Google-style docstrings. At present, we have a CI pipeline that runs Doxygen with every merge request and compares the documentation coverage against the main branch. If the coverage decreases, the user gets notified, and the MR is blocked. I'm curious to know if there are better tools or CI integrations that could automate documentation checks. Additionally, I'd like to know what a good setup would look like for Python, specifically to validate or measure docstring coverage. Has anyone here implemented pre-commit or pre-push git hooks to catch missing documentation or docstring issues before creating a merge request? Thanks for your insights!
1 Answer
I think using code reviews is a solid approach, but it would be even better to automate some checks. That way, developers get immediate feedback on missing documentation, especially for structured stuff like function documentation. It keeps everyone in the loop and helps maintain consistent documentation standards!

Exactly! While reviewers are essential, an automated system could act as a first line of defense, ensuring nothing slips through the cracks.