Skip to content

Drop DOC.md in favor of pkg.go.dev - #180

Merged
cinar merged 1 commit into
mainfrom
docs/drop-docmd-use-pkgdev
Sep 5, 2026
Merged

Drop DOC.md in favor of pkg.go.dev#180
cinar merged 1 commit into
mainfrom
docs/drop-docmd-use-pkgdev

Conversation

@cinar

@cinar cinar commented Sep 5, 2026

Copy link
Copy Markdown
Owner

Summary

DOC.md embeds source-line links for every symbol, so any unrelated code change shifts line numbers across large parts of the file — this is the root cause behind the repeated merge-conflict cleanups over the last several PRs. Rather than work around it (custom gomarkdoc templates to drop source links, or a bot that regenerates it), this drops the committed file entirely in favor of pkg.go.dev, which already serves the same API reference live from source with stable, line-number-independent anchors and zero regeneration step.

  • Removes DOC.md, locales/DOC.md, .gomarkdoc.yml, and the docs taskfile task.
  • Rewrites all 50 DOC.md#... links in README.md to the pkg.go.dev equivalent, and fixes a few anchor inconsistencies that were GitHub-markdown-heading-slug artifacts rather than real conventions: func-maxlenMaxLen, func-minlenMinLen, func-requiredRequired, func-makeregexpcheckerMakeRegexpChecker, func-istimeIsTime, ISLteIsLte.
  • Swaps the GoDoc badge for the pkg.go.dev badge — godoc.org has been retired for a while, so that badge was likely already dead.
  • Adds a CHANGELOG.md entry.

Trade-off: pkg.go.dev serves the latest tagged version, so a link to a symbol merged but not yet released won't resolve until the next tag is cut (versus DOC.md, which reflected main). Given the release cadence here, that's a better trade than a file that conflicts on nearly every concurrent PR.

Test plan

  • go build/go test -cover ./... — 100% coverage maintained (docs-only change, no behavior touched)
  • go vet, gosec, revive all clean
  • Spot-checked the rewritten links resolve correctly on pkg.go.dev

🤖 Generated with Claude Code

https://claude.ai/code/session_01H9bQZz1DAxYpsfyKbn3Adk

DOC.md embeds source-line links for every symbol, so any unrelated
code change shifts line numbers across large parts of the file --
this made it conflict on nearly every concurrent pull request (the
root cause behind the repeated merge-conflict cleanups over the last
several PRs).

pkg.go.dev already generates the same API reference live from
source, with stable per-symbol anchors that don't depend on line
numbers, and no regeneration step. So instead of working around the
conflict (e.g. custom templates to drop the source links), drop the
committed file entirely:

- Removes DOC.md, locales/DOC.md, .gomarkdoc.yml, and the "docs"
  taskfile task.
- Rewrites all 50 DOC.md links in README.md to the pkg.go.dev
  equivalent, and fixes a few anchor inconsistencies that were
  GitHub-markdown-slug artifacts rather than real conventions
  (func-maxlen -> MaxLen, func-required -> Required,
  func-makeregexpchecker -> MakeRegexpChecker, func-istime -> IsTime,
  ISLte -> IsLte).
- Swaps the GoDoc badge for the pkg.go.dev badge; godoc.org has been
  retired for a while, so that badge was likely already dead.

Trade-off: pkg.go.dev serves the latest tagged version, so a link to
a symbol not yet in a release won't resolve until the next tag is
cut. Given this project's release cadence, that's a better trade
than a committed file that conflicts on every other PR.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01H9bQZz1DAxYpsfyKbn3Adk
@codecov

codecov Bot commented Sep 5, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (5a22c07) to head (4b42183).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #180   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           49        49           
  Lines          752       752           
=========================================
  Hits           752       752           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cinar
cinar merged commit e48cd39 into main Sep 5, 2026
8 checks passed
@cinar
cinar deleted the docs/drop-docmd-use-pkgdev branch September 5, 2026 03:44
@cinar cinar mentioned this pull request Sep 5, 2026
cinar added a commit that referenced this pull request Sep 5, 2026
## Summary
Purely structural/visual — no content or link changes beyond what's
described below, layered on top of #180's DOC.md/pkg.go.dev migration
(rebased on current `main`, no conflicts).

- **Normalized heading levels.** Most major sections (`Checkers
Provided`, `Custom Checkers and Normalizers`, `Framework Integration`,
etc.) were `#`, the same level as the page title (`# Checker`) itself,
while a couple (`Usage`, `Normalizers and Checkers`) were correctly
`##`. This bumps the inconsistent ones to `##` (and `Gin`/`Echo` under
`Framework Integration` to `###` to stay nested one level down), so the
page has one real heading hierarchy — which also fixes GitHub's
auto-generated outline sidebar, previously a flat list of same-weight
entries.
- **Added a table of contents** — the doc is 400+ lines across ~13 major
sections with no way to jump around it.
- **Added a short feature-highlight bullet list** right under the
opening paragraph (zero dependencies, struct tags, checkers+normalizers
together, cross-field/conditional rules, 23 locales, framework adapters)
— a scannable value-prop up front, ahead of the existing two-paragraph
prose intro.

## Test plan
- Docs-only change; `go build`/`go test -cover ./...` unaffected (100%
coverage maintained, confirmed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
cinar added a commit that referenced this pull request Sep 5, 2026
## Problem

Every PR added its own bullet to `CHANGELOG.md`'s `## [Unreleased]`
section, always inserting at (or near) the same spot. With PRs landing
close together, that made this file a near-guaranteed merge conflict on
every concurrent pull request — the exact problem `DOC.md` caused before
#180 dropped it in favor of pkg.go.dev.

This wasn't theoretical: it's what just happened resolving conflicts on
#219#222. Each conflict resolution round immediately conflicted again
as the next PR merged, because every remaining branch's `### Fixed`
entry inserted into the same place.

## Fix

- Freeze the current `## [Unreleased]` section as a one-time snapshot
(documenting the six P0 bugfixes plus the earlier accumulated
Added/Changed/Removed entries) and add a note explaining the new policy
at the top of the file.
- Going forward, unreleased changes are covered by [GitHub
Releases](https://github.com/cinar/checker/releases), whose notes are
generated automatically from merged pull requests — no file to conflict
on. `CHANGELOG.md` only gains a new entry when a version is actually
tagged, added by hand from that release's generated notes (a maintainer
decision, not a per-PR one).
- Updated `CLAUDE.md`'s conventions section: PRs no longer touch
`CHANGELOG.md`.

No code changes; docs/process only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_01FLdVmP5daHiknrTW4Geh2i

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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