Commit graph

11 commits

Author SHA1 Message Date
Snider
6806b20651 fix(dx): fix build error, replace os.* with go-io, add scanner tests
- Fix RegisterCommands call to match single-arg signature; register
  locales separately via i18n.RegisterLocales
- Replace os.Stat/os.ReadDir with coreio.Local equivalents in
  detect.go, format.go, main.go, cmd_docblock.go
- Add tests for languagesFromRules, IsExcludedDir, ScanFile edge cases
- Coverage: pkg/lint 71.0% → 72.9%, pkg/detect 100%, pkg/php 68.7%

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 09:02:06 +00:00
Snider
9681b062ac refactor: replace all remaining fmt.Errorf with coreerr.E from go-log
Replaces ~46 fmt.Errorf and errors.New calls in production code across
pkg/lint, pkg/php, cmd/core-lint, and cmd/qa with structured coreerr.E()
calls using the forge.lthn.ai/core/go-log convention.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 21:48:58 +00:00
Snider
a36f835fe0 refactor: replace os.* and fmt.Errorf with go-io/go-log conventions
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 19:44:45 +00:00
Snider
af5c792da8 feat(lint): add pkg/detect + pkg/php — project detection and PHP QA toolchain
Add project type detection (pkg/detect) and complete PHP quality assurance
package (pkg/php) with formatter, analyser, audit, security, refactor,
mutation testing, test runner, pipeline stages, and QA runner that builds
process.RunSpec for orchestrated execution.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 13:13:30 +00:00
Snider
15c9fe85c8 feat: extract devkit from go-devops into core/lint
Add Toolkit subprocess wrappers (go vet, gocyclo, govulncheck, gitleaks,
race detector, coverage, git log/diff/perms), native AST cyclomatic
complexity analyser, coverage snapshot/regression tracking with JSON
store, and govulncheck JSON parser.

89 tests passing (up from 51).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-09 11:30:38 +00:00
Snider
bc159163e8 feat: seed catalog with 18 patterns from ecosystem sweep
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:59:33 +00:00
Snider
e5419c85c4 feat: add Scanner with directory walking and language detection
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:57:43 +00:00
Snider
4309e17cde feat: add report output (JSON, JSONL, text, summary)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:56:46 +00:00
Snider
d33d7056f1 feat: add regex Matcher with exclude pattern support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:56:07 +00:00
Snider
3bf8585943 feat: add Catalog loader with dir/embed/filter support
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:55:13 +00:00
Snider
34d77e2216 feat: add Rule struct with YAML parsing and validation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 10:54:15 +00:00