Skip to content

nolint directive is not feature compatible with gometalinter #65

Closed
@alecthomas

Description

@alecthomas

In gometalinter, nolint directives can be applied to a branch in the AST, as well as directly on the offending line. golangci-lint does not support the former.

For example, the following does not work:

// nolint
func someFunc() {
  anUnusedVar := true
}

while this does work:

func someFunc() {
  anUnusedVar := true // nolint
}

It would be very helpful if golangci-lint were compatible with gometalinter for nolint directives.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: nolintRelated to nolint directive and nolintlintenhancementNew feature or improvement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions