Skip to content

Add analyzer to enforce HRESULT handling (PInvoke019) - #1869

Open
Mark Gross (MarkusG) wants to merge 1 commit into
microsoft:mainfrom
MarkusG:hresult-analyzer-implementation
Open

Mark Gross (MarkusG) wants to merge 1 commit into
microsoft:mainfrom
MarkusG:hresult-analyzer-implementation

Conversation

@MarkusG

@MarkusG Mark Gross (MarkusG) commented Oct 29, 2026 •

Copy link
Copy Markdown

Implements the analyzer described in #1837

Report a warning when code ignores a CsWin32 HRESULT on any path. The analyzer follows the result through locals with control-flow analysis. Also discard ignored HRESULTs in the sandbox and sample projects, and document the new diagnostic.

Report a warning when code ignores a CsWin32 HRESULT on any path. The analyzer follows the result through locals with control-flow analysis. Also discard ignored HRESULTs in the sandbox and sample projects, and document the new diagnostic.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

1 participant