Просмотр исходного кода

Update golangci-lint

tags/v2.1.6^2
9seconds 4 лет назад
Родитель
Сommit
1575b82688
4 измененных файлов: 11 добавлений и 6 удалений
  1. 7
    2
      .github/workflows/ci.yaml
  2. 1
    1
      .golangci.toml
  3. 1
    1
      Makefile
  4. 2
    2
      mtglib/internal/obfuscated2/server_handshake_fuzz_test.go

+ 7
- 2
.github/workflows/ci.yaml Просмотреть файл

@@ -111,10 +111,15 @@ jobs:
111 111
         with:
112 112
           submodules: recursive
113 113
 
114
+      - name: Setup Go
115
+        uses: actions/setup-go@v2
116
+        with:
117
+          go-version: ^1.18
118
+
114 119
       - name: Run linter
115
-        uses: golangci/golangci-lint-action@v2
120
+        uses: golangci/golangci-lint-action@v3
116 121
         with:
117
-          version: v1.44.2
122
+          version: v1.45.0
118 123
 
119 124
   docker:
120 125
     name: Docker

+ 1
- 1
.golangci.toml Просмотреть файл

@@ -9,4 +9,4 @@ format = "colored-line-number"
9 9
 
10 10
 [linters]
11 11
 enable-all = true
12
-disable = ["ireturn", "varnamelen", "gochecknoglobals", "gas", "goerr113", "exhaustivestruct", "containedctx"]
12
+disable = ["thelper", "ireturn", "varnamelen", "gochecknoglobals", "gas", "goerr113", "exhaustivestruct", "containedctx"]

+ 1
- 1
Makefile Просмотреть файл

@@ -2,7 +2,7 @@ ROOT_DIR     := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
2 2
 IMAGE_NAME   := mtg
3 3
 APP_NAME     := $(IMAGE_NAME)
4 4
 
5
-GOLANGCI_LINT_VERSION := v1.44.2
5
+GOLANGCI_LINT_VERSION := v1.45.0
6 6
 
7 7
 VERSION            := $(shell git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)
8 8
 COMMON_BUILD_FLAGS := -trimpath -mod=readonly -ldflags="-extldflags '-static' -s -w -X 'main.version=$(VERSION)'"

+ 2
- 2
mtglib/internal/obfuscated2/server_handshake_fuzz_test.go Просмотреть файл

@@ -19,7 +19,7 @@ func FuzzServerSend(f *testing.F) {
19 19
 			Once().
20 20
 			Run(func(args mock.Arguments) {
21 21
 				message := make([]byte, len(data))
22
-				handshakeData.decryptor.XORKeyStream(message, args.Get(0).([]byte))
22
+				handshakeData.decryptor.XORKeyStream(message, args.Get(0).([]byte)) // nolint: forcetypeassert
23 23
 				assert.Equal(t, message, data)
24 24
 			})
25 25
 
@@ -45,7 +45,7 @@ func FuzzServerReceive(f *testing.F) {
45 45
 			Run(func(args mock.Arguments) {
46 46
 				message := make([]byte, len(data))
47 47
 				handshakeData.encryptor.XORKeyStream(message, data)
48
-				copy(args.Get(0).([]byte), message)
48
+				copy(args.Get(0).([]byte), message) // nolint: forcetypeassert
49 49
 			})
50 50
 
51 51
 		n, err := handshakeData.proxyConn.Read(buffer)

Загрузка…
Отмена
Сохранить