Skip to content

golangci-lint fails due to unknown --out-format flag #2042

@franpog859

Description

@franpog859

Preflight Checklist

  • I have searched the issue tracker for an issue that matches the one I want to file, without success.
  • I am not looking for support or already pursued the available support channels without success.
  • I have checked the troubleshooting guide for my problem, without success.

Viper Version

1.20.1

Go Version

1.24

Config Source

Manual set

Format

No response

Repl.it link

No response

Code reproducing the issue

Expected Behavior

Makefile does not contain the removed golangci-lint flag. The GitHub Action with the viper vendored passes

Actual Behavior

Makefile does contain the removed golangci-lint flag (--out-format). The GitHub Action with the viper vendored fails:

  Running [/home/runner/golangci-lint-2.1.6-linux-amd64/golangci-lint run --out-format=github-actions --path-prefix=.] in [/home/runner/work/myapp/myapp] ...
  Error: unknown flag: --out-format
  Failed executing command with error: unknown flag: --out-format
  
  Error: golangci-lint exit with code 3
  Ran golangci-lint in 101ms

Steps To Reproduce

Create a repo that uses viper, vendor it, and run golangci-lint on the GitHub Action CI job

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions