Skip to content

Ability to specify build tags #1219

@kolyshkin

Description

@kolyshkin

Welcome

  • Yes, I understand that the GitHub action repository is not the repository of golangci-lint itself.
  • Yes, I've searched similar issues on GitHub and didn't find any.

Your feature request related to a problem? Please describe.

Some large projects use a lot of build tags, and depending on the build tags set, specific files are either included or excluded. So, in order to lint all the code, one needs to run golangci-lint a few times, using different sets of build tags every time (specified via --build-tags argument rather than in .golangci.yml).

Describe the solution you'd like.

It would be helpful to be able to specify build tags as the action parameter. Something like this?

      - uses: golangci/golangci-lint-action@v7 # no build tags
      - uses: golangci/golangci-lint-action@v7
        with:
          build-tags: openpgp
      - uses: golangci/golangci-lint-action@v7
        with:
          build-tags: remote

Describe alternatives you've considered.

I don't know :( there is no way to specify a different config file, or command line parameters, or anything of the sort. Perhaps I'm missing something obvious here.

Additional context.

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions