Skip to content

Commit 1153ebf

Browse files
authored
Merge branch 'main' into marc-fix-pg-dump-args
2 parents 5b98232 + 85fc546 commit 1153ebf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+118
-2233
lines changed

.github/workflows/go-ci.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,15 @@ jobs:
1111
go-test:
1212
strategy:
1313
matrix:
14-
go-version: [1.24.1]
1514
os: [ubuntu-latest, macos-latest, windows-latest]
1615
runs-on: ${{ matrix.os }}
1716
steps:
1817
- name: Checkout
1918
uses: actions/checkout@v4
2019
- name: Set up Go
21-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@faf52423ec0d44c58f68e83b614bfcd99dded66f
2221
with:
23-
go-version: ${{ matrix.go-version }}
22+
go-version-file: '.tool-versions'
2423
- name: (Windows) Enable pulling Go modules from private sourcegraph/sourcegraph
2524
if: runner.os == 'Windows'
2625
run: git config --global url."https://$env:PRIVATE_TOKEN@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"

.github/workflows/go-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
- name: Checkout
1515
uses: actions/checkout@v4
1616
- name: Set up Go
17-
uses: actions/setup-go@v5
17+
uses: actions/setup-go@faf52423ec0d44c58f68e83b614bfcd99dded66f
1818
with:
19-
go-version: 1.24.1
19+
go-version-file: '.tool-versions'
2020
- name: Enable pulling Go modules from private sourcegraph/sourcegraph
2121
run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"
2222
- run: ./dev/go-lint.sh

.github/workflows/goreleaser-check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919
- name: Set up Go
20-
uses: actions/setup-go@v5
20+
uses: actions/setup-go@faf52423ec0d44c58f68e83b614bfcd99dded66f
2121
with:
22-
go-version: 1.24.1
22+
go-version-file: '.tool-versions'
2323
- name: Enable pulling Go modules from private sourcegraph/sourcegraph
2424
run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"
2525
- name: Check GoReleaser config

.github/workflows/goreleaser.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,9 @@ jobs:
179179
with:
180180
fetch-depth: 0
181181
- name: Set up Go
182-
uses: actions/setup-go@v5
182+
uses: actions/setup-go@faf52423ec0d44c58f68e83b614bfcd99dded66f
183183
with:
184-
go-version: 1.24.1
184+
go-version-file: '.tool-versions'
185185
- name: Enable pulling Go modules from private sourcegraph/sourcegraph
186186
run: git config --global url."https://${PRIVATE_TOKEN}@github.com/sourcegraph/".insteadOf "https://github.com/sourcegraph/"
187187
- run: go test ./...

.github/workflows/pr-auditor.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ jobs:
1313
with:
1414
repository: 'sourcegraph/devx-service'
1515
token: ${{ secrets.PR_AUDITOR_TOKEN }}
16-
- uses: actions/setup-go@v5
17-
with: { go-version: '1.23' }
16+
- uses: actions/setup-go@faf52423ec0d44c58f68e83b614bfcd99dded66f
17+
with: { go-version-file: '.tool-versions' }
1818

1919
- run: 'go run ./cmd/pr-auditor'
2020
env:

.github/workflows/scip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Set up Go
15-
uses: actions/setup-go@v5
15+
uses: actions/setup-go@faf52423ec0d44c58f68e83b614bfcd99dded66f
1616
with:
17-
go-version: 1.24.1
17+
go-version-file: '.tool-versions'
1818

1919
- name: Set directory to safe for git
2020
run: git config --global --add safe.directory $GITHUB_WORKSPACE

.golangci.yml

