Skip to content

Commit 9b97a2e

Browse files
committed
PATCH CI toolchain compatibility
- Move CI/docs builds to Node 22.12 for Astro 6 - golangci-lint to a Go 1.25-compatible v2 release - lint config and fixes reported staticcheck issues
1 parent b7a6f46 commit 9b97a2e

12 files changed

Lines changed: 67 additions & 66 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ body:
8888
- OS: macOS 14.2 / Ubuntu 22.04 / Windows 11
8989
- Browser: Chrome 120
9090
- Go: 1.25.9
91-
- Node: 20.x
91+
- Node: 22.12.x
9292
9393
- type: textarea
9494
id: logs

.github/workflows/ci-cd.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ permissions:
1212

1313
env:
1414
GO_VERSION: '1.25.9'
15-
NODE_VERSION: '20'
15+
NODE_VERSION: '22.12.0'
1616

1717
jobs:
1818
# Job 1: Frontend Security Scanning
@@ -277,9 +277,9 @@ jobs:
277277
run: go vet ./...
278278

279279
- name: Run golangci-lint
280-
uses: golangci/golangci-lint-action@v6
280+
uses: golangci/golangci-lint-action@v7
281281
with:
282-
version: latest
282+
version: v2.4.0
283283
working-directory: backend
284284

285285
# Job 6: Backend Tests

.github/workflows/docs-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ permissions:
1616
contents: read
1717

1818
env:
19-
NODE_VERSION: "20"
19+
NODE_VERSION: "22.12.0"
2020

2121
jobs:
2222
build-and-validate:

.github/workflows/docs-quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ permissions:
1515
contents: read
1616

1717
env:
18-
NODE_VERSION: "20"
18+
NODE_VERSION: "22.12.0"
1919

2020
jobs:
2121
openapi-lint:

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Comment on the issue to let maintainers know you're working on it. If you don't
3333
| Tool | Version | Purpose |
3434
|------|---------|---------|
3535
| Go | 1.25+ | Backend development |
36-
| Node.js | 20+ | Frontend development |
36+
| Node.js | 22.12+ | Frontend and docs development |
3737
| Docker | Latest | Container orchestration |
3838
| Git | Latest | Version control |
3939

@@ -186,7 +186,7 @@ Before submitting, verify:
186186

