fasterthanlime , Englisch
@fasterthanlime@hachyderm.io avatar

I ran "golintci-lint" on that project I'm porting to Rust and I shouldn't have.

I shouldn't have.

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

Anyway, I still think you probably shouldn't write go, but if you do, please run this on your code, in CI: https://golangci-lint.run

dysfun ,
@dysfun@treehouse.systems avatar

@fasterthanlime yeah rust is great. i wrote this completely safe rust code that isn't even slightly scary https://gist.github.com/jjl/4c8ebf4bee2943a2b2d277741e13b787

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@dysfun looks alright to me!!

creepy_owlet ,
@creepy_owlet@mastodon.online avatar

@fasterthanlime just make sure you have a really beefy machine: my laptop with 16G of RAM triggers the oom killer when running this tool on a somewhat larger project.

rakoo ,

@fasterthanlime

I don't see it in the page: why is gofmt and go vet not enough ?

fasterthanlime OP ,
@fasterthanlime@hachyderm.io avatar

@rakoo Although some linters in that collection are noisy and opinionated, many of them find real world problems before runtime. Try them on your projects and see if it finds some bugs!

groxx , (Bearbeitet )
@groxx@hachyderm.io avatar

@fasterthanlime @rakoo to add to ^ this:
Because go vet is extremely conservative by default, and will continue to be so because "only for guaranteed flaws" is the modus operandi, and doesn't get very many checks even if you include the opt-in stuff.

golangci-lint is a collection of both go vet and the most popular linters by the rest of the ecosystem.

  • Alle
  • Abonniert
  • Moderiert
  • Favoriten
  • random
  • haupteingang
  • Alle Magazine