Skip to content

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

@zachfedor

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

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