Skip to content

docs: add flaglint-go documentation section#15

Merged
Krishan27 merged 3 commits into
mainfrom
docs/go-cli-section
Jul 6, 2026
Merged

docs: add flaglint-go documentation section#15
Krishan27 merged 3 commits into
mainfrom
docs/go-cli-section

Conversation

@flaglint

@flaglint flaglint commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

New "Go CLI" sidebar section (parallel to the existing JS docs tree, not interleaved with it):

All example output is real — captured by building the actual flaglint-go binary and running it against a small demo project, not hand-written.

Found one new scanner gap while building this: a direct chained factory call (pkg.GetLdClient().Method(...), no intermediate variable) isn't detected. Filed as flaglint-go#20 and documented honestly in the Supported Scope table rather than avoided in the example code.

Merge order

This should merge before #14 (the stale-claims fix), since that PR links to /docs/go/... pages this one creates.

Test plan

  • npm run build — clean, 86 pages (up from 78)
  • Verified in-browser via astro dev: sidebar renders, code blocks/JSON syntax-highlight correctly, tables and cross-links (including to flaglint-go GitHub issues) work

Krishan27 added 2 commits July 6, 2026 14:19
flaglint-go shipped (v0.1.0/v0.1.1) as a separate, real CLI months after
these pages were written — they still said Go SDK usage was entirely
unsupported/roadmap-only via a tree-sitter-go plan that was never built.

- supported-scope.md: split the "Go, Java, Python..." row; Go now points to
  flaglint-go's own supported-scope page instead of being lumped in with
  genuinely-unsupported languages.
- safety-model.md: clarified this page is specifically about flaglint-js's
  migrate --apply (which flaglint-go doesn't have), not a blanket "Go is
  unsupported by FlagLint" statement.
- changelog.md: updated the ADR 006 (Go language support, PROPOSED) entry to
  note it was superseded — Go support shipped as flaglint-go, built on
  native go/parser instead of the originally-proposed tree-sitter-go.

Links to the new /docs/go/ section (landing in a follow-up PR) — the actual
Go docs content doesn't exist yet, so those links 404 until that PR merges.

Signed-off-by: Krishan Kant Sharma <krishansharma0327@gmail.com>
New "Go CLI" sidebar section, parallel to the existing JS docs tree rather
than interleaved with it (Tutorials/Guides/Integrations stay JS-specific —
flaglint-go doesn't have equivalents yet):

- Overview (docs/go) — what it is, how it compares to flaglint-js
- Quickstart — install, audit/scan/validate walkthrough, baseline adoption
- CLI reference — scan, audit, validate (flaglint-go has no migrate/init/
  completion yet, so no reference pages for those)
- Identity Model — the whole-scan resolution story (struct fields, composite
  literals, multi-level chains incl. generics, cross-package factory
  functions, parameter-typed bindings), distilled from ADR 002/004
- Supported Scope / Limitations — every capability and every documented gap,
  linking directly to the real tracked GitHub issues (#5, #6, #15-17, #20)

All example output is real, captured by running the actual flaglint-go
binary against a small demo project — not hand-written. Verified in the
browser via the Astro dev server (sidebar, code blocks, tables, and
cross-links all render correctly), and `npm run build` passes clean.

Found one new scanner gap while building this: a direct chained factory
call (`pkg.GetLdClient().Method(...)`, no intermediate variable) isn't
detected, only the assign-then-use form is — filed as flaglint-go#20 and
documented in the Supported Scope table rather than papered over in the
example code.

Signed-off-by: Krishan Kant Sharma <krishansharma0327@gmail.com>
@coderabbitai

coderabbitai Bot commented Jul 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@flaglint, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 602a3399-c7a0-433f-aa51-6d3ee8c91110

📥 Commits

Reviewing files that changed from the base of the PR and between c16d7d5 and 330b728.

📒 Files selected for processing (12)
  • astro.config.mjs
  • src/content/docs/docs/concepts/safety-model.md
  • src/content/docs/docs/go/cli/audit.md
  • src/content/docs/docs/go/cli/scan.md
  • src/content/docs/docs/go/cli/validate.md
  • src/content/docs/docs/go/concepts/identity-model.md
  • src/content/docs/docs/go/index.md
  • src/content/docs/docs/go/quickstart.md
  • src/content/docs/docs/go/reference/limitations.md
  • src/content/docs/docs/go/reference/supported-scope.md
  • src/content/docs/docs/reference/changelog.md
  • src/content/docs/docs/reference/supported-scope.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/go-cli-section

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

- The blanket "every gap is a false-negative, never a false-positive" claim
  was wrong for one row: block-scoped variable shadowing (issue #5) is a
  documented false-positive risk, not a false-negative one — verified by
  reproducing it against the built binary. Carved out the exception in both
  supported-scope.md and limitations.md instead of overclaiming.
- The command-comparison table said flaglint-go has no `init`/`completion`;
  it actually does ship a working `completion` command (Cobra's stock
  boilerplate, not bespoke) — split the row and corrected it. `init` really
  doesn't exist yet.

Signed-off-by: Krishan Kant Sharma <krishansharma0327@gmail.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 6, 2026

Copy link
Copy Markdown

Deploying flaglint with  Cloudflare Pages  Cloudflare Pages

Latest commit: 563572a
Status: ✅  Deploy successful!
Preview URL: https://fe52c328.flaglint.pages.dev
Branch Preview URL: https://docs-go-cli-section.flaglint.pages.dev

View logs

@Krishan27 Krishan27 merged commit 2ebe226 into main Jul 6, 2026
4 checks passed
@Krishan27 Krishan27 deleted the docs/go-cli-section branch July 6, 2026 19:50
flaglint pushed a commit that referenced this pull request Jul 8, 2026
…trict-types and baseline counts

Every identity-resolution gap listed as "not resolved yet" on the
flaglint-go Limitations and Supported Scope pages has actually been
closed (verified directly against the flaglint-go issue tracker):
chained factory-call-then-method (#20), method values (#6), interface
satisfaction (#15), block-scoped shadowing (#5), factory returning a
wrapper type (#16), and nested go.mod files (#17). These pages were last
updated right before that work landed.

- limitations.md / supported-scope.md: mark all six as resolved (noting
  which layer resolves each — Phase 1 default vs. opt-in --strict-types),
  add two newer Phase-1 mechanisms these pages never mentioned at all
  (a struct field declared *ld.LDClient with no observed construction,
  and a composite literal directly initializing a package-level var),
  and state plainly that zero identity-resolution gaps are currently
  tracked.
- identity-model.md: add worked examples for both newer Phase-1
  mechanisms above, plus a new "Phase 2 — --strict-types" section
  (interface satisfaction, transitive factory wrapping, cross-function
  method-value forwarding) that didn't exist on this page at all before.
- index.md: same corrections to the "what flaglint-go does/doesn't do"
  summary — it previously named method values and interface satisfaction
  as open gaps.
- cli/{scan,audit,validate}.md: --strict-types wasn't documented as a
  flag anywhere on the site despite being available on all three
  commands since it shipped; added to each page's options table.
  audit.md's baseline JSON example was also missing the "schemaVersion"
  and "counts" fields flaglint-go now emits; validate.md's Baseline Mode
  section gains a note on what "counts" actually catches (a brand-new
  duplicate of an already-baselined call, not just a brand-new
  fingerprint).

Verified: `npm run build` completes cleanly (90 pages), spot-checked the
rendered Limitations page's output directly.

Signed-off-by: Krishan Kant Sharma <krishansharma0327@gmail.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.

2 participants