@@ -48,11 +48,28 @@ reviews:
4848 - path : " **/*.{cpp,hpp}"
4949 instructions : |
5050 Documentation Best Practices
51- - The top of the file after the includes, put a nice /* */ section
52- which gives a high level overview of how the implementation works.
53- - Single line // comments are to be used sparingly and judiciously
54- which explain the why (not the what or how) when it is non-obvious.
55- - Docstrings are required for all classes in public headers in
56- non detail namespaces. They are used for generating the Documentation
57- website. Please give warnings for any class or function that does
58- not have a docstring or has an insufficient docstring.
51+ - Docstrings are required for all classes and functions in public
52+ headers in non-detail namespaces. Docstrings should include a brief
53+ description of purpose, document all parameters, return values, and
54+ any preconditions, postconditions, or exceptions. For template
55+ parameters, document constraints or concepts required. Warn if a
56+ class or function is missing a docstring or if the docstring fails
57+ to cover these elements.
58+ - Avoid redundant documentation that merely restates the obvious from
59+ the name and signature. Docstrings should add value beyond what the
60+ declaration already communicates. Do not warn about terse
61+ documentation for self-explanatory accessors or trivial type aliases.
62+ - Document thread-safety guarantees and exception specifications where
63+ applicable, particularly for classes intended for concurrent use or
64+ functions that may throw.
65+ - Files containing non-trivial implementation logic should include a
66+ `/* */` block comment after the includes that provides a high-level
67+ overview of how the implementation works. This should highlight
68+ anything tricky or non-obvious that a maintainer might need to know
69+ in order to reason effectively about the code. Warn if such files
70+ lack this overview or if the overview appears stale relative to the
71+ code.
72+ - Single-line `//` comments within code should be used sparingly and
73+ judiciously, explaining the why (not the what or how) when it is
74+ non-obvious. Warn about comments that merely restate what the code
75+ does or excessive commenting that adds noise rather than clarity.
0 commit comments