Closed ricardoquesada closed 10 months ago
No problem adding that line to the generated output. Would it be possible to generate the code in a way that makes clang-format happy, or does this depend on the clang-format the user has chosen?
The format used by clang-format varies from project to project. Usually a file called .clang-format
is placed in the root folder (e.g: https://github.com/ricardoquesada/bluepad32/blob/main/.clang-format )
And in the CI you have a simple rule that checks whether the pull-request has the correct format. (e.g: https://github.com/ricardoquesada/bluepad32/blob/main/.github/workflows/clang-format-check.yaml )
Unfortunately clang-format doesn't (AFAIK) have a way to tell "ignore this file" when running the check. It supports "ignore folders", but doesn't support "ignore individual files"
Add clang-format off to header. Useful when the auto-generated headers are checked-in a repo with clang-format enabled.