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

Consistent usage of end-of-statement marker with macros (better clang-format out of the box) & Make the CI step actually fail on failure #2405

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

Avasam
Copy link
Collaborator

@Avasam Avasam commented Oct 15, 2024

Closes #1412
Found with the regex #define .+?; (it may not find everything, but found a few)
Alternatively, the ; can be removed from the macros themselves to force adding it in-code, not having to add any configuration (my instinct is to say that might be clearer for devs anyway, and removes specialized configuration, but up to you)

(I'll add an entry to the .git-blame-ignore-revs after its decided which solution you prefer)

@Avasam Avasam changed the title Add StatementMacros to .clang-format Add StatementMacros to .clang-format & Make the CI step actually fail on failure Oct 15, 2024
@Avasam Avasam requested a review from mhammond October 18, 2024 18:45
Copy link
Owner

@mhammond mhammond left a comment

Choose a reason for hiding this comment

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

Thanks!

@Avasam
Copy link
Collaborator Author

Avasam commented Oct 23, 2024

@mhammond Just to confirm before I add to the .git-blame-ignore: you prefer this config change over removing ; from the macro so that is has to be added when used in code?

@mhammond
Copy link
Owner

@mhammond Just to confirm before I add to the .git-blame-ignore: you prefer this config change over removing ; from the macro so that is has to be added when used in code?

I don't have a strong opinion here, but I think it kinda seems more natural for people to not use a trailing ; with macros. OTOH, with our checkers in place, maybe it is fine to start insisting on the ;.

WDYT?

@Avasam
Copy link
Collaborator Author

Avasam commented Oct 23, 2024

My gut feeling is that it would be nice not special case certain methods in configuration. It would also make usage more consistent (for example PYWIN_MODULE_INIT_RETURN_ERROR usage is followed by ; in 87/90 cases).

@Avasam Avasam changed the title Add StatementMacros to .clang-format & Make the CI step actually fail on failure Consistent usage of end-of-statement marker with MACROS (better clang-format out of the box) & Make the CI step actually fail on failure Oct 23, 2024
@Avasam Avasam changed the title Consistent usage of end-of-statement marker with MACROS (better clang-format out of the box) & Make the CI step actually fail on failure Consistent usage of end-of-statement marker with macros (better clang-format out of the box) & Make the CI step actually fail on failure Oct 23, 2024
@Avasam Avasam requested a review from mhammond October 25, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

clang-format issue with macro
2 participants