feature: golangci configuration
This commit is contained in:
parent
a8f1953ef2
commit
912d7ead23
26
.golangci.yml
Normal file
26
.golangci.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
linters:
|
||||||
|
enable:
|
||||||
|
- errcheck
|
||||||
|
- errorlint
|
||||||
|
- gocritic
|
||||||
|
- gosec
|
||||||
|
- gosimple
|
||||||
|
- govet
|
||||||
|
- gci
|
||||||
|
- misspell
|
||||||
|
- nonamedreturns
|
||||||
|
- staticcheck
|
||||||
|
- unconvert
|
||||||
|
- unparam
|
||||||
|
- unused
|
||||||
|
- whitespace
|
||||||
|
|
||||||
|
linters-settings:
|
||||||
|
gci:
|
||||||
|
sections:
|
||||||
|
- standard
|
||||||
|
- default
|
||||||
|
- prefix(antoine-roux.tk/projects/go)
|
||||||
|
|
||||||
|
run:
|
||||||
|
timeout: 5m
|
3
Makefile
3
Makefile
@ -6,3 +6,6 @@ build:
|
|||||||
run:
|
run:
|
||||||
@chmod +x ./out/main
|
@chmod +x ./out/main
|
||||||
./out/main
|
./out/main
|
||||||
|
|
||||||
|
ci:
|
||||||
|
golangci-lint run --fix
|
||||||
|
@ -3,7 +3,5 @@ package main
|
|||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
fmt.Println("Hello world !")
|
fmt.Println("Hello world !")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
2
doc.go
Normal file
2
doc.go
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
// Package gotemplate is a sample project for bootstrapping golang project.
|
||||||
|
package gotemplate
|
@ -1 +1,9 @@
|
|||||||
# documentations
|
# documentations
|
||||||
|
|
||||||
|
local :
|
||||||
|
|
||||||
|
linter required
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ brew install golangci-lint
|
||||||
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user