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

Claimed missing identifier when typedef unnamed enum/struct/union #442

Open
Miniature opened this issue Oct 11, 2023 · 1 comment
Open
Labels
documentation Improvements or additions to documentation

Comments

@Miniature
Copy link

Miniature commented Oct 11, 2023

Describe the bug

When attempting to use typedef on an enum that has not been given an identifier, norminette outputs "Missing identifier in typedef declaration". Named enums are fine, only unnamed ones give the error.
This might be a quibble about how things are written, but my reading of V3's "An enum's name must start by e_." doesn't require there to be a name, only that if there is it should have a particular format. If that's the case I recommend changing it to read "An enum must have a name beginning with e_.".
All of this also applies to structs and unions.

Erroneous code

typedef enum {
	a
} t_enum;

Additional context

  • OS: MacOS Darwin 19.6.0
  • python3 --version: Python 3.9.5
  • norminette -v: norminette 3.3.54
@Miniature Miniature changed the title Claimed missing identifier when typedef unnamed enum Claimed missing identifier when typedef unnamed enum/struct/union Oct 11, 2023
@matthieu42Network
Copy link
Contributor

Hello, we will add this restriction on the pdf V3. But don't forget that the norminette IS the reference, not the pdf. :)

@matthieu42Network matthieu42Network added the documentation Improvements or additions to documentation label Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants