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

Add new duplicate_declaration.{c,cpp} warning types #13173

Merged

Conversation

julien-lecomte
Copy link
Contributor

I have a project with many files that are similar to C syntax. Each file is compiled as if it was standalone program. For this reason, some variables are documented in what would be the equivalent of a .c file.

However, some of those variables have the same name, but not necessarily the same purpose / documentation. For this reason, I get many warnings: Duplicate C declaration, also defined at.

I would like to neither move them to a common file, nor make their documentation the same. Meanwhile, I would also like to keep the "-W" for my CI.

My current solution was creating a logging.Filter to disable the warning, but I think that an option to suppress_warnings would be beneficial to many users.

@AA-Turner AA-Turner changed the title Add c.duplicate_declaration to warning options. Add new duplicate_declaration.{c,cpp} warning types Jan 3, 2025
@AA-Turner AA-Turner added this to the 8.2.0 milestone Jan 3, 2025
@AA-Turner AA-Turner merged commit fddbd7d into sphinx-doc:master Jan 3, 2025
22 checks passed
@AA-Turner
Copy link
Member

Thank you @julien-lecomte!

A

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants