Skip to content

chore: repair dev tooling, expand golangci-lint config, and update rule-dev docs - #268

Merged
ZergsLaw merged 2 commits into
mainfrom
chore/dev-tooling-linters-docs
Nov 29, 2026
Merged

ZergsLaw merged 2 commits into
mainfrom
chore/dev-tooling-linters-docs

Conversation

@ZergsLaw

Copy link
Copy Markdown
Contributor

Summary

Repairs outdated developer tasks and contributor/spec docs, upgrades pinned golangci-lint to v2.15.0, and expands .golangci.yml to enforce high-signal Go correctness and context rules.

Dev tooling & CI

  • Repair task mocks and scripts/check-dev-tools.sh: replace the removed core.CurrentProjectGitWalker interface with core.ModuleRule alongside core.Rule and console.Console.
  • Upgrade golangci-lint to v2.15.0 in Taskfile.yml and scripts/check-dev-tools.sh.
  • Expand .golangci.yml to 14 linters + gofmt formatter: enable bodyclose, durationcheck, errorlint, exptostd, fatcontext, gocritic, misspell, noctx, and unconvert on top of the v2 defaults (errcheck, govet, ineffassign, staticcheck, unused).
  • Harden git_timeout_test.go under parallel -race load: increase SSH shim startup timeout from 800ms to 2s.

Codebase lint fixes (0 issues across all 14 linters)

  • gocritic: eliminate backing-array slice aliasing (slices.Concat / slices.Clone) in breaking_scope.go, migration/baseline.go, and policy/resolver.go; fix exitAfterDefer in cmd/easyp/main.go and cmd/easyp-mcp/main.go; simplify if/else chains to switch.
  • noctx: route validateGitDependencyIndex in internal/adapters/module_config/git_dependency_path.go through gitcommand.Run (gaining timeout + Setsid + GIT_TERMINAL_PROMPT=0) and use exec.CommandContext / net.ListenConfig.Listen in tests.
  • errorlint / errcheck / unconvert: convert ==/!= sentinel comparisons to errors.Is, fix error wrapping verbs, handle <-done errors in 4 parallel tests, and remove redundant string() / uint64() conversions.

Documentation for rule development & contributors

  • Add CONTRIBUTING.md covering prerequisites, Taskfile.yml workflows, enabled linters, and step-by-step instructions for implementing core.Rule / core.ModuleRule lint rules over internal/protoast.
  • Sync AGENTS.md, .spec/ (DOMAIN.md, CODE_STYLE.md, TOOLS.md, TESTING.md, agent-rules.md, config/review-maintenance.md), and .agents/skills/go-{code-style,testing}: remove deleted CurrentProjectGitWalker and legacy DOM types, document core.ModuleRule and protoast, and match current CI and .golangci.yml.

Verification

  • golangci-lint run --max-issues-per-linter=0 --max-same-issues=0 ./... (0 issues.)
  • golangci-lint fmt --diff ./... (clean)
  • go vet ./... and GOOS=windows GOARCH=amd64 go vet ./...
  • GOOS=linux GOARCH=arm GOARM=7 and GOOS=windows GOARCH=amd64 builds of ./cmd/easyp ./cmd/easyp-mcp
  • task dev-tools:check, task schema:check, task proto:check
  • go test -race -count=1 ./... (all 34 packages pass)

…pdate contributor docs

- Fix broken task mocks target in Taskfile.yml and scripts/check-dev-tools.sh
  (replace removed CurrentProjectGitWalker with core.ModuleRule) and bump
  pinned golangci-lint to v2.15.0
- Expand .golangci.yml from 5 to 14 high-signal linters (bodyclose,
  durationcheck, errorlint, exptostd, fatcontext, gocritic, misspell, noctx,
  unconvert alongside errcheck/govet/ineffassign/staticcheck/unused + gofmt)
- Resolve all reported lint findings across the codebase, including slice
  aliasing in appendAssign, exitAfterDefer in CLI entrypoints, errors.Is/%w
  checks, redundant conversions, and routing validateGitDependencyIndex
  through gitcommand.Run
- Give git_timeout_test.go 2s SSH startup headroom under heavy parallel macOS
  -race load
- Update AGENTS.md, .spec/{DOMAIN,CODE_STYLE,TOOLS,TESTING,agent-rules,config/review-maintenance}.md,
  and .agents/skills/go-{code-style,testing} to reflect protoast, ModuleRule,
  and current CI/linters, and add CONTRIBUTING.md
@ZergsLaw
ZergsLaw merged commit 3919ef8 into main Nov 29, 2026
3 checks passed
@ZergsLaw
ZergsLaw deleted the chore/dev-tooling-linters-docs branch November 29, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant