Skip to content

Revisit "must camel case identifiers" lint warning on by default #3618

@erickt

Description

@erickt
Contributor

I like camel casing types that came from #3060, but sometimes I feel the warning is a little too strict. I'm porting erickt/rust-crypto to 0.4, and it has complicated enum variants like AES_256_ECB, which don't read nicely as Aes256Ecb. I ran into the same thing updating rust-elasticsearch, where I converted DFS_QUERY_THEN_FETCH to DfsQueryThenFetch, which made me sad.

I heard @graydon has some reservations with this lint checker on by default, so I figure maybe we should talk this through if it's not a settled issue. What does the community think about turning this into an opt-in lint? Or if that ship has already sailed, what about allowing types, traits, and variants to have _ in them?

Activity

brson

brson commented on Sep 29, 2012

@brson
Contributor

Putting this on 0.4 to make sure we discuss it before releasing a potentially annoying feature to the wild.

bblum

bblum commented on Sep 29, 2012

@bblum
Contributor

There is #[allow(non_camel_case_types)]. If the problem types are truly the 'uncommon' case, then we should have to use that for them.

brson

brson commented on Oct 2, 2012

@brson
Contributor

This warning is disabled by default again. Can revisit later.

ghost

ghost commented on Jun 4, 2019

@ghost

Not sure if there's a 'modern' issue tracking this, but, they seem to be enabled by default in 1.35.0.

added a commit that references this issue on Oct 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @erickt@brson@bblum

        Issue actions

          Revisit "must camel case identifiers" lint warning on by default · Issue #3618 · rust-lang/rust