Skip to content

spaced-compiler-directive

Detect compiler directives disabled by leading whitespace.

Updated View as Markdown

Default severity: warning

Purpose: detect top-level compiler directives that look intentional but are ignored because whitespace appears between // and go:.

Bad

// go:noinline
func call() {}

Good

//go:noinline
func call() {}
Navigation

Type to search…

↑↓ navigate↵ selectEsc close