From 322076621165627e214f7e70da1d87dab1a31ce0 Mon Sep 17 00:00:00 2001 From: Test User Date: Mon, 29 Dec 2025 16:32:17 -0700 Subject: [PATCH] docs: add version flag documentation Update CLAUDE.md and README.md to document the new --version/-V flag. - Add version flag examples to CLAUDE.md Build & Run section - Add version flag to README.md Common Options section - Document ldflags build override pattern in both files --- CLAUDE.md | 7 +++++++ README.md | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index f9d936e..2d231ad 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -8,6 +8,13 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co # Build and symlink to ~/go/bin go build -o cclint . && ln -sf $(pwd)/cclint ~/go/bin/cclint +# Build with version override +go build -ldflags "-X github.com/dotcommander/cclint/cmd.Version=1.0.0" -o cclint . + +# Version +cclint --version # show version (defaults to "dev") +cclint -V # short form + # Run linter (defaults to ~/.claude) cclint # lint all component types cclint agents # lint only agents diff --git a/README.md b/README.md index b52acff..f135dda 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ export PATH=$PATH:~/go/bin git clone https://github.com/dotcommander/cclint.git && cd cclint go build -o cclint . ln -sf $(pwd)/cclint ~/go/bin/cclint + +# Or build with a specific version +go build -ldflags "-X github.com/dotcommander/cclint/cmd.Version=1.0.0" -o cclint . ``` ## Quick Start @@ -70,6 +73,10 @@ cclint context # Lint CLAUDE.md files ### Common Options ```bash +# Show version +cclint --version +cclint -V + # Project root (auto-detected by default) cclint --root ~/my-project agents