Skip to content

[Bug]: Running lint task modifies generated files #505

Description

@zachfedor

Description

See this failing PR action for an example of the problem. If you run make generate and then run make lint, the linter changes tag order of generated files. This then fails the CI check that tries to make sure there is no diff between cleanly generated files and the linted files committed in the PR.

It stems from the following step:

golangci-lint run --no-config --fix --default=none -E tagalign --timeout 10m

Steps to Reproduce

  1. Make any code change that will tweak generated API routes or documentation.
  2. Run make generate and then stage the changes.
  3. Run make lint and see newly unstaged changes to those generated files.

Version

n/a

Operating System

MacOS

Database Backend

SQLite

Additional context

No response

Activity

  1. zachfedor commented on Jun 12, 2025

    @zachfedor
    CollaboratorAuthor

    @parkan I know you most recently worked on the linter. Is there an easy glob pattern we can add to an ignore flag on golangci-lint commands?

  2. parkan commented on Sep 26, 2025

    @parkan
    Collaborator

    @zachfedor I missed this in June, please let me know if this is still relevant so I can investigate or close

  3. zachfedor commented on Sep 30, 2025

    @zachfedor
    CollaboratorAuthor

    Last I checked it was still relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions