Skip to content
Draft
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
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ run-envoy:
@echo "Starting Envoy..."
func-e run --config-path config/envoy.yaml --component-log-level "ext_proc:trace,router:trace,http:trace"

golang-lint-install:
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0

golang-lint:
@echo "Running golangci-lint..."
@cd src/semantic-router && golangci-lint


# Run go vet for all Go modules
vet:
@echo "Running go vet..."
Expand Down Expand Up @@ -171,7 +179,7 @@ test-semantic-router: build-router
cd src/semantic-router && CGO_ENABLED=1 go test -v ./...

# Test the Rust library and the Go binding
test: vet check-go-mod-tidy download-models test-binding test-semantic-router
test: vet check-go-mod-tidy golangci-lint download-models test-binding test-semantic-router

# Clean built artifacts
clean:
Expand Down
24 changes: 24 additions & 0 deletions src/semantic-router/.golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
version: "2"
linters:
default: none
enable:
- gosec
- govet
- revive
- unused
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- gosec
path: ^*_test.go
issues:
fix: true
formatters:
enable:
- gofmt
Loading