Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 3 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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" \
Expand All @@ -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
12 changes: 6 additions & 6 deletions main.md
Original file line number Diff line number Diff line change
Expand Up @@ -1315,23 +1315,23 @@ 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]
```

**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

Expand Down
10 changes: 3 additions & 7 deletions scripts/run
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down