Skip to content

Commit 262e633

Browse files
ci: add go vet step and harden install script checksum warnings
Add go vet lint step before tests in CI workflow. Add warning messages when checksum file is unavailable or binary checksum not found in install.sh. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
1 parent 3461c7f commit 262e633

4 files changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
with:
2727
go-version-file: "go.mod"
2828

29+
- name: Vet
30+
run: go vet ./...
31+
2932
- name: Run all tests
3033
run: make test-all
3134

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ require (
3636
github.com/pmezard/go-difflib v1.0.0 // indirect
3737
github.com/rivo/uniseg v0.4.7 // indirect
3838
github.com/spf13/pflag v1.0.5 // indirect
39-
github.com/stretchr/objx v0.5.3 // indirect
4039
golang.org/x/sync v0.8.0 // indirect
4140
golang.org/x/sys v0.40.0 // indirect
4241
golang.org/x/text v0.18.0 // indirect

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
5959
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
6060
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
6161
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
62-
github.com/stretchr/objx v0.5.3 h1:jmXUvGomnU1o3W/V5h2VEradbpJDwGrzugQQvL0POH4=
63-
github.com/stretchr/objx v0.5.3/go.mod h1:rDQraq+vQZU7Fde9LOZLr8Tax6zZvy4kuNKF+QYS+U0=
6462
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
6563
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
6664
golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=

scripts/install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ verify_checksum() {
9797

9898
local checksums
9999
if ! checksums=$(curl -fsSL "$checksum_url" 2>/dev/null); then
100+
echo "Warning: Could not download checksums file. Skipping verification."
100101
return 0
101102
fi
102103

103104
local expected_checksum
104105
expected_checksum=$(echo "$checksums" | grep "${BINARY_NAME}-${os}-${arch}" | awk '{print $1}')
105106

106107
if [[ -z "$expected_checksum" ]]; then
108+
echo "Warning: No checksum found for ${BINARY_NAME}-${os}-${arch}. Skipping verification."
107109
return 0
108110
fi
109111

0 commit comments

Comments
 (0)