Skip to content

x/tools/go/analysis/passes/ctrlflow: add way to specify additional noreturn functions (e.g. for interface methods) #76344

@sirzooro

Description

@sirzooro

Go version

go version go1.25.4 linux/amd64

Output of go env in your module/workspace:

.

What did you do?

I have created custom nogo checker which analyzes call flow graphs provided by x/tools/go/analysis/passes/ctrlflow.

What did you see happen?

My function logger.Panic is not detected as noreturn function. Because of this my checker reports some false positive findings.

What did you expect to see?

Checker should have a way to recognize that logger.Panic does not return and adjust generated call flow graph accordingly. Discovered false positives should no longer appear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AnalysisIssues related to static analysis (vet, x/tools/go/analysis)FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsDecisionFeedback is required from experts, contributors, and/or the community before a change can be made.ToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions