Skip to content

[QST] How does coderabbit measure doc coverage? #1425

@np96

Description

@np96

What is your question?

The CodeRabbit docstring coverage evaluation is unclear and appears inconsistent with the repository’s documentation requirements.

In this PR/commit:

2a98a4f

CodeRabbit reports:

Docstring coverage is 71.43% which is insufficient. The required threshold is 80.00%.

Since 71.43% = 5/7, it appears CodeRabbit is counting 7 modified symbols. However, the modified methods appear to already have documentation where required, and the report does not list which 2 symbols are considered undocumented.

I then tried adding inline documentation in this commit:

4dc4a44

Unexpectedly, the reported coverage became:

Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%.

That looks like 5/8, meaning the change increased the denominator but did not increase the documented-symbol count.

Could you please explain the docstring coverage rules used by CodeRabbit, specifically:

  1. Which symbols are counted in the numerator and denominator?
  2. Are C++ structs/classes counted, or only functions/methods?
  3. Are changed existing symbols counted even if the declaration itself was not modified?
  4. What comment formats are recognized for C++ documentation? For example, are ///, //! \brief, and /** ... */ all accepted?
  5. Is there a way to make CodeRabbit list the exact symbols considered undocumented?

Without this information, it is difficult to act on the coverage warning without unnecessary trial-and-error commits.

Metadata

Metadata

Assignees

Labels

awaiting responseThis expects a response from maintainer or contributor depending on who requested in last comment.questionFurther information is requested

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions