Skip to content
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

Extend compiler and clippy lints #39

Closed
robin-nitrokey opened this issue Feb 27, 2023 · 1 comment
Closed

Extend compiler and clippy lints #39

robin-nitrokey opened this issue Feb 27, 2023 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@robin-nitrokey
Copy link
Member

E. g. in opcard we use this configuration:

#![warn(
    missing_copy_implementations,
    missing_debug_implementations,
    missing_docs,
    non_ascii_idents,
    trivial_casts,
    unused,
    unused_qualifications,
    clippy::expect_used,
    clippy::unwrap_used
)]
#![deny(unsafe_code)]

https://github.com/Nitrokey/opcard-rs/blob/main/src/lib.rs#L31-L42

Exceptions that require e. g. unwrap can be whitelisted explicitly:

#[allow(clippy::unwrap_used)]
some_function().unwrap();  // always ok because of ...
@szszszsz szszszsz added this to the 0.7.0 milestone Feb 27, 2023
@szszszsz szszszsz added the enhancement New feature or request label Mar 3, 2023
@szszszsz szszszsz modified the milestones: 0.7.0, 0.8.0 Mar 3, 2023
@szszszsz szszszsz modified the milestones: 0.10.0, 0.11.0 Apr 26, 2023
@szszszsz
Copy link
Member

Fixed in #75

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

Successfully merging a pull request may close this issue.

2 participants