How to Ensure Code Documentation in CI Pipelines for C/C++ and Python?

0
19
Asked By CuriousCoder99 On

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

Answered By DocuMaster23 On

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!

ReviewWizard88 -

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

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.