loading...
Cover image for Improve the Go code with GolangCI-Lint

Improve the Go code with GolangCI-Lint

renatosuero profile image Renato Suero ・1 min read

It is a great tool to run before you send your commit to the repository(maybe you can use git hook).

there is another option gometalinter but golangci-lint is faster than gometalinter.

GitHub logo golangci / golangci-lint

Fast linters Runner for Go

golangci-lint logo

golangci-lint

Fast linters runner for Go


golangci-lint is a fast Go linters runner. It runs linters in parallel, uses caching, supports yaml config, has integrations with all major IDE and has dozens of linters included.

Install golangci-lint

Documentation

Documentation is hosted at https://golangci-lint.run.

Badges

Build Status License Release Docker Github Releases Stats of golangci-lint

Contributors

This project exists thanks to all the people who contribute. How to contribute.

Core Team

About core team

The GolangCI Core Team is a group of contributors that have demonstrated a lasting enthusiasm for the project and community The GolangCI Core Team has GitHub admin privileges on the repo.

Responsibilities

The Core Team has the following responsibilities:

  1. Being available to answer high-level questions about vision and future.
  2. Being available to review longstanding/forgotten pull requests.
  3. Occasionally check issues, offer input, and categorize with GitHub issue labels.
  4. Looking out for up-and-coming members of the GolangCI community who…

To run the tools is pretty simple, you need to run:
golangci-lint run ./...

If you want to use docker, the only thing you need to do is configure the volume to use your project path.

docker run --rm -it -v $GOPATH/src/github.com/golangci/golangci-lint:/go/src/github.com/golangci/golangci-lint golangci-lint run ./...

that's all folks, I hope it can be useful to you =)

Posted on by:

renatosuero profile

Renato Suero

@renatosuero

I'm a 🇧🇷 software engineer living in 🇳🇱 who loves code, learn and share.

Discussion

markdown guide