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

Expand lints #530

Merged
merged 3 commits into from Aug 28, 2023
Merged

Expand lints #530

merged 3 commits into from Aug 28, 2023

Conversation

tarcieri
Copy link
Contributor

@tarcieri tarcieri commented Jun 12, 2023

Adds a lints section to the top of lib.rs with the following:

#![warn(
    clippy::unwrap_used,
    missing_docs,
    rust_2018_idioms,
    unused_lifetimes,
    unused_qualifications
)]

warn is used instead of deny to prevent the lints from firing during local development, however we already configure -D warnings in CI so if any lint fails on checked-in code, it will cause a CI failure.

This commit also fixes or explicitly allows any current violations of these lints. The main ones were:

  • clippy::unwrap_used: replaces usages of unwrap with expect
  • rust_2018_idioms: no implicit lifetimes, which were present on usages of core::fmt::Formatter
  • unused_lifetimes: corrects a few instances

@tarcieri tarcieri requested a review from rozbb June 12, 2023 14:10
src/field.rs Outdated Show resolved Hide resolved
src/lib.rs Outdated Show resolved Hide resolved
Adds a lints section to the top of lib.rs with the following:

    #![warn(
        clippy::unwrap_used,
        missing_docs,
        rust_2018_idioms,
        unused_lifetimes,
        unused_qualifications
    )]

`warn` is used instead of `deny` to prevent the lints from firing during
local development, however we already configure `-D warnings` in CI so
if any lint fails on checked-in code, it will cause a CI failure.

This commit also fixes or explicitly allows any current violations of
these lints. The main ones were:

- `clippy::unwrap_used`: replaces usages of `unwrap` with `expect`
- `rust_2018_idioms`: no implicit lifetimes, which were present on
  usages of `core::fmt::Formatter`
@rozbb
Copy link
Contributor

rozbb commented Aug 28, 2023

These are all good lints imo. Ty

@rozbb rozbb merged commit c058cd9 into main Aug 28, 2023
42 checks passed
@rozbb rozbb deleted the expand-lints branch February 7, 2024 01:11
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.

None yet

3 participants