mirror of
https://github.com/esphome/esphome.git
synced 2026-08-22 22:26:21 +00:00
[ai] Add instructions for concise comments (#18522)
This commit is contained in:
@@ -763,3 +763,13 @@ The project uses English for non-code content. When drafting documentation, code
|
|||||||
PR descriptions, and similar text, avoid technical jargon. Instead, express concepts in plain English,
|
PR descriptions, and similar text, avoid technical jargon. Instead, express concepts in plain English,
|
||||||
using standard technical terms only when required. Ensure the text is readily comprehensible to a wide
|
using standard technical terms only when required. Ensure the text is readily comprehensible to a wide
|
||||||
audience, including non-native English speakers.
|
audience, including non-native English speakers.
|
||||||
|
|
||||||
|
## 10. Code Comments
|
||||||
|
|
||||||
|
Code comments on individual lines should be used only where necessary to flag issues that may not be obvious
|
||||||
|
on a simple reading of the code. Keep them short (e.g. 1 or 2 lines).
|
||||||
|
|
||||||
|
Function and method comment blocks may include more detail as required to make
|
||||||
|
calling contracts clear and document parameter usage, but should still be kept concise.
|
||||||
|
|
||||||
|
Avoid redundancy and repetition; comments should never simply restate what the code already says.
|
||||||
|
|||||||
Reference in New Issue
Block a user