From 21b1e60fd91f090e72a10ca0cee57fa2fa65aa6d Mon Sep 17 00:00:00 2001 From: Snider Date: Mon, 9 Mar 2026 10:51:49 +0000 Subject: [PATCH] feat: initialise core/lint module Go module, .core/build.yaml, CLAUDE.md, directory structure. Co-Authored-By: Claude Opus 4.6 --- .core/build.yaml | 25 +++++++++++++++++++++++++ CLAUDE.md | 30 ++++++++++++++++++++++++++++++ go.mod | 3 +++ 3 files changed, 58 insertions(+) create mode 100644 .core/build.yaml create mode 100644 CLAUDE.md create mode 100644 go.mod diff --git a/.core/build.yaml b/.core/build.yaml new file mode 100644 index 0000000..9935d84 --- /dev/null +++ b/.core/build.yaml @@ -0,0 +1,25 @@ +version: 1 + +project: + name: core-lint + description: Pattern catalog and regex code checker + main: ./cmd/core-lint + binary: core-lint + +build: + cgo: false + flags: + - -trimpath + ldflags: + - -s + - -w + +targets: + - os: linux + arch: amd64 + - os: linux + arch: arm64 + - os: darwin + arch: arm64 + - os: windows + arch: amd64 diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..dba5283 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,30 @@ +# CLAUDE.md + +## Project Overview + +`core/lint` is a standalone pattern catalog and regex-based code checker. It loads YAML rule definitions and matches them against source files. Zero framework dependencies. + +## Build & Development + +```bash +core go test +core go qa +core build # produces ./bin/core-lint +``` + +## Architecture + +- `catalog/` — YAML rule files (embedded at compile time) +- `pkg/lint/` — Library: Rule, Catalog, Matcher, Scanner, Report types +- `cmd/core-lint/` — CLI binary using `cli.Main()` + +## Rule Schema + +Each YAML file contains an array of rules with: id, title, severity, languages, tags, pattern (regex), exclude_pattern, fix, example_bad, example_good, detection type. + +## Coding Standards + +- UK English +- All functions have typed params/returns +- Tests use testify +- License: EUPL-1.2 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2679143 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module forge.lthn.ai/core/lint + +go 1.26.0