Skip to content

x/tools/gopls: stylistic diagnostics emitted for generated code #36914

Closed
@muirdm

Description

@muirdm

In particular the staticcheck "ST*" stylistic checks seem to be reporting diagnostics for generated code. I think the staticcheck standalone driver suppresses stylistic errors for generated files.

To reproduce, ensure gopls staticcheck integration is enabled and create a file foo.gen.go:

// Code generated by robot.
// DO NOT EDIT!

package foo

var REALLY_Good_Name = 1

I expect to see no diagnostic for "REALLY_Good_Name" but I get ST1003.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeToolsThis label describes issues relating to any tools in the x/tools repository.goplsIssues related to the Go language server, gopls.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions