Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Add #[allow(non_camel_case_types)] to enums #50

Open
TobiasJacob opened this issue Feb 14, 2023 · 1 comment
Open

Add #[allow(non_camel_case_types)] to enums #50

TobiasJacob opened this issue Feb 14, 2023 · 1 comment

Comments

@TobiasJacob
Copy link

Is your feature request related to a problem? Please describe.
We are working on porting an existing codebase to rust. Our ice interface looks like this

    enum MessageType { eUNDEFINED, eDEBUG, eVERBOSE, eINFO, eIMPORTANT, eWARN, eERROR, eFATAL, eLogLevelCount };

    struct LogMessage{
        string who;
        long time;
        string group;
        string tag;
        MessageType type;
        string what;
        string file;
        int line;
        string function;
        string backtrace;
        int threadId;

    };

This generates a lot of warnings like this

warning: variant `eUNDEFINED` should have an upper camel case name
  --> src/gen/armarx/mod.rs:18:5
   |
18 |     eUNDEFINED = 0i32,
   |     ^^^^^^^^^^ help: convert the identifier to upper camel case: `EUndefined`
   |
   = note: `#[warn(non_camel_case_types)]` on by default

Describe the solution you'd like
Adding #[allow(non_camel_case_types)] in front of enums supresses this warning.

Describe alternatives you've considered
I added it manually, but this is not a feasible solution.

@cemoktra
Copy link
Owner

Hi,

i kind of abandoned this project as my company moved away from ice

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants