Files
PgTidy/Makefile
T
warkanum e88d32f281
CI / Test (push) Failing after 47s
CI / Build snapshot (push) Has been skipped
feat: add LSP server, VSCode + DataGrip extensions, release infra, autofix
- pkg/lsp: JSON-RPC 2.0 LSP server (formatting, diagnostics, codeAction quick-fixes)
- cmd/pgtidy: lsp and config subcommands
- pkg/diagnostics: TextFix struct for byte-range autofixes
- pkg/lint: MIG001/MIG003 autofixes, ApplyFixes helper, --fix flag on lint command
- editors/vscode: TypeScript extension with LanguageClient, showVersion/showConfig/formatDocument commands, logo
- editors/datagrip: Gradle JetBrains plugin via LSP4IJ, pluginIcon
- .goreleaser.yaml, .github/workflows: CI + release pipeline
- Makefile: snapshot, release, vscode-compile, vscode-package targets
- go.mod + all imports: module path updated to git.warky.dev/wdevs/pgtidy
- assets: logo files (256px, 128px, 1024px, ico)
2026-06-28 12:48:28 +02:00

47 lines
1.2 KiB
Makefile

APP := pgtidy
CMD := ./cmd/pgtidy
DIST := dist
.PHONY: build test lint vet fmt clean release snapshot vscode-compile vscode-package
## build: compile binary for the current platform
build:
go build -trimpath -ldflags "-s -w -X main.version=$$(git describe --tags --abbrev=0 2>/dev/null || echo dev)" -o $(DIST)/$(APP) $(CMD)
## test: run tests (incl. corpus safety harness)
test:
go test ./...
## vet: static analysis
vet:
go vet ./...
## fmt: format Go code
fmt:
go fmt ./...
## lint: vet + format check
lint: vet
test -z "$$(gofmt -l .)" || (echo "gofmt needed:"; gofmt -l .; exit 1)
## clean: remove build artifacts
clean:
rm -rf $(DIST)
## snapshot: build multi-platform binaries without publishing (requires goreleaser)
snapshot:
goreleaser release --snapshot --clean
## release: tag and publish a GitHub release (requires GITHUB_TOKEN + goreleaser)
release:
goreleaser release --clean
## vscode-compile: compile the VSCode extension TypeScript
vscode-compile:
cp -r assets editors/vscode/assets
cd editors/vscode && pnpm install && pnpm run build
## vscode-package: build the .vsix package
vscode-package: vscode-compile
cd editors/vscode && pnpm run package