Skip to content

Commit 4f8db69

Browse files
Merge branch 'main' into renovate/github.com-cloudquery-codegen-0.x
2 parents bade605 + 88b8ab8 commit 4f8db69

File tree

10 files changed

+26
-22
lines changed

10 files changed

+26
-22
lines changed

.github/workflows/gen_coverage_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
token: ${{ steps.app-token.outputs.token }}
3232
- name: Set up Go 1.x
3333
id: setup-go
34-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
34+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
3535
with:
3636
go-version: "1.26"
3737
cache: false

.github/workflows/go_mod_tidy_examples.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
token: ${{ steps.app-token.outputs.token }}
3030
- name: Set up Go 1.x
3131
id: setup-go
32-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
32+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
3333
with:
3434
go-version-file: go.mod
3535
cache: false

.github/workflows/lint_golang.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
timeout-minutes: 10
1818
steps:
1919
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
20-
- uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
20+
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
2121
id: setup-go
2222
with:
2323
go-version-file: go.mod
@@ -35,4 +35,4 @@ jobs:
3535
- name: golangci-lint
3636
uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9
3737
with:
38-
version: v2.10.1
38+
version: v2.11.4

.github/workflows/lint_markdown.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
python3 -m venv "$venv"
2222
echo "$venv/bin" >> $GITHUB_PATH
2323
- name: Vale
24-
uses: errata-ai/vale-action@dcded780f1ff68e2558e802a165a484a4a3e2fb8
24+
uses: errata-ai/vale-action@0135b9fe2b3107365569cc3142b9a1c85221ea2f
2525
with:
2626
vale_flags: "--glob=!{docs/testdata/*,CHANGELOG.md,.github/styles/proselint/README.md,examples/simple_plugin/docs/*.md,coverage.md}"
2727
filter_mode: nofilter

.github/workflows/unittest-post.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# This posts the status to the PR/commit
1919
- uses: haya14busa/action-workflow_run-status@967ed83efa565c257675ed70cfe5231f062ddd94 # v1
2020
- name: Download benchmarks
21-
uses: dawidd6/action-download-artifact@fe9d59ce33ce92db8a6ac90b2c8be6b6d90417c8 # v15
21+
uses: dawidd6/action-download-artifact@8a338493df3d275e4a7a63bcff3b8fe97e51a927 # v19
2222
with:
2323
# This is the workflow that triggered this run
2424
workflow: ${{ github.event.workflow.id }}

.github/workflows/unittest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
2323
- name: Set up Go 1.x
2424
id: setup-go
25-
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
25+
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
2626
with:
2727
go-version-file: go.mod
2828
cache: false
@@ -54,7 +54,7 @@ jobs:
5454
run: echo ${{ github.event.number }} > ./pr_number
5555
- name: Upload deltas
5656
if: matrix.os == 'ubicloud-standard-8'
57-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
57+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7
5858
with:
5959
name: delta-action-benchmarks
6060
retention-days: 7

.golangci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ linters:
8888
disabled: true
8989
- name: use-waitgroup-go
9090
disabled: true
91+
- name: package-naming
92+
disabled: true
9193
exclusions:
9294
generated: lax
9395
presets:

docs/generator.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
package docs
22

33
import (
4+
"cmp"
45
"embed"
56
"fmt"
67
"os"
78
"regexp"
8-
"sort"
9+
"slices"
910

1011
"github.com/cloudquery/plugin-sdk/v4/caser"
1112
"github.com/cloudquery/plugin-sdk/v4/schema"
@@ -87,8 +88,8 @@ func DefaultTitleTransformer(table *schema.Table) string {
8788
}
8889

8990
func sortTables(tables schema.Tables) {
90-
sort.SliceStable(tables, func(i, j int) bool {
91-
return tables[i].Name < tables[j].Name
91+
slices.SortStableFunc(tables, func(a, b *schema.Table) int {
92+
return cmp.Compare(a.Name, b.Name)
9293
})
9394

9495
for _, table := range tables {

plugin/sort.go

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package plugin
22

33
import (
4-
"sort"
4+
"cmp"
5+
"slices"
56

67
"github.com/apache/arrow-go/v18/arrow"
78
"github.com/apache/arrow-go/v18/arrow/array"
@@ -18,16 +19,16 @@ func sortRecords(table *schema.Table, records []arrow.RecordBatch, columnName st
1819
panic("table has no '" + columnName + "' column to sort on")
1920
}
2021
colIndex := sch.FieldIndices(columnName)[0]
21-
sort.Slice(records, func(i, j int) bool {
22-
switch records[i].Column(colIndex).DataType().(type) {
22+
slices.SortFunc(records, func(a, b arrow.RecordBatch) int {
23+
switch a.Column(colIndex).DataType().(type) {
2324
case *arrow.Int64Type:
24-
v1 := records[i].Column(colIndex).(*array.Int64).Value(0)
25-
v2 := records[j].Column(colIndex).(*array.Int64).Value(0)
26-
return v1 < v2
25+
v1 := a.Column(colIndex).(*array.Int64).Value(0)
26+
v2 := b.Column(colIndex).(*array.Int64).Value(0)
27+
return cmp.Compare(v1, v2)
2728
case *arrow.StringType:
28-
v1 := records[i].Column(colIndex).(*array.String).Value(0)
29-
v2 := records[j].Column(colIndex).(*array.String).Value(0)
30-
return v1 < v2
29+
v1 := a.Column(colIndex).(*array.String).Value(0)
30+
v2 := b.Column(colIndex).(*array.String).Value(0)
31+
return cmp.Compare(v1, v2)
3132
default:
3233
panic("unsupported type for sorting")
3334
}

writers/writers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"math/rand"
66
"runtime"
7-
"sort"
7+
"slices"
88
"strconv"
99
"testing"
1010

@@ -144,7 +144,7 @@ func writerMatrix[T writers.Writer, C any, O ~func(T)](prefix string, constructo
144144
bCases := make([]bCase, 0, len(optsMatrix))
145145

146146
k := maps.Keys(optsMatrix)
147-
sort.Strings(k)
147+
slices.Sort(k)
148148

149149
for _, name := range k {
150150
opts := optsMatrix[name]

0 commit comments

Comments
 (0)