glinter/annotation
Types
pub type Annotation {
Annotation(
rules: List(String),
comment_line: Int,
target_line: Int,
scope: Scope,
inline: Bool,
)
}
Constructors
-
Annotation( rules: List(String), comment_line: Int, target_line: Int, scope: Scope, inline: Bool, )Arguments
- inline
-
True when the nolint comment trails real code on the same line, e.g.
panic as "x" // nolint: avoid_panic. Inline placement is disallowed becausegleam formatmay move the comment off the line when wrapping, silently breaking the suppression. Inline annotations do NOT suppress; the runner emits anolint_inlinewarning instead.
Values
pub fn is_inline(line: String) -> Bool
True when there’s real code before the nolint comment on the same line.
pub fn parse(source: String) -> List(Annotation)
Parse source text for // nolint: comments and return annotations.