@@ -306,17 +306,18 @@ func (f *fumpter) lineEnd(line int) token.Pos {
306
306
307
307
// rxCommentDirective covers all common Go comment directives:
308
308
//
309
- // //go: | standard Go directives, like go:noinline
310
- // //some-words: | similar to the syntax above, like lint:ignore or go-sumtype:decl
311
- // //line | inserted line information for cmd/compile
312
- // //export | to mark cgo funcs for exporting
313
- // //extern | C function declarations for gccgo
314
- // //sys(nb)? | syscall function wrapper prototypes
315
- // //nolint | nolint directive for golangci
309
+ // //go: | standard Go directives, like go:noinline
310
+ // //some-words: | similar to the syntax above, like lint:ignore or go-sumtype:decl
311
+ // //line | inserted line information for cmd/compile
312
+ // //export | to mark cgo funcs for exporting
313
+ // //extern | C function declarations for gccgo
314
+ // //sys(nb)? | syscall function wrapper prototypes
315
+ // //nolint | nolint directive for golangci
316
+ // //noinspection | noinspection directive for GoLand and friends
316
317
//
317
318
// Note that the "some-words:" matching expects a letter afterward, such as
318
319
// "go:generate", to prevent matching false positives like "https://site".
319
- var rxCommentDirective = regexp .MustCompile (`^([a-z-]+:[a-z]+|line\b|export\b|extern\b|sys(nb)?\b|nolint \b)` )
320
+ var rxCommentDirective = regexp .MustCompile (`^([a-z-]+:[a-z]+|line\b|export\b|extern\b|sys(nb)?\b|no(lint|inspection) \b)` )
320
321
321
322
func (f * fumpter ) applyPre (c * astutil.Cursor ) {
322
323
f .splitLongLine (c )
0 commit comments