# comment-style

Require canonical style for comments and documentation

Varying comment casing, punctuation, sentence layout, and width gives equivalent prose inconsistent source forms.
Instead, you SHOULD use the canonical comment form.

Documentation sentences begin with uppercase prose, use terminal punctuation, and separate a one-sentence summary paragraph from further prose.
Ordinary comments begin with a lowercase action or label and omit the final period when they contain one sentence.
Every sentence begins on its own physical line, ordinary sentence continuations use one additional space, and prose ends by visual column 100.
Initialisms, marked source, legal comments, Markdown, code blocks, and unbreakable tokens retain their authored form.

- Category: style
- Level: warning
- Fix: automatic
- Scope: module

## Reported

```ds title="main.ds"
/// return the active session.
function session(): int32 {
    return 1;
}
```

## Accepted

```ds title="main.ds"
/// Return the active session.
function session(): int32 {
    return 1;
}
```

[language/linter/src/rules/style/comment_style.rs:8](https://github.com/destack-sh/destack/blob/main/language/linter/src/rules/style/comment_style.rs#L8)
