trunk-io / plugins

Trunk.io plugins repo
https://docs.trunk.io
MIT License
125 stars 38 forks source link

golangci-lint should be installed via binary (github release) not go installed #876

Open sheldonhull opened 1 week ago

sheldonhull commented 1 week ago

Not only is it significantly slower, it's also the maintainers recommendation to install this via binary. This tool aggregates so many tools it's a really bad one to install from source.

I brought this up a while back and still use system installed golangci-lint to avoid the long download/initialization time, but would like to stop this and use trunk exclusively if we can get the binary installed instead.

binaries in github

TylerJang27 commented 1 week ago

We'll look into this, there may be a historical reason we did not do this initially. In the meantime, you can absolutely add a new download config for it and reference it with a runtime like we do for nancy (except using tools):

downloads:
  - # new golangci-lint download here
tools:
  definitions:
    - name: golangci-lint-2
      download: golangci-lint-download
      shims: [golangci-lint]
      known_good_version: 1.46.2
lint:
  definitions:
    - name: golangci-lint
       tools: [golangci-lint-2]
       runtime: go