Skip to content

Deprecate calling FastGenWithCause()/GenWithStackByCause() with args, forward them to the *ByArgs() variants - #95

Open
kennytm wants to merge 3 commits into
masterfrom
kennytm/prepare-fix-86
Open

kennytm wants to merge 3 commits into
masterfrom
kennytm/prepare-fix-86

Conversation

@kennytm

@kennytm kennytm commented Dec 4, 2026 •

Copy link
Copy Markdown
Collaborator

Intermediate progress for #86

This comment was marked as resolved.

This comment was marked as outdated.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The rule falsely flags valid method-expression calls, while deprecated-call forwarding records the wrapper’s location instead of the application’s call site.

2 open issues

Review effort: Max

Comment thread normalize.go
func (e *Error) GenWithStackByCause(args ...any) error {
// Handle deprecated usage.
if len(args) > 0 {
return e.GenWithStackByArgs(args...)

func isPingcapError(ctx *dsl.VarFilterContext) bool {
want := ctx.GetType("github.com/pingcap/errors.Error")
return types.Identical(ctx.Type, want) || types.Identical(ctx.Type, types.NewPointer(want))
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