Lines changed: 61 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,73 @@
1-
# See explanation of linters at https://golangci-lint.run/usage/linters/
1+
version: "2"
22
linters:
3-
disable-all: true
3+
default: none
44
enable:
55
- bodyclose
66
- depguard
77
- gocritic
8-
- goimports
9-
- gosimple
108
- govet
119
- ineffassign
1210
- nolintlint
1311
- staticcheck
14-
- typecheck
1512
- unconvert
1613
- unused
17-
18-
linters-settings:
19-
depguard:
14+
settings:
15+
depguard:
16+
rules:
17+
main:
18+
deny:
19+
- pkg: errors
20+
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
21+
- pkg: github.com/pkg/errors
22+
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
23+
- pkg: github.com/cockroachdb/errors
24+
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
25+
- pkg: github.com/hashicorp/go-multierror
26+
desc: Use github.com/sourcegraph/sourcegraph/lib/errors instead
27+
- pkg: io/ioutil
28+
desc: The ioutil package has been deprecated
29+
forbidigo:
30+
forbid:
31+
- pattern: fmt\.Errorf
32+
gocritic:
33+
disabled-checks:
34+
- appendAssign
35+
- assignOp
36+
- commentFormatting
37+
- deprecatedComment
38+
- exitAfterDefer
39+
- ifElseChain
40+
- singleCaseSwitch
41+
govet:
42+
disable:
43+
- composites
44+
staticcheck:
45+
checks:
46+
- all
47+
- -QF1001 # De Morgan's law simplifications
48+
- -QF1008 # Embedded field selector simplifications
49+
- -ST1003 # Naming conventions (ID vs Id, URL vs Url, etc.)
50+
exclusions:
51+
generated: lax
52+
presets:
53+
- comments
54+
- common-false-positives
55+
- legacy
56+
- std-error-handling
2057
rules:
21-
main:
22-
deny:
23-
- pkg: "errors"
24-
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
25-
- pkg: "github.com/pkg/errors"
26-
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
27-
- pkg: "github.com/cockroachdb/errors"
28-
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
29-
- pkg: "github.com/hashicorp/go-multierror"
30-
desc: "Use github.com/sourcegraph/sourcegraph/lib/errors instead"
31-
- pkg: "io/ioutil"
32-
desc: "The ioutil package has been deprecated"
33-
gocritic:
34-
disabled-checks:
35-
- appendAssign # Too many false positives
36-
- assignOp # Maybe worth adding, but likely not worth the noise
37-
- commentFormatting # No strong benefit
38-
- deprecatedComment # Unnecessary
39-
- exitAfterDefer # Only occurs in auxiliary tools
40-
- ifElseChain # Noisy for not much gain
41-
- singleCaseSwitch # Noisy for not much gain
42-
govet:
43-
disable:
44-
- composites
45-
forbidigo:
46-
forbid:
47-
# Use errors.New instead
48-
- 'fmt\.Errorf'
49-
50-
issues:
51-
exclude-rules:
52-
# Exclude bodyclose lint from tests because leaking connections in tests
53-
# is a non-issue, and checking that adds unnecessary noise
54-
- path: _test\.go
55-
linters:
56-
- bodyclose
57-
58-
run:
59-
timeout: 5m
58+
- linters:
59+
- bodyclose
60+
path: _test\.go
61+
paths:
62+
- third_party$
63+
- builtin$
64+
- examples$
65+
formatters:
66+
enable:
67+
- goimports
68+
exclusions:
69+
generated: lax
70+
paths:
71+
- third_party$
72+
- builtin$
73+
- examples$

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
golang 1.24.1
1+
golang 1.25.4
22
shfmt 3.8.0
33
shellcheck 0.10.0

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
#
55
# Nothing fancy here: we copy in the source code and build on the Alpine Go
66
# image. Refer to .dockerignore to get a sense of what we're not going to copy.
7-
FROM golang:1.24.1-alpine@sha256:43c094ad24b6ac0546c62193baeb3e6e49ce14d3250845d166c77c25f64b0386 AS builder
7+
FROM golang:1.25.4-alpine3.22@sha256:d3f0cf7723f3429e3f9ed846243970b20a2de7bae6a5b66fc5914e228d831bbb AS builder
88

99
COPY . /src
1010
WORKDIR /src
1111
RUN go build ./cmd/src
1212

1313
# This stage should be kept in sync with Dockerfile.release.
14-
FROM alpine:3.22@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1
14+
FROM alpine:3.22@sha256:4b7ce07002c69e8f3d704a9c5d6fd3053be500b7f1c69fc0d80990c2ad8dd412
1515

1616
# needed for `src code-intel upload` and `src actions exec`
1717
RUN apk add --no-cache git

cmd/src/batch_common.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ func getBatchSpecDirectory(file string) (string, error) {
632632
func checkExecutable(cmd string, args ...string) error {
633633
if err := exec.Command(cmd, args...).Run(); err != nil {
634634
return fmt.Errorf(
635-
"failed to execute \"%s %s\":\n\t%s\n\n'src batch' requires %q to be available.",
635+
"failed to execute \"%s %s\":\n\t%s\n\n'src batch' requires %q to be available",
636636
cmd,
637637
strings.Join(args, " "),
638638
err,

0 commit comments

Comments
 (0)