terrencepreilly / darglint

A python documentation linter which checks that the docstring description matches the definition.
MIT License
481 stars 41 forks source link

Typo in docstring section name leads to confusing DAR101 errors #171

Open taranlu-houzz opened 3 years ago

taranlu-houzz commented 3 years ago

Not sure if this is actually something that should be addressed by darglint, but I just ran into a very confusing issue where I had a typo in for the name of the "Parameters" section of my docstring (numpy docstring format). This made it so that darglint reported missing parameters (DAR101), which was very confusing, since my typo was not obvious ("Paramaters"), and the error made me focus on the parameter names themselves. I was wondering if maybe it would make sense to have darglint check for missing section headings to help clarify such scenarios?

taranlu-houzz commented 3 years ago

I also had a case where I was missing an "s" for the "Warnings" heading, which comes after "Parameters," "Returns," etc. This made darglint report that all params where missing, which was extremely confusing.