Skip to content
- Generated files are skipped — files with the standard
Code generated ... DO NOT EDIT. header (sqlc, templ, protoc-gen-go,
mockgen, stringer) are neither linted nor repaired, matching the
excludeGenerated default the rule had in branching-flow. The parity
corpus contained no generated files, so the gap first surfaced on real
sqlc/templ output (~90 false findings on a repo whose old strong-id
baseline was zero). Repair also never inserts Name() stubs into
generated files. Pinned by TestGeneratedFilesAreSkipped.
rules tool option on the BuildFlow provider — run BD003 through
BuildFlow instead of shelling out to the CLI:
tool_options: { brandid-lint: { rules: "BD001,BD003" } }. The value is
parsed by ParseRuleSet, so a config typo is a hard Detect error rather
than a silent wrong-rule scan. Without the option the provider stays on the
default rule set, identical to every earlier release. Also adds
linter.DetectWithRules(ctx, rules) for library consumers. Requires
go-finding/toolsdk v1.15.0 (Option declaration API).
- Rule BD003 (opt-in): primitive-typed ID detection, ported from
branching-flow strong-id with gated finding parity. Flags
string/int/uint/bool parameters, named returns, and struct fields
whose name marks them as an ID (userId, order_id, PID) and carries
the suggested type, brand, import path, and complete type definition in
every finding’s metadata. Select it with -rules BD003 — the default
rule set stays BD001+BD002. See the brandid-lint guide.
-rules CLI flag and the RuleSet API (ParseRuleSet,
DetectPathWithRules); //brandid-lint:ignore(BD003) <reason>
suppression, policed by BD002.
- Repair never touches files under a testdata path, closing the hole an
orchestrator used to corrupt this repo’s own parse-only fixtures.
cmd/namer moved out of the root module: the migration codemod lives on as the brandid-lint CLI inside the new linter/ sub-module (released separately as linter/vX.Y.Z). The root module is a pure library again — zero dependencies, no commands. Use brandid-lint instead of cmd/namer.
- Released alongside
linter/v0.2.0: rule BD002 (broken suppression directives), Name()-stub autofix (-fix), and a BuildFlow Repairer — see the brandid-lint guide.
SECURITY.md, a Go-pins consistency tripwire (CI + pre-push), and GitHub Releases for linter/ tags.
ErrMarshal/ErrUnmarshal delegate-path test coverage (library statement coverage 85.6% → 88.5%).
- Removed a tracked 7.6 MB
linter/brandid-lint binary (v0.5.0 namer-incident class); the CI artifact guard now scans all tracked files, not just the repo root.
- Two more daemon
go.mod sweeps repaired (root → 1.26, linter → 1.27.1); website dependency advisories cleared.
ErrMarshal and ErrUnmarshal sentinel errors: all marshal/unmarshal failures (JSON, binary, SQL text, text) now wrap a library sentinel — every error path from ID operations is errors.Is-matchable. See the Error Handling guide.
- Fuzz tests for SQL
Scan and Text round-trips; errors.Is coverage for all 9 exported sentinels.
- Pre-push dual-mode test hook and a
nix flake check CI job.
ErrNotOrdered message restored to its full form (was shortened in 0.5.0); errors.Is matching unaffected.
- Website security refresh (astro 7.3.3,
fast-uri, brace-expansion overrides) and package manager migrated to pnpm.
go.mod toolchain regression (auto-bumped to go 1.27.1, breaking Nix/CI pins) — restored to go 1.26.
- BuildFlow
go-auto-upgrade no longer corrupts the build-tagged JSON v1 files (permanently skipped via .buildflow.yml).
flake-check CI job: supported systems declared inline in flake.nix after nixpkgs 26.11 dropped x86_64-darwin.
- Removed accidentally tracked
namer binary from the repository. Source archives now contain only source code.
cmd/namer codemod tool: CLI that scans Go source for brand types missing the Name() method and generates suggested stubs. (Removed in 0.7.0 — its successor is the brandid-lint CLI.)
- Dual JSON v1/v2 support: The library now works with both
encoding/json (default) and encoding/json/v2 (via build tags). No GOEXPERIMENT required.
- Sentinel errors: All ID operations return wrapped sentinel errors (
ErrInvalidID, ErrNotOrdered, ErrUnsupportedType, ErrCannotScan, ErrInsufficientData, ErrInternal, ErrNilReceiver). Use errors.Is() to branch on error category. See the Error Handling guide.
- JSON serialization split into build-tagged pairs for dual-mode support.
- CI workflows now run build + tests in both v1 and v2 modes.
GOEXPERIMENT=jsonv2 is no longer a hard requirement — the library compiles with plain go build.
- Re-tagged release point aligning dependency updates with the tag-based GitHub release workflow.
- CI build failure:
id_json.go and id_sql.go now support both encoding/json (default) and encoding/json/v2 (via build tags). CI tests both modes.
- README performance table corrected with verified benchmark numbers from Go 1.26.4.
- Installation instructions now document the `` prerequisite.
CONTRIBUTING.md rebuilt with accurate Nix-based instructions.
FEATURES.md — honest feature inventory with code-verified citations.
ROADMAP.md — long-term vision.
docs/DOMAIN_LANGUAGE.md — added Phantom Type and Zero Value terms.
Format() writes directly to fmt.State’s writer instead of allocating strings — reduces allocations for %s and %v formatting.
- Named brands: optional
Name() method on brand types enables "User:abc123" display strings.
BrandName[B]() for runtime brand introspection.
ValidateID, ValidateIDWithValue, MustValidateID for brand-aware validation.
Ptr() and FromPtr() for optional ID fields.
String() now returns "Brand:value" for named brands (was value-only for all brands). Serialization unaffected — still uses raw values.
- Full serialization suite: JSON, SQL, Text, Binary, Gob.
Compare() method for ordered types.
Or() for zero-value fallbacks.
- SQL
Scan type coercion for all driver types.
ID[B any, V comparable] phantom-typed identifier.
NewID, Get, IsZero, Reset, Equal.
- Initial extraction from
go-composable-business-types.