Skip to content

Commit 77c13da

Browse files
author
buglloc
committed
Pass GoVersion to vet
В процессе обновления staticcheck обнаружил новые фолзы для deprecated-related линетов, оказалось они переделали определение версии Go с которой работают: https://staticcheck.dev/changes/2024.1/#improved-handling-of-go-versions Этот PR должен все полечить благодаря передаче текущей (==против которой собирается модуль) версии Go (см. HIDDEN_URL Вот так проверял, что фолз ушел: ``` buglloc@buglloc-dev:~/work/a.yandex-team.ru$ arc co users/robot-contrib/release-yolint-yolint-7d4447f67f1588525055db15290915ef76094f20-37 Switched to branch 'users/robot-contrib/release-yolint-yolint-7d4447f67f1588525055db15290915ef76094f20-37' buglloc@buglloc-dev:~/work/a.yandex-team.ru$ ya test --style fintech/common/infra-gen/plugins/postgres ------- [TS] {debug, default-linux-x86_64} fintech/common/infra-gen/plugins/postgres/gotest/govet >> gotest.vet.txt::govet [FAIL] Test command err: $S/fintech/common/infra-gen/plugins/postgres/diff_calculator_test.go:16:1: "SA3000: TestMain should call os.Exit to set exit code" $S/fintech/common/infra-gen/plugins/postgres/diff_calculator_test.go:16:1: "SA3000: if you believe this report is false positive, please silence it with //nolint:sa3000 comment" Number of suites skipped by class type: 1 fintech/common/infra-gen/plugins/postgres/gotest <govet> ------ sole chunk ran 1 test (total:0.54s - test:0.51s) [fail] gotest.vet.txt::govet [default-linux-x86_64-debug] (0.18s) $S/fintech/common/infra-gen/plugins/postgres/diff_calculator_test.go:16:1: "SA3000: TestMain should call os.Exit to set exit code" $S/fintech/common/infra-gen/plugins/postgres/diff_calculator_test.go:16:1: "SA3000: if you believe this report is false positive, please silence it with //nolint:sa3000 comment" Logsdir: /home/buglloc/work/a.yandex-team.ru/fintech/common/infra-gen/plugins/postgres/gotest/test-results/govet/testing_out_stuff Stderr: /home/buglloc/work/a.yandex-team.ru/fintech/common/infra-gen/plugins/postgres/gotest/test-results/govet/testing_out_stuff/gotest.vet.txt.govet.err ------ FAIL: 1 - FAIL fintech/common/infra-gen/plugins/postgres/gotest Total 3 suites: 2 - GOOD 1 - FAIL Total 15 tests: 14 - GOOD 1 - FAIL Failed buglloc@buglloc-dev:~/work/a.yandex-team.ru$ arc co -b yolint-tst Switched to branch 'yolint-tst' buglloc@buglloc-dev:~/work/a.yandex-team.ru$ arc cherry-pick 0f9c71ea3697096a12cb6d9dfaa31ddddc99b6ca commit 0f9c71ea3697096a12cb6d9dfaa31ddddc99b6ca Pass GoVersion to vet HEAD is now at 1e1176cc27f0f5d8e3a8588fbd6876324a24b54e Pass GoVersion to vet buglloc@buglloc-dev:~/work/a.yandex-team.ru$ ya test --style fintech/common/infra-gen/plugins/postgres Number of suites skipped by class type: 1 Total 3 suites: 3 - GOOD Total 15 tests: 15 - GOOD Ok buglloc@buglloc-dev:~/work/a.yandex-team.ru$ ``` commit_hash:b5835004f247d4d91eb19b7c71e4e32032a99c29
1 parent 69da9e3 commit 77c13da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build/scripts/go_tool.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,7 @@ def gen_vet_info(args):
283283
'Compiler': 'gc',
284284
'Dir': os.path.join(args.source_root, get_source_path(args)),
285285
'ImportPath': import_path,
286+
'GoVersion': ('go%s' % args.goversion),
286287
'GoFiles': [x for x in args.go_srcs if x.endswith('.go')],
287288
'NonGoFiles': [x for x in args.go_srcs if not x.endswith('.go')],
288289
'ImportMap': import_map,

0 commit comments

Comments
 (0)