Skip to content

clippy: add settings.allowedLints#718

Open
anstylian wants to merge 1 commit into
cachix:masterfrom
anstylian:clippy-lints-allow
Open

clippy: add settings.allowedLints#718
anstylian wants to merge 1 commit into
cachix:masterfrom
anstylian:clippy-lints-allow

Conversation

@anstylian
Copy link
Copy Markdown

My project builds with stable cargo 1.96.0, but the clippy hook runs nightly, which knows lints stable doesn't — e.g. clippy::unused_async_trait_impl. With denyWarnings the hook fails on them, and I can't #![allow] the lint in code because stable then complains about an unknown lint.

This adds settings.allowedLints, rendered as -A <lint> after -D warnings so it composes with denyWarnings:

  hooks.clippy = {
    enable = true;
    settings = {
      denyWarnings = true;
      allowedLints = [ "clippy::unused_async_trait_impl" ];
    };
  };

Default is [], so existing configs are unchanged.

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