Skip to content

Commit 88c87d1

Browse files
authored
chore: Use golangci-lint-action; remove newreposecretwithlibsodium (#4119)
1 parent a12b8d7 commit 88c87d1

6 files changed

Lines changed: 9 additions & 187 deletions

File tree

.github/workflows/linter.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,14 @@ jobs:
1313
with:
1414
go-version: stable
1515
cache-dependency-path: "**/go.sum"
16-
- uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
16+
- name: Check generated code
17+
run: ./script/generate.sh --check
18+
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9.2.0
1719
with:
18-
path: |
19-
bin/golangci-lint
20-
bin/custom-gcl
21-
key: ${{ runner.os }}-${{ runner.arch }}-tools-${{ hashFiles('.custom-gcl.yml', 'tools/**/go.mod', 'tools/**/go.sum', 'tools/**/*.go') }}
22-
- run: script/lint.sh
20+
version: v2.10.1 # sync with version in .custom-gcl.yml
21+
experimental: "automatic-module-directories"
22+
- name: Check OpenAPI
23+
run: ./script/metadata.sh update-openapi --validate
2324
env:
2425
CHECK_GITHUB_OPENAPI: 1
2526
GITHUB_TOKEN: ${{ github.token }}

example/newreposecretwithlibsodium/go.mod

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

example/newreposecretwithlibsodium/go.sum

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

example/newreposecretwithlibsodium/main.go

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

script/lint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort -u)"
2828
# Override with LINT_JOBS, otherwise use detected CPU count.
2929
: "${LINT_JOBS:=$(getconf _NPROCESSORS_ONLN 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null || echo 4)}"
3030

31-
LINT_DIRS="$(printf '%s\n' "$MOD_DIRS" | grep -v '^example/newreposecretwithlibsodium$')"
31+
LINT_DIRS="$(printf '%s\n' "$MOD_DIRS")"
3232

3333
FAILED_COUNT=0
3434
LINT_FAILED=0
@@ -51,7 +51,7 @@ wait_pids() {
5151
# Identify the directory for this PID
5252
dir=$(echo "$DIRS_IN_FLIGHT" | awk -v i="$i" '{print $i}')
5353
log_file="$LOG_DIR/$(echo "$dir" | tr '/' '_').log"
54-
54+
5555
if wait "$pid"; then
5656
printf "${GREEN}✔ %-40s [ PASS ]${NC}\n" "$dir"
5757
else

script/test.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ fi
1919
MOD_DIRS="$(git ls-files '*go.mod' | xargs dirname | sort)"
2020

2121
for dir in $MOD_DIRS; do
22-
[ "$dir" = "example/newreposecretwithlibsodium" ] && continue
2322
echo "testing $dir"
2423
(
2524
cd "$dir"

0 commit comments

Comments
 (0)