DEV Community

Cover image for 1 line of code to check all your code documentation
MKSeymour
MKSeymour

Posted on

1 line of code to check all your code documentation

If {
✅ you have code in Python
✅ you are not sure which documentation of the code is reliable
✅ don't have time to check for it manually
}

Then : definitely look for codeBERT library

codeBERT is an open-source package to automatically check if your code documentation is up-to-date. codeBERT uses Machine Learning on code to classify the docstring of functions.
Given a function f and a doc string d a code-bert predicts whether f and d are matching or not.

So far the accuracy of the library is pretty stable around 93-95% when it comes to detect if a docstring is outdated.

Top comments (0)