Skip to content

Commit

Permalink
Chore: use golangci-lint config file
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreamacro committed Feb 18, 2022
1 parent a0221bf commit 03e4b5d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
linters:
disable-all: true
enable:
- gofumpt
- megacheck
- govet
- gci

linters-settings:
gci:
sections:
- standard
- prefix(github.com/Dreamacro/clash)
- default
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ all-arch: $(PLATFORM_LIST) $(WINDOWS_ARCH_LIST)
releases: $(gz_releases) $(zip_releases)

lint:
golangci-lint run --disable-all -E govet -E gofumpt -E megacheck ./...
golangci-lint run ./...

clean:
rm $(BINDIR)/*
4 changes: 2 additions & 2 deletions component/dialer/bind_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"net"
"syscall"

"golang.org/x/sys/unix"

"github.com/Dreamacro/clash/component/iface"

"golang.org/x/sys/unix"
)

type controlFn = func(network, address string, c syscall.RawConn) error
Expand Down

0 comments on commit 03e4b5d

Please sign in to comment.