Skip to content

Commit be0d55e

Browse files
authored
Merge branch 'main' into renovate/github.com-cli-go-gh-v2-2.x
2 parents 62a8b33 + fac30ab commit be0d55e

File tree

15 files changed

+53
-298
lines changed

15 files changed

+53
-298
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
"features": {
2020
"ghcr.io/devcontainers/features/github-cli:1": {},
2121
"ghcr.io/devcontainers/features/go:1": {
22-
"version": "1.24",
23-
"golangciLintVersion": "2.1.2"
22+
"version": "1.25",
23+
"golangciLintVersion": "2.4.0"
2424
},
2525
"ghcr.io/guiyomh/features/goreleaser:0": { "version": "2.8.2" },
2626
"ghcr.io/szkiba/devcontainer-features/gosec:1": { "version": "2.22.3" },

.github/dependabot.yml

Lines changed: 0 additions & 12 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ permissions: {}
99
jobs:
1010
release:
1111
name: Release
12-
uses: grafana/xk6/.github/workflows/tooling-release.yml@v1.2.4
12+
uses: grafana/xk6/.github/workflows/tooling-release.yml@da8eccb3592e057e56d1017218ba5fd7a91927aa # v1.3.2
1313
permissions:
1414
contents: write
1515
packages: write
1616
id-token: write
1717
with:
18-
go-version: "1.24.x"
18+
go-version: "1.25.x"
1919
goreleaser-version: "2.8.2"
2020
k6-versions: '["v1.2.3","v1.0.0"]'

.github/workflows/validate.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,11 @@ permissions: {}
1212
jobs:
1313
validate:
1414
name: Validate
15-
uses: grafana/xk6/.github/workflows/tooling-validate.yml@v1.2.4
16-
secrets:
17-
codecov-token: ${{secrets.CODECOV_TOKEN}}
15+
uses: grafana/xk6/.github/workflows/tooling-validate.yml@da8eccb3592e057e56d1017218ba5fd7a91927aa # v1.3.2
1816
with:
19-
go-version: "1.24.x"
20-
go-versions: '["1.24.x","1.25.x"]'
21-
golangci-lint-version: "v2.1.2"
17+
go-version: "1.25.x"
18+
go-versions: '["1.25.x"]'
19+
golangci-lint-version: "v2.4.0"
2220
goreleaser-version: "2.8.2"
2321
platforms: '["ubuntu-latest", "windows-latest", "macos-latest"]'
2422
k6-versions: '["v1.2.3","v1.0.0"]'

.golangci.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ linters:
1212
# Except for general-purpose public APIs,
1313
# wrapping errors is more inconvenient and error prone than useful.
1414
- wrapcheck
15+
16+
# Deprecated linters
17+
- wsl
18+
19+
# Temporary mitigaion.
20+
- noinlineerr
1521
settings:
1622
# Temporary mitigation.
1723
cyclop:
@@ -32,18 +38,14 @@ linters:
3238
- github.com/xeipuuv/gojsonschema
3339
- gitlab.com/gitlab-org/api/client-go
3440
- github.com/cli/go-gh/v2
35-
- github.com/google/go-github/v62/github
41+
- github.com/google/go-github/v81/github
3642
- github.com/go-git/go-git/v5
3743
- github.com/sirupsen/logrus
3844
- github.com/samber/slog-logrus/v2
3945
- golang.org/x/term
4046
- github.com/adrg/xdg
4147
- github.com/narqo/go-badge
4248

43-
exclusions:
44-
paths:
45-
# adopted from fixuid source: https://github.com/boxboat/fixuid
46-
- internal/fixids
4749
issues:
4850
max-issues-per-linter: 0
4951
max-same-issues: 0

cmd/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ import (
1818
var help string
1919

2020
type options struct {
21+
loadOptions
22+
2123
out string
2224
compact bool
2325
quiet bool
2426
verbose bool
25-
loadOptions
2627
}
2728

2829
// New creates new cobra command for exec command.
@@ -93,7 +94,6 @@ func schemaCmd() *cobra.Command {
9394
}
9495
}
9596

96-
//nolint:funlen
9797
func run(ctx context.Context, args []string, opts *options) (result error) {
9898
input := os.Stdin
9999

cmd/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/cli/go-gh/v2/pkg/api"
1414
"github.com/cli/go-gh/v2/pkg/auth"
1515
"github.com/cli/go-gh/v2/pkg/config"
16-
"github.com/google/go-github/v62/github"
16+
"github.com/google/go-github/v81/github"
1717
)
1818

1919
type githubClientKey struct{}

cmd/k6registry/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,3 @@ func newCmd(args []string, levelVar *slog.LevelVar) *cobra.Command {
4848

4949
return cmd
5050
}
51-
52-
func runCmd(cmd *cobra.Command) {
53-
}

cmd/lint.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,11 @@ func saveCompliance(ctx context.Context, module string, version string, comp *Co
101101
return os.WriteFile(filename, data, permFile)
102102
}
103103

104+
//nolint:funlen
104105
func checkCompliance(
105106
ctx context.Context,
106107
module string,
107108
version string,
108-
official bool,
109109
checks []string,
110110
cloneURL string,
111111
tstamp int64,
@@ -147,7 +147,7 @@ func checkCompliance(
147147
lintArgs = append(lintArgs, "--enable-only", strings.Join(checks, ","))
148148
}
149149

150-
lintCmd := exec.Command(xk6Binary, lintArgs...)
150+
lintCmd := exec.CommandContext(ctx, xk6Binary, lintArgs...)
151151

152152
lintCmd.Stdout = lintOut
153153
lintCmd.Stderr = lintErr
@@ -164,6 +164,7 @@ func checkCompliance(
164164
}
165165

166166
compliance := &Compliance{}
167+
167168
err = json.Unmarshal(lintOut.Bytes(), compliance)
168169
if err != nil {
169170
return nil, err

cmd/load.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/go-git/go-git/v5"
1515
"github.com/go-git/go-git/v5/config"
1616
"github.com/go-git/go-git/v5/plumbing"
17-
"github.com/google/go-github/v62/github"
17+
"github.com/google/go-github/v81/github"
1818
"github.com/grafana/k6registry"
1919
gitlab "gitlab.com/gitlab-org/api/client-go"
2020
"gopkg.in/yaml.v3"
@@ -100,14 +100,12 @@ func loadOne(ctx context.Context, ext *k6registry.Extension, lint bool, checks [
100100
}
101101

102102
complianceErrors := []error{}
103-
for _, version := range ext.Versions {
104-
official := ext.Tier == k6registry.TierOfficial
105103

104+
for _, version := range ext.Versions {
106105
compliance, err := checkCompliance(
107106
ctx,
108107
ext.Module,
109108
version,
110-
official,
111109
checks,
112110
repo.CloneURL,
113111
int64(repo.Timestamp),
@@ -120,7 +118,7 @@ func loadOne(ctx context.Context, ext *k6registry.Extension, lint bool, checks [
120118

121119
for _, check := range compliance.Checks {
122120
if !check.Passed {
123-
issues = append(issues, string(check.ID))
121+
issues = append(issues, check.ID)
124122
}
125123
}
126124

@@ -147,6 +145,7 @@ func load(
147145
}
148146

149147
compliancedErrors := []error{}
148+
150149
for idx := range registry {
151150
ext := &registry[idx]
152151

@@ -234,6 +233,7 @@ func moduleToOwnerAndName(module string) (string, string) {
234233
}
235234

236235
const maxParts = 4
236+
237237
parts := strings.SplitN(module, "/", maxParts)
238238

239239
return parts[1], parts[2]

0 commit comments

Comments
 (0)