Skip to content

An opinionated configuration file for golangci-lint.

Notifications You must be signed in to change notification settings

rezakhademix/golangci-lint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

A Golang Linter Configuration file for golangci-lint

This is an opinionated configuration file for golangci-lint. Before using this config file you need to do two steps:

1) install golangci-lint

# first way: binary will be $(go env GOPATH)/bin/golangci-lint

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest


# alternative way: install it into user ./bin/

curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s latest


# docker:

docker run --rm -v $(pwd):/app -v ~/.cache/golangci-lint/v1.55.2:/root/.cache -w /app golangci/golangci-lint:latest golangci-lint run -v

2) put .golangci.yml in your project root directory

For more information and a well detailed story you can read What is A Golang Linter And How To Use It?.

For integrating golangci-lint with VSCode just put these line on user JSON settings file:

"go.lintTool": "golangci-lint",
"go.lintFlags": [
    "--fast"
]

Used Linters

List of used linters inside config file:

About

An opinionated configuration file for golangci-lint.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published