Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: format & lint #1759

Merged
merged 3 commits into from Apr 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/linters/.golangci.yml
Expand Up @@ -2,14 +2,12 @@ run:
timeout: 5m
skip-files:
- generated.*

issues:
new: true
exclude-rules:
- linters:
- staticcheck
- staticcheck
text: "SA1019:"

linters:
enable:
- asciicheck
Expand All @@ -19,13 +17,13 @@ linters:
- gofmt
- gofumpt
- goimports
- golint
- goprintffuncname
- gosimple
- govet
- ineffassign
- misspell
- nakedret
- revive
- rowserrcheck
- staticcheck
- structcheck
Expand All @@ -39,7 +37,11 @@ linters:
- deadcode
- errcheck
- unused

linters-settings:
goimports:
local-prefixes: github.com/v2fly/v2ray-core
revive:
rules:
- name: blank-imports
severity: warning
disabled: true
8 changes: 6 additions & 2 deletions infra/vformat/main.go
Expand Up @@ -170,8 +170,12 @@ func main() {
}

goimportsArgs := []string{
"-w",
"-local", "github.com/v2fly/v2ray-core",
"write",
"--NoInlineComments",
"--NoPrefixComments",
"--Section", "Standard",
"--Section", "Default",
"--Section", "pkgPrefix(github.com/v2fly/v2ray-core)",
}

RunMany(gofmt, gofmtArgs, rawFilesSlice)
Expand Down
2 changes: 1 addition & 1 deletion proxy/vmess/encoding/commands_test.go
@@ -1,10 +1,10 @@
package encoding_test

import (
"github.com/stretchr/testify/assert"
"testing"

"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"

"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
Expand Down
2 changes: 0 additions & 2 deletions transport/internet/headers/http/linkedreadRequest.go
Expand Up @@ -3,8 +3,6 @@ package http
import (
"bufio"
"net/http"

// required to use go:linkname
_ "unsafe"
)

Expand Down