8000 Lint needed: `unchecked_output_status` · Issue #920 · trailofbits/dylint · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Lint needed: unchecked_output_status #920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
smoelius opened this issue Oct 27, 2023 · 2 comments
Open

Lint needed: unchecked_output_status #920

smoelius opened this issue Oct 27, 2023 · 2 comments
Labels
lint New lint or lint enhancement

Comments

@smoelius
Copy link
Collaborator

Check for a local variable of type std::process::Output whose stdout or stderr field is read, but whose status field is not.

Should probably be a MIR lint.

@smoelius smoelius added the lint New lint or lint enhancement label Dec 11, 2023
@smoelius
Copy link
Collaborator Author

Should probably be a MIR lint.

Actually, there is this: https://doc.rust-lang.org/beta/nightly-rustc/rustc_lint/struct.LateContext.html#method.expr_or_init

While a MIR lint would be ideal, using that function might suffice.

@smoelius
Copy link
Collaborator Author

There's also: https://doc.rust-lang.org/stable/nightly-rustc/clippy_utils/fn.expr_or_init.html

It looks like the clippy_utils version ignores expressions with adjustments, while the LateContext version does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lint New lint or lint enhancement
Projects
None yet
Development

No branches or pull requests

1 participant
0