chore(deps): update module dev.gaijin.team/go/exhaustruct/v4 to v5#6
chore(deps): update module dev.gaijin.team/go/exhaustruct/v4 to v5#6renovate[bot] wants to merge 1 commit into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Free Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Renovate Ignore NotificationBecause you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR. |
This PR contains the following updates:
v4.0.0→v5.0.0Release Notes
GaijinEntertainment/go-exhaustruct (dev.gaijin.team/go/exhaustruct/v4)
v5.0.0Compare Source
exhaustructv5 reshapes how the linter is configured. Struct tags give way to comment directives, opt-in checking lands as a first-class mode, and patterns now reach down to individual fields. The full reference is in the README; this is the highlight reel.What's new
Comment directives replace struct tags. Three directives —
enforce,ignore,optional— now work at three levels of granularity: type definitions, struct literals, and individual fields. A documented priority order keeps the interaction between them predictable.Explicit mode (
-explicit) flips the default. Instead of checking every struct literal in the project, the linter only checks types you've explicitly marked — either with//exhaustruct:enforceor via-enforce-rx. The right pick for large codebases where exhaustruct should be a precision tool, not a blanket policy.Field-level regex patterns. The pattern flags now accept
Type#Fieldsyntax, so a single configuration line can express optionality across a codebase without touching the type definitions:Optional patterns (
-optional-rx). Regex-based optionality for whole types or specific fields. Closes a long-standing gap for third-party types you can't annotate directly.Derived types and aliases now follow a clearer rule. Field-level directives carry through
type T = Uandtype T U— so a field marked optional stays optional on every alias and derived type. Type-level directives stay attached to the original type, which means you can promote a derived type to "enforced" independently.Better diagnostics.
-report-full-type-pathreportsnet/http.Cookieinstead ofhttp.Cookie, removing ambiguity when import aliases are in play (#146).-debug-cache-metricsprints per-package cache statistics, useful for tuning patterns on large projects.Auto-migration.
exhaustruct -fix ./...rewrites the legacyexhaustruct:"optional"tags to comment directives in one pass — no manual sweep required.Breaking changes
exhaustruct:"optional"is no longer recognized. The-fixflag migrates existing tags automatically; the manual equivalent is a one-line move from the field's struct tag to a//exhaustruct:optionalcomment above (or beside) the field.include/excludevocabulary suggested filtering, but the linter has always been about enforcement. The new names say what they do:-include-rx/-i→-enforce-rx-exclude-rx/-e→-ignore-rx/v5. Update imports and reinstall:Fixes
&T{}returned where the function signature expects*T) are now flagged — previously they slipped past the checker (#147).types.Unaliasso their fields are inspected even behind an alias chain (#149).Migrating from v4
/v4to/v5.exhaustruct -fix ./...to rewrite struct tags to comment directives.-include-rx/-iwith-enforce-rx, and-exclude-rx/-ewith-ignore-rxin CI configs and.golangci.yaml.-explicitif you'd rather opt specific types into checking than opt the rest out.Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.