Skip to content

Parallelize golangci-lint #48

@jay-babu

Description

@jay-babu

Unsure if this is possible but i am using the below. it would be nice if we could take advantage of --allow-parallel-runners to parallelize the runs. I have about 5 modules and it takes a very long time if I edit all of them.

# yaml-language-server: $schema=https://json.schemastore.org/pre-commit-config.json
repos:
  - repo: https://github.com/tekwizely/pre-commit-golang
    rev: v1.0.0-rc.4
    hooks:
      # GolangCI-Lint: pick ONE of these, depending on how you want it to scale
      - id: golangci-lint-repo-mod   # monorepo: run per module that has staged changes (sweet spot)
        args:
          - --fix
      # - id: golangci-lint           # file-based (often not what you want for lint)
      # - id: golangci-lint-mod       # module mode
      # - id: golangci-lint-repo-pkg  # even narrower: per package that changed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions