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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ __pycache__/
.venv/
.ruff_cache/
_site/
bin/
15 changes: 15 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
run:
timeout: 5m

linters:
enable:
- errcheck
- govet
- staticcheck
- unused
- gosimple
- ineffassign

linters-settings:
errcheck:
check-type-assertions: true
31 changes: 29 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DEFAULT_GOAL := help
.PHONY: help bootstrap lint check fmt lint-adr-status lint-adr-numbers lint-adr-frontmatter mindmap
.PHONY: help bootstrap lint check fmt lint-adr-status lint-adr-numbers lint-adr-frontmatter mindmap \
go-build go-test go-lint go-fmt go-vet go-tidy

help:
@echo "Available targets:"
Expand All @@ -12,6 +13,12 @@ help:
@echo " lint-adr-numbers - Check for duplicate ADR numeric identifiers"
@echo " lint-adr-frontmatter - Validate ADR frontmatter and cross-references"
@echo " mindmap - Open the interactive document graph in a browser"
@echo " go-build - Build the fullsend binary"
@echo " go-test - Run Go tests with race detection and coverage"
@echo " go-lint - Run golangci-lint"
@echo " go-fmt - Format Go code"
@echo " go-vet - Run go vet"
@echo " go-tidy - Run go mod tidy"

# Install all development tools needed for linting, formatting, and pre-commit hooks.
# Prerequisites: uv (https://docs.astral.sh/uv/) and go (https://go.dev/)
Expand Down Expand Up @@ -44,7 +51,7 @@ bootstrap:
@echo "==> Bootstrap complete!"
@echo " Make sure $(BOOTSTRAP_BIN_DIR) is on your PATH."

lint: check lint-adr-status lint-adr-numbers lint-adr-frontmatter
lint: check go-vet lint-adr-status lint-adr-numbers lint-adr-frontmatter

check:
uvx ruff check .
Expand All @@ -64,3 +71,23 @@ lint-adr-frontmatter:

mindmap:
@xdg-open docs/mindmap.html 2>/dev/null || open docs/mindmap.html 2>/dev/null || echo "Open docs/mindmap.html in your browser"

VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")

go-build:
go build -ldflags "-X main.version=$(VERSION)" -o bin/fullsend ./cmd/fullsend/

go-test:
go test -race -cover ./...

go-lint:
golangci-lint run ./...

go-fmt:
gofmt -l -w .

go-vet:
go vet ./...

go-tidy:
go mod tidy
15 changes: 15 additions & 0 deletions cmd/fullsend/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"fmt"
"os"

"github.com/fullsend-ai/fullsend/internal/cli"
)

func main() {
if err := cli.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}
Loading