3 ms·
// DiagnosticSeverity indicates the severity of a diagnostic. type DiagnosticSeverity int Hmmm :robot:
by whateveracct 7mo ago
// DiagnosticSeverity indicates the severity of a diagnostic.
type DiagnosticSeverity int
Hmmm :robot:
- jryio 7mo agoThe godoc format enforces that the comment start with the name of the identifier and be a complete sentence(s) describing what that identifier does. Predates LLMs
- badc0ffee 7mo agoI wouldn't say it enforces that the comment start with the name of the identifier. Maybe certain linter options enforce that? In https://go.dev/doc/comment https://go.dev/doc/comment it seems to be a convention, but there are a couple of examples there where the don't follow it.
- rumno0 7mo agoYeah some times godoc comments look crap by necessity
- fainpul 7mo agoBut you don't have to add a docstring. Cases like this are worse than no docstring at all, because it wastes the reader's time. If you add one, at least make the effort to provide some useful information. For example which is more severe: higher or lower numbers.
- rumno0 7mo agoI disagree - you should have docstring and I don't think this is worse by having it... its just not ideal
- hrmtst93837 7mo ago[flagged]
- maleldil 7mo agoEvery public item should have a docstring, even if it's just to indicate that there's nothing special about the item.