diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c74af6d..965f840 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,12 +15,12 @@ jobs: golangci-lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-go@v5 with: go-version: '1.24' - name: golangci-lint uses: golangci/golangci-lint-action@v8 with: - version: v2.1.6 + version: v2.4.0 args: --timeout 5m diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4de734c..949cc2a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - uses: actions/setup-go@v5 with: go-version: '1.24' diff --git a/Makefile b/Makefile index 2084946..0efff64 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,6 @@ -GOLANGCI_LINT_VERSION = 2.1.6 +GOLANGCI_LINT_VERSION = 2.4.0 ACTIONLINT_VERSION = 1.7.7 +MODERNIZE_VERSION = 0.20.0 test: go test --timeout 10m -race ./... @@ -13,3 +14,6 @@ lint: actionlint: go run github.com/rhysd/actionlint/cmd/actionlint@v$(ACTIONLINT_VERSION) + +modernize: + go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@v$(MODERNIZE_VERSION) -fix ./... diff --git a/go.mod b/go.mod index 77578d2..0ebb7ee 100644 --- a/go.mod +++ b/go.mod @@ -3,19 +3,19 @@ module github.com/ozontech/ch-rollup go 1.24 require ( - github.com/ClickHouse/clickhouse-go/v2 v2.36.0 + github.com/ClickHouse/clickhouse-go/v2 v2.40.1 github.com/alvaroloes/enumer v1.1.2 - github.com/huandu/go-sqlbuilder v1.35.1 - github.com/stretchr/testify v1.10.0 + github.com/huandu/go-sqlbuilder v1.36.1 + github.com/stretchr/testify v1.11.1 go.uber.org/goleak v1.3.0 - go.uber.org/mock v0.5.2 + go.uber.org/mock v0.6.0 go.uber.org/multierr v1.11.0 - golang.org/x/sync v0.15.0 + golang.org/x/sync v0.16.0 ) require ( - github.com/ClickHouse/ch-go v0.66.0 // indirect - github.com/andybalholm/brotli v1.1.1 // indirect + github.com/ClickHouse/ch-go v0.67.0 // indirect + github.com/andybalholm/brotli v1.2.0 // indirect github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-faster/city v1.0.1 // indirect github.com/go-faster/errors v0.7.1 // indirect @@ -28,10 +28,10 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/segmentio/asm v1.2.0 // indirect github.com/shopspring/decimal v1.4.0 // indirect - go.opentelemetry.io/otel v1.36.0 // indirect - go.opentelemetry.io/otel/trace v1.36.0 // indirect - golang.org/x/mod v0.23.0 // indirect - golang.org/x/sys v0.33.0 // indirect - golang.org/x/tools v0.30.0 // indirect + go.opentelemetry.io/otel v1.37.0 // indirect + go.opentelemetry.io/otel/trace v1.37.0 // indirect + golang.org/x/mod v0.27.0 // indirect + golang.org/x/sys v0.35.0 // indirect + golang.org/x/tools v0.36.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 891d9e8..f5c5a58 100644 --- a/go.sum +++ b/go.sum @@ -1,11 +1,11 @@ -github.com/ClickHouse/ch-go v0.66.0 h1:hLslxxAVb2PHpbHr4n0d6aP8CEIpUYGMVT1Yj/Q5Img= -github.com/ClickHouse/ch-go v0.66.0/go.mod h1:noiHWyLMJAZ5wYuq3R/K0TcRhrNA8h7o1AqHX0klEhM= -github.com/ClickHouse/clickhouse-go/v2 v2.36.0 h1:FJ03h8VdmBUhvR9nQEu5jRLdfG0c/HSxUjiNdOxRQww= -github.com/ClickHouse/clickhouse-go/v2 v2.36.0/go.mod h1:aijX64fKD1hAWu/zqWEmiGk7wRE8ZnpN0M3UvjsZG3I= +github.com/ClickHouse/ch-go v0.67.0 h1:18MQF6vZHj+4/hTRaK7JbS/TIzn4I55wC+QzO24uiqc= +github.com/ClickHouse/ch-go v0.67.0/go.mod h1:2MSAeyVmgt+9a2k2SQPPG1b4qbTPzdGDpf1+bcHh+18= +github.com/ClickHouse/clickhouse-go/v2 v2.40.1 h1:PbwsHBgqXRydU7jKULD1C8CHmifczffvQqmFvltM2W4= +github.com/ClickHouse/clickhouse-go/v2 v2.40.1/go.mod h1:GDzSBLVhladVm8V01aEB36IoBOVLLICfyeuiIp/8Ezc= github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY= github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo= -github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA= -github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA= +github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ= +github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -24,10 +24,8 @@ github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/huandu/go-assert v1.1.6 h1:oaAfYxq9KNDi9qswn/6aE0EydfxSa+tWZC1KabNitYs= github.com/huandu/go-assert v1.1.6/go.mod h1:JuIfbmYG9ykwvuxoJ3V8TB5QP+3+ajIA54Y44TmkMxs= -github.com/huandu/go-sqlbuilder v1.35.0 h1:ESvxFHN8vxCTudY1Vq63zYpU5yJBESn19sf6k4v2T5Q= -github.com/huandu/go-sqlbuilder v1.35.0/go.mod h1:mS0GAtrtW+XL6nM2/gXHRJax2RwSW1TraavWDFAc1JA= -github.com/huandu/go-sqlbuilder v1.35.1 h1:znTuAksxq3T1rYfr3nsD4P0brWDY8qNzdZnI6+vtia4= -github.com/huandu/go-sqlbuilder v1.35.1/go.mod h1:mS0GAtrtW+XL6nM2/gXHRJax2RwSW1TraavWDFAc1JA= +github.com/huandu/go-sqlbuilder v1.36.1 h1:4S17aR2BPW8L2PeotAD4iVhSMjwzk6CO8ABmp3tMEhY= +github.com/huandu/go-sqlbuilder v1.36.1/go.mod h1:59Zjq93ndlKI6O5kHmkXQpDgriBAPMKuhByEOy6xYK8= github.com/huandu/xstrings v1.4.0 h1:D17IlohoQq4UcpqD7fDk80P7l+lwAmlFaBHgOipl2FU= github.com/huandu/xstrings v1.4.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -59,8 +57,8 @@ github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA= -github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.1/go.mod h1:RaEWvsqvNKKvBPvcKeFjrG2cJqOkHTiyTpzz23ni57g= @@ -71,14 +69,14 @@ github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d/go.mod h1:rHwXgn7Jul github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.mongodb.org/mongo-driver v1.11.4/go.mod h1:PTSz5yu21bkT/wXpkS7WR5f0ddqw5quethTUn9WM+2g= -go.opentelemetry.io/otel v1.36.0 h1:UumtzIklRBY6cI/lllNZlALOF5nNIzJVb16APdvgTXg= -go.opentelemetry.io/otel v1.36.0/go.mod h1:/TcFMXYjyRNh8khOAO9ybYkqaDBb/70aVwkNML4pP8E= -go.opentelemetry.io/otel/trace v1.36.0 h1:ahxWNuqZjpdiFAyrIoQ4GIiAIhxAunQR6MUoKrsNd4w= -go.opentelemetry.io/otel/trace v1.36.0/go.mod h1:gQ+OnDZzrybY4k4seLzPAWNwVBBVlF2szhehOBB/tGA= +go.opentelemetry.io/otel v1.37.0 h1:9zhNfelUvx0KBfu/gb+ZgeAfAgtWrfHJZcAqFC228wQ= +go.opentelemetry.io/otel v1.37.0/go.mod h1:ehE/umFRLnuLa/vSccNq9oS1ErUlkkK71gMcN34UG8I= +go.opentelemetry.io/otel/trace v1.37.0 h1:HLdcFNbRQBE2imdSEgm/kwqmQj1Or1l/7bW6mxVK7z4= +go.opentelemetry.io/otel/trace v1.37.0/go.mod h1:TlgrlQ+PtQO5XFerSPUYG0JSgGyryXewPGyayAWSBS0= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -go.uber.org/mock v0.5.2 h1:LbtPTcP8A5k9WPXj54PPPbjcI4Y6lhyOZXn+VS7wNko= -go.uber.org/mock v0.5.2/go.mod h1:wLlUxC2vVTPTaE3UD51E0BGOAElKrILxhVSDYQLld5o= +go.uber.org/mock v0.6.0 h1:hyF9dfmbgIX5EfOdasqLsWD6xqpNZlXblLB/Dbnwv3Y= +go.uber.org/mock v0.6.0/go.mod h1:KiVJ4BqZJaMj4svdfmHM0AUx4NJYO8ZNpPnZn1Z+BBU= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= @@ -87,8 +85,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM= -golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= +golang.org/x/mod v0.27.0 h1:kb+q2PyFnEADO2IEF935ehFUXlWiNjJWtRNgBLSfbxQ= +golang.org/x/mod v0.27.0/go.mod h1:rWI627Fq0DEoudcK+MBkNkCe0EetEaDSwJJkCcjpazc= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= @@ -99,16 +97,16 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.15.0 h1:KWH3jNZsfyT6xfAfKiz6MRNmd46ByHDYaZ7KSkCtdW8= -golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.33.0 h1:q3i8TbbEz+JRD9ywIRlyRAQbM0qF7hu24q3teo2hbuw= -golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.35.0 h1:vz1N37gP5bs89s7He8XuIYXpyY0+QlsKmzipCbUtyxI= +golang.org/x/sys v0.35.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -119,8 +117,8 @@ golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBn golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY= -golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY= +golang.org/x/tools v0.36.0 h1:kWS0uv/zsvHEle1LbV5LE8QujrxB3wfQyxHfhOk0Qkg= +golang.org/x/tools v0.36.0/go.mod h1:WBDiHKJK8YgLHlcQPYQzNCkUxUypCaa5ZegCVutKm+s= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/internal/utils/database/database_test.go b/internal/utils/database/database_test.go index 83e4690..f20a8b4 100644 --- a/internal/utils/database/database_test.go +++ b/internal/utils/database/database_test.go @@ -80,7 +80,6 @@ func TestCreateTableAs(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -158,7 +157,6 @@ func TestDropTable(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/internal/utils/slice/slice_test.go b/internal/utils/slice/slice_test.go index a73a57d..1c5324a 100644 --- a/internal/utils/slice/slice_test.go +++ b/internal/utils/slice/slice_test.go @@ -39,8 +39,6 @@ func TestConvertFuncWithSkip(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -83,8 +81,6 @@ func TestConvertFunc(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/internal/utils/sql/sql_test.go b/internal/utils/sql/sql_test.go index 029f8b4..9035213 100644 --- a/internal/utils/sql/sql_test.go +++ b/internal/utils/sql/sql_test.go @@ -33,7 +33,6 @@ func TestValidateEntityName(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/internal/utils/time/time_test.go b/internal/utils/time/time_test.go index c8f6afc..d489164 100644 --- a/internal/utils/time/time_test.go +++ b/internal/utils/time/time_test.go @@ -40,8 +40,6 @@ func TestSecondsFromDuration(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -146,8 +144,6 @@ func TestSplitTimeRangeByInterval(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/database/error_test.go b/pkg/database/error_test.go index a519e2e..3995336 100644 --- a/pkg/database/error_test.go +++ b/pkg/database/error_test.go @@ -40,7 +40,6 @@ func TestQueryError(t *testing.T) { } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/database/error_wrappers/clickhouse_go/wrap_test.go b/pkg/database/error_wrappers/clickhouse_go/wrap_test.go index 96638c0..901d154 100644 --- a/pkg/database/error_wrappers/clickhouse_go/wrap_test.go +++ b/pkg/database/error_wrappers/clickhouse_go/wrap_test.go @@ -73,7 +73,6 @@ func Test_wrapException(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() assert.Equal(t, tt.wantErr, wrapException(tt.input)) diff --git a/pkg/database/error_wrappers/common/wrap_test.go b/pkg/database/error_wrappers/common/wrap_test.go index bd62fa1..e048f46 100644 --- a/pkg/database/error_wrappers/common/wrap_test.go +++ b/pkg/database/error_wrappers/common/wrap_test.go @@ -1,7 +1,7 @@ // Copyright 2025 LLC "Ozon Technologies". // SPDX-License-Identifier: Apache-2.0 -package common +package common //revive:disable:var-naming import ( "context" diff --git a/pkg/database/mock/database.go b/pkg/database/mock/database.go index ed984dc..6b1dcb2 100644 --- a/pkg/database/mock/database.go +++ b/pkg/database/mock/database.go @@ -21,6 +21,7 @@ import ( type MockCluster struct { ctrl *gomock.Controller recorder *MockClusterMockRecorder + isgomock struct{} } // MockClusterMockRecorder is the mock recorder for MockCluster. @@ -59,6 +60,7 @@ func (mr *MockClusterMockRecorder) Shards(ctx any) *gomock.Call { type MockShard struct { ctrl *gomock.Controller recorder *MockShardMockRecorder + isgomock struct{} } // MockShardMockRecorder is the mock recorder for MockShard. @@ -154,6 +156,7 @@ func (mr *MockShardMockRecorder) QueryRow(ctx, query any, args ...any) *gomock.C type MockRows struct { ctrl *gomock.Controller recorder *MockRowsMockRecorder + isgomock struct{} } // MockRowsMockRecorder is the mock recorder for MockRows. @@ -237,6 +240,7 @@ func (mr *MockRowsMockRecorder) Scan(dest ...any) *gomock.Call { type MockRow struct { ctrl *gomock.Controller recorder *MockRowMockRecorder + isgomock struct{} } // MockRowMockRecorder is the mock recorder for MockRow. diff --git a/pkg/rollup/meta_info_test.go b/pkg/rollup/meta_info_test.go index 57511d9..26a6643 100644 --- a/pkg/rollup/meta_info_test.go +++ b/pkg/rollup/meta_info_test.go @@ -92,7 +92,6 @@ func Test_getLatestRollUpByKeyOnShard(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -181,7 +180,6 @@ func Test_addMetaInfoOnShard(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/rollup/partitions_test.go b/pkg/rollup/partitions_test.go index 24f0e1f..303e394 100644 --- a/pkg/rollup/partitions_test.go +++ b/pkg/rollup/partitions_test.go @@ -150,7 +150,6 @@ func Test_getPartitionsOnShard(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -235,7 +234,6 @@ func Test_replacePartitionsOnShard(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/rollup/rollup.go b/pkg/rollup/rollup.go index 49ec9f4..37732e5 100644 --- a/pkg/rollup/rollup.go +++ b/pkg/rollup/rollup.go @@ -145,7 +145,6 @@ func (s *RollUp) Run(ctx context.Context, opts RunOptions) error { g, ctx := errgroup.WithContext(ctx) for _, shard := range shards { - shard := shard g.Go(func() error { err = s.runOnShard(ctx, shard, opts) diff --git a/pkg/rollup/rollup_test.go b/pkg/rollup/rollup_test.go index 23c6fe0..b5988ef 100644 --- a/pkg/rollup/rollup_test.go +++ b/pkg/rollup/rollup_test.go @@ -227,7 +227,6 @@ func TestRunOptions_Validate(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/rollup/statement_test.go b/pkg/rollup/statement_test.go index 0f2e949..d66dece 100644 --- a/pkg/rollup/statement_test.go +++ b/pkg/rollup/statement_test.go @@ -48,7 +48,6 @@ func Test_generateRollUpStatement(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() assert.Equal(t, tt.want, generateRollUpStatement(tt.opts)) diff --git a/pkg/scheduler/event_test.go b/pkg/scheduler/event_test.go index c5c83cc..e0dc4d6 100644 --- a/pkg/scheduler/event_test.go +++ b/pkg/scheduler/event_test.go @@ -51,8 +51,6 @@ func TestEvent_String(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/scheduler/mock/scheduler.go b/pkg/scheduler/mock/scheduler.go index 41c6c14..dbfc39c 100644 --- a/pkg/scheduler/mock/scheduler.go +++ b/pkg/scheduler/mock/scheduler.go @@ -21,6 +21,7 @@ import ( type MockRollUp struct { ctrl *gomock.Controller recorder *MockRollUpMockRecorder + isgomock struct{} } // MockRollUpMockRecorder is the mock recorder for MockRollUp. diff --git a/pkg/scheduler/rollup_test.go b/pkg/scheduler/rollup_test.go index 4e51183..342d94b 100644 --- a/pkg/scheduler/rollup_test.go +++ b/pkg/scheduler/rollup_test.go @@ -65,8 +65,6 @@ func Test_prepareRollUpColumns(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/scheduler/scheduler_test.go b/pkg/scheduler/scheduler_test.go index eb583e3..5b42a2c 100644 --- a/pkg/scheduler/scheduler_test.go +++ b/pkg/scheduler/scheduler_test.go @@ -84,8 +84,6 @@ func TestNew(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -234,8 +232,6 @@ func TestScheduler_Run(t *testing.T) { }, } for _, tt := range tests { - tt := tt - t.Run(tt.name, func(t *testing.T) { t.Parallel() diff --git a/pkg/types/types_test.go b/pkg/types/types_test.go index 440202a..d8e0075 100644 --- a/pkg/types/types_test.go +++ b/pkg/types/types_test.go @@ -1,7 +1,7 @@ // Copyright 2025 LLC "Ozon Technologies". // SPDX-License-Identifier: Apache-2.0 -package types +package types //revive:disable:var-naming import ( "testing" @@ -158,7 +158,6 @@ func TestTask_Validate(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel() @@ -254,7 +253,6 @@ func TestRollUpSetting_Validate(t *testing.T) { }, } for _, tt := range tests { - tt := tt t.Run(tt.name, func(t *testing.T) { t.Parallel()