187187
```bash
188188
# Install linter
189-
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
189+
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
190190

191191
# Run linter
192192
golangci-lint run ./...

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ ProtocolSoup/
306306
### Prerequisites
307307

308308
- Go 1.25+
309-
- Node.js 18+
309+
- Node.js 22.12+
310310
- Docker & Docker Compose
311311

312312
### Running Locally (without Docker)

backend/.golangci.yml

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,45 @@
1-
# golangci-lint configuration
2-
# https://golangci-lint.run/usage/configuration/
3-
1+
version: "2"
42
run:
5-
timeout: 5m
63
modules-download-mode: readonly
7-
84
output:
95
formats:
10-
- format: colored-line-number
11-
6+
text:
7+
path: stdout
128
linters:
13-
enable:
14-
- errcheck
15-
- gosimple
16-
- govet
17-
- ineffassign
18-
- staticcheck
19-
- unused
20-
21-
linters-settings:
22-
errcheck:
23-
# Don't check errors for these functions (common in HTTP handlers)
24-
exclude-functions:
25-
- (net/http.ResponseWriter).Write
26-
- (*encoding/json.Encoder).Encode
27-
- (io.Writer).Write
28-
- (*html/template.Template).Execute
29-
- (*text/template.Template).Execute
30-
9+
settings:
10+
errcheck:
11+
exclude-functions:
12+
- (net/http.ResponseWriter).Write
13+
- (*encoding/json.Encoder).Encode
14+
- (io.Writer).Write
15+
- (*html/template.Template).Execute
16+
- (*text/template.Template).Execute
17+
exclusions:
18+
generated: lax
19+
presets:
20+
- comments
21+
- common-false-positives
22+
- legacy
23+
- std-error-handling
24+
rules:
25+
- linters:
26+
- errcheck
27+
path: internal/lookingglass/
28+
text: SetReadDeadline|SetWriteDeadline|WriteMessage
29+
- linters:
30+
- errcheck
31+
text: rand.Read
32+
paths:
33+
- third_party$
34+
- builtin$
35+
- examples$
3136
issues:
32-
# Don't limit the number of issues per linter
3337
max-issues-per-linter: 0
3438
max-same-issues: 0
35-
36-
exclude-rules:
37-
# Ignore errcheck for SetReadDeadline/SetWriteDeadline in websocket code
38-
- path: internal/lookingglass/
39-
linters:
40-
- errcheck
41-
text: "SetReadDeadline|SetWriteDeadline|WriteMessage"
42-
43-
# Ignore errcheck for rand.Read (crypto/rand never returns error on supported platforms)
44-
- linters:
45-
- errcheck
46-
text: "rand.Read"
47-
39+
formatters:
40+
exclusions:
41+
generated: lax
42+
paths:
43+
- third_party$
44+
- builtin$
45+
- examples$

backend/internal/protocols/oid4vp/trust.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func hasNonEmptyVerificationValue(raw interface{}) bool {
174174
// DIDWebDocumentURL converts a did:web identifier to its DID Document URL.
175175
func DIDWebDocumentURL(did string) (string, string, error) {
176176
if !strings.HasPrefix(did, "did:web:") {
177-
return "", "", fmt.Errorf("did must start with did:web:")
177+
return "", "", fmt.Errorf("did must start with did:web")
178178
}
179179

180180
identifier := strings.TrimPrefix(did, "did:web:")

backend/internal/protocols/oid4vp/verifier_identity.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -517,15 +517,15 @@ func verifyPrivateKeyMatchesCertificate(certificate *x509.Certificate, privateKe
517517
if !ok {
518518
return fmt.Errorf("certificate public key is not RSA")
519519
}
520-
if publicKey.E != typed.PublicKey.E || publicKey.N.Cmp(typed.PublicKey.N) != 0 {
520+
if publicKey.E != typed.E || publicKey.N.Cmp(typed.N) != 0 {
521521
return fmt.Errorf("rsa public key mismatch")
522522
}
523523
case *ecdsa.PrivateKey:
524524
publicKey, ok := certificate.PublicKey.(*ecdsa.PublicKey)
525525
if !ok {
526526
return fmt.Errorf("certificate public key is not EC")
527527
}
528-
if publicKey.X.Cmp(typed.PublicKey.X) != 0 || publicKey.Y.Cmp(typed.PublicKey.Y) != 0 || publicKey.Curve != typed.PublicKey.Curve {
528+
if publicKey.X.Cmp(typed.X) != 0 || publicKey.Y.Cmp(typed.Y) != 0 || publicKey.Curve != typed.Curve {
529529
return fmt.Errorf("ecdsa public key mismatch")
530530
}
531531
case ed25519.PrivateKey:
@@ -609,15 +609,15 @@ func (p *Plugin) describeX509Chain() map[string]interface{} {
609609
}
610610

611611
chain := map[string]interface{}{
612-
"chain_depth": len(certs),
612+
"chain_depth": len(certs),
613613
"signing_algorithm": sigAlg,
614614
"leaf": map[string]interface{}{
615-
"subject": leaf.Subject.CommonName,
616-
"issuer": leaf.Issuer.CommonName,
617-
"dns_names": leaf.DNSNames,
618-
"serial": leaf.SerialNumber.String(),
619-
"not_before": leaf.NotBefore.Format(time.RFC3339),
620-
"not_after": leaf.NotAfter.Format(time.RFC3339),
615+
"subject": leaf.Subject.CommonName,
616+
"issuer": leaf.Issuer.CommonName,
617+
"dns_names": leaf.DNSNames,
618+
"serial": leaf.SerialNumber.String(),
619+
"not_before": leaf.NotBefore.Format(time.RFC3339),
620+
"not_after": leaf.NotAfter.Format(time.RFC3339),
621621
"public_key_algorithm": leaf.PublicKeyAlgorithm.String(),
622622
},
623623
}

backend/internal/protocols/scim/filter.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ func (p *Parser) parseExpression(precedence int) (FilterNode, error) {
371371
var err error
372372

373373
// Handle NOT prefix
374-
if p.current.Type == TokenNot {
374+
switch p.current.Type {
375+
case TokenNot:
375376
p.nextToken()
376377
if p.current.Type != TokenLParen {
377378
return nil, fmt.Errorf("expected '(' after 'not', got %s", p.current)
@@ -386,7 +387,7 @@ func (p *Parser) parseExpression(precedence int) (FilterNode, error) {
386387
}
387388
p.nextToken()
388389
left = &NotExpr{Expr: inner}
389-
} else if p.current.Type == TokenLParen {
390+
case TokenLParen:
390391
// Grouped expression
391392
p.nextToken()
392393
left, err = p.parseExpression(precLowest)
@@ -397,7 +398,7 @@ func (p *Parser) parseExpression(precedence int) (FilterNode, error) {
397398
return nil, fmt.Errorf("expected ')', got %s", p.current)
398399
}
399400
p.nextToken()
400-
} else {
401+
default:
401402
// Attribute expression
402403
left, err = p.parseAttrExpr()
403404
if err != nil {

0 commit comments

Comments
 (0)