Skip to content

nolint for function and for line #106

Closed
@rekby

Description

@rekby

for code:

package main

import (
	"bytes"
	"io"
)

//nolint:gas
func main() {
	var buf io.Writer = &bytes.Buffer{}
	//nolint:errcheck
	buf.Write([]byte("123"))
}

I have error errcheck

golangci-lint run
main.go:12:11: Error return value of `buf.Write` is not checked (errcheck)
        buf.Write([]byte("123"))

Expected no errors:

Congrats! No issues were found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: nolintRelated to nolint directive and nolintlintbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions