Skip to content

staticcheck: Add per file (or generated) ignores #429

Open
@klauspost

Description

@klauspost

I would like to add ignores similar to "File-based linter directives", but in the configuration or in another file.

Background: I am dealing with generated files that violate a check (SA4003) in rare cases. When using the tool with go generate I don't have a reasonable (not hacky, or requiring a dedicated command installed) way to add a //lint:file-ignore SA4003 to the file.

For now, I have to disable the code check for my entire code base. I may be missing an obvious way to do this, but if not, it would help a lot to have that option.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions