-
-
Notifications
You must be signed in to change notification settings - Fork 84
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
Clang format #243
Clang format #243
Conversation
I'd go with something like If you want to run directly the format command using cmake, make as |
Hi @miguelteixeiraa, would you like to complete this? We can open another pull request to fix all the linter related issues. |
I could complete that, but if you already have everything ready, no problem! You can push what you have and we can close this one! : ) |
I haven't worked on it, I'm just interested :-) |
I made the execution of the "check" function/script be conditioned to a variable called IS_CI, and the default "format" script/function for every time it is not the CI.. if I turn it to be a custom command, it would be better (talking about the "format")? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this pull request! Just updating or adding a GitHub workflow would be sufficient to merge
cmake/clang-format.cmake
Outdated
set(IS_CI OFF) | ||
endif() | ||
|
||
if(IS_CI) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also update one of the github workflows to add a IS_CI environment variable?
Can you remove the fixes to all files? It will create huge conflict with the aggregator pull request. Lets merge it with a failing test |
Sure thing! I'm just trying to figure out why it still falling even formatting all files. I'll rollback after that. |
It doesn't seem to be a big problem.. There is a major version difference between the clang-format version installed by default in ubuntu-latest and the one I have running locally (15.0.6 on my Mac, and 14.x.x on Ubuntu-latest probably). So this is formatting differently in the two places. |
Thinking of downloading a specific version of clang-format and keeping it in a folder (which will be in .gitignore) callend ".ada_extras" (please let me know if you have naming suggestions in case we follow this path).. and then make the script to use the downloaded clang-format binary instead of the one that is in the PATH.... Any other suggestions? Thoughts? |
That's how everything is working now : ) |
Now I'll go back to work on one of the tests PR because they are probably celebrating their birthday at this point 😅 |
@lemire What do you think? |
I leave it to you. |
@miguelteixeiraa Can we update idna with these changes too? |
Sure thing! |
ref: #170
I was thinking about the following options:
run-clang-format.sh
a "cmake script" (to be used likecmake -P clang-format.cmake
)Any thoughts?