feat: initialise core/lint module

Go module, .core/build.yaml, CLAUDE.md, directory structure.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Snider 2026-03-09 10:51:49 +00:00
parent 5f55060d52
commit 21b1e60fd9
3 changed files with 58 additions and 0 deletions

25
.core/build.yaml Normal file
View file

@ -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

30
CLAUDE.md Normal file
View file

@ -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

3
go.mod Normal file
View file

@ -0,0 +1,3 @@
module forge.lthn.ai/core/lint
go 1.26.0