Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

contracts: allow upper case acronyms lint #2128

Merged
merged 1 commit into from
Feb 10, 2023

Conversation

palango
Copy link
Contributor

@palango palango commented Feb 8, 2023

Motivation

I have a contract named DKG for which the auto-generated code created the following clippy warning:

warning: name `DKG` contains a capitalized acronym
  --> crates/dkg-cli/src/dkg_contract.rs:25:16
   |
25 |     pub struct DKG<M>(ethers::contract::Contract<M>);
   |                ^^^ help: consider making the acronym lowercase, except the initial letter: `Dkg`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms
   = note: `#[warn(clippy::upper_case_acronyms)]` on by default

According to the solidity style guide the name is fine: https://docs.soliditylang.org/en/v0.5.3/style-guide.html#naming-styles

Solution

Allow that clippy lint by default

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog
  • Breaking changes

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

ty!

@gakonst gakonst merged commit bfe3ba9 into gakonst:master Feb 10, 2023
@palango palango deleted the clippy-acronyms branch February 13, 2023 09:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants