From 4f75cd81f65e49cc04a4c226c385ba6036152f97 Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Fri, 26 Dec 2025 18:16:55 -0800 Subject: [PATCH 1/3] Refactor: Remove golangci-lint timeout argument and update documentation --- .github/workflows/build.yml | 1 - .golangci.yml | 4 ++++ main.md | 2 +- scripts/run | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 .golangci.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2094f46..530ee59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,4 +54,3 @@ jobs: uses: golangci/golangci-lint-action@v6 with: version: latest - args: --timeout=5m diff --git a/.golangci.yml b/.golangci.yml new file mode 100644 index 0000000..65109a5 --- /dev/null +++ b/.golangci.yml @@ -0,0 +1,4 @@ +version: "2" + +linters: + default: fast diff --git a/main.md b/main.md index 7ab34c0..2d97700 100644 --- a/main.md +++ b/main.md @@ -1321,7 +1321,7 @@ Use **golangci-lint** with default configuration for code quality checks. ```bash # Standalone -golangci-lint run --timeout=5m +golangci-lint run # Integrated with build (via scripts/run) ./scripts/run [command] diff --git a/scripts/run b/scripts/run index ed3786b..e19f3f3 100755 --- a/scripts/run +++ b/scripts/run @@ -5,7 +5,7 @@ cd "$(dirname "$0")/.." # Lint the code (non-blocking in development) echo "Running linter..." if command -v golangci-lint &> /dev/null; then - golangci-lint run --timeout=5m || echo "Warning: Linter found issues (non-blocking in development)" + golangci-lint run || echo "Warning: Linter found issues (non-blocking in development)" else echo "Warning: golangci-lint not found, skipping linting" fi From 62f4ca9a9eb1180a60da1f90ad74392ff6cfd697 Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Fri, 26 Dec 2025 19:45:37 -0800 Subject: [PATCH 2/3] Replace golangci-lint with go vet for code quality checks and update documentation --- .github/workflows/build.yml | 6 ++---- .golangci.yml | 4 ---- main.md | 12 ++++++------ scripts/run | 10 +++------- 4 files changed, 11 insertions(+), 21 deletions(-) delete mode 100644 .golangci.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 530ee59..d69acef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,5 @@ jobs: with: go-version: "1.24" - - name: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: latest + - name: go vet + run: go vet ./... diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index 65109a5..0000000 --- a/.golangci.yml +++ /dev/null @@ -1,4 +0,0 @@ -version: "2" - -linters: - default: fast diff --git a/main.md b/main.md index 2d97700..28c5851 100644 --- a/main.md +++ b/main.md @@ -1315,13 +1315,13 @@ curl -L https://github.com/wham/github-brain/releases/download/v1.2.3/github-bra ### Linting -Use **golangci-lint** with default configuration for code quality checks. +Use **go vet** for code quality checks. -**Running the linter:** +**Running go vet:** ```bash # Standalone -golangci-lint run +go vet ./... # Integrated with build (via scripts/run) ./scripts/run [command] @@ -1329,9 +1329,9 @@ golangci-lint run **CI Integration:** -- Linting runs automatically on all PRs via `.github/workflows/build.yml` -- Build fails if linter finds issues (blocking) -- In local development (`scripts/run`), linting runs but is non-blocking to allow rapid iteration +- `go vet` runs automatically on all PRs via `.github/workflows/build.yml` +- Build fails if `go vet` finds issues (blocking) +- In local development (`scripts/run`), `go vet` runs but is non-blocking to allow rapid iteration ### Release Model diff --git a/scripts/run b/scripts/run index e19f3f3..c18caef 100755 --- a/scripts/run +++ b/scripts/run @@ -2,13 +2,9 @@ set -e cd "$(dirname "$0")/.." -# Lint the code (non-blocking in development) -echo "Running linter..." -if command -v golangci-lint &> /dev/null; then - golangci-lint run || echo "Warning: Linter found issues (non-blocking in development)" -else - echo "Warning: golangci-lint not found, skipping linting" -fi +# Run go vet (non-blocking in development) +echo "Running go vet..." +go vet ./... || echo "Warning: go vet found issues (non-blocking in development)" # Build with FTS5 support enabled CGO_ENABLED=1 CGO_CFLAGS="-DSQLITE_ENABLE_FTS5" CGO_LDFLAGS="-lm" go build -gcflags="all=-N -l" -o ./build/github-brain . From 5bdc9c75cb9729d5c113d60bcc34e6859d52fc36 Mon Sep 17 00:00:00 2001 From: Tomas Vesely <448809+wham@users.noreply.github.com> Date: Fri, 26 Dec 2025 19:52:42 -0800 Subject: [PATCH 3/3] Remove lint job and integrate go vet into the build process --- .github/workflows/build.yml | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d69acef..87dd701 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,6 +24,9 @@ jobs: - name: Install dependencies run: go mod download + - name: Vet + run: go vet ./... + - name: Build run: | CGO_ENABLED=1 CGO_CFLAGS="-DSQLITE_ENABLE_FTS5" CGO_LDFLAGS="-lm" \ @@ -36,19 +39,3 @@ jobs: - name: Run tests if: false # Enable when tests exist run: go test -v ./... - - lint: - name: Lint - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: "1.24" - - - name: go vet - run: go vet ./...