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

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

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

9
 
9
 
10
 [linters]
10
 [linters]
11
 enable-all = true
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
 IMAGE_NAME   := mtg
2
 IMAGE_NAME   := mtg
3
 APP_NAME     := $(IMAGE_NAME)
3
 APP_NAME     := $(IMAGE_NAME)
4
 
4
 
5
-GOLANGCI_LINT_VERSION := v1.44.2
5
+GOLANGCI_LINT_VERSION := v1.45.0
6
 
6
 
7
 VERSION            := $(shell git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)
7
 VERSION            := $(shell git describe --exact-match HEAD 2>/dev/null || git describe --tags --always)
8
 COMMON_BUILD_FLAGS := -trimpath -mod=readonly -ldflags="-extldflags '-static' -s -w -X 'main.version=$(VERSION)'"
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
 			Once().
19
 			Once().
20
 			Run(func(args mock.Arguments) {
20
 			Run(func(args mock.Arguments) {
21
 				message := make([]byte, len(data))
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
 				assert.Equal(t, message, data)
23
 				assert.Equal(t, message, data)
24
 			})
24
 			})
25
 
25
 
45
 			Run(func(args mock.Arguments) {
45
 			Run(func(args mock.Arguments) {
46
 				message := make([]byte, len(data))
46
 				message := make([]byte, len(data))
47
 				handshakeData.encryptor.XORKeyStream(message, data)
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
 		n, err := handshakeData.proxyConn.Read(buffer)
51
 		n, err := handshakeData.proxyConn.Read(buffer)

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