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

Linting .in.h files #325

Open
SJaffa opened this issue Jun 28, 2023 · 1 comment
Open

Linting .in.h files #325

SJaffa opened this issue Jun 28, 2023 · 1 comment
Assignees

Comments

@SJaffa
Copy link
Contributor

SJaffa commented Jun 28, 2023

We currently exclude *in.h files but it looks like some of the suggested changes from clang-format are valid. We could check those files in more detail and apply relevant changes.

@krishnakumarg1984
Copy link
Collaborator

krishnakumarg1984 commented Jun 28, 2023

I did some further investigation and found that we can selectively disable the formatting of #cmakeconfig lines in *.in.h files by modifying the source files like so:

// clang-format disable
#cmakeconfig whatever // CMake pragmas/directives
int someFcn(); // more C++ stuff (normal C++ lines of code) that we DON'T want to be autoformatted
// clang-format enable 

double otherImportantFcn(); // more C++ stuff (normal C++ lines of code) that we want to autoformat as usual

Hence, we can simply delete the .clang-format-ignore file that was added today during the pair-programming session.

@krishnakumarg1984 krishnakumarg1984 self-assigned this Jun 28, 2023
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

No branches or pull requests

2 participants