diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2094f46..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,22 +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: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: latest - args: --timeout=5m diff --git a/main.md b/main.md index 7ab34c0..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 --timeout=5m +go vet ./... # Integrated with build (via scripts/run) ./scripts/run [command] @@ -1329,9 +1329,9 @@ golangci-lint run --timeout=5m **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 ed3786b..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 --timeout=5m || 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 .