-
Notifications
You must be signed in to change notification settings - Fork 244
run_clang_format.py cleanup #177
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
run_clang_format.py cleanup #177
Conversation
Previously, "clang-format-10.0" was executed which is unecessarily specific.
Hello @dpfrey , thank you for this PR. I have two comments/questions:
|
Thanks for taking a look at this @MichalPrincNXP. git tracks file permissions. So prior to this PR, if someone clones eRPC, the
The user must either run:
or:
So it's basically just a minor ease of use change and it also helps to signal to the user that this python file is meant to be executed as a script rather than imported as a library. I was previously building eRPC on arch linux and there was no |
Thank you, @dpfrey . Re. the way Clang version is checking, better approach would be runtime check, I think. I have updated the script by this runtime version checking ... may I ask you to try on your side, please? Thank you. |
Run "clang-format --version" and parse the results to check that clang-format is at least as new as a minimum required version. Thanks to Michal Princ <michal.princ@nxp.com> for the idea and initial implementation.
Hi @MichalPrincNXP, I took the code from your zip file and modified it to allow any clang-format newer than 10.0.0. I pushed a new commit on top of this PR that adds the version checking. |
David, I would rather stick with 10.0.0 version. I have read that each version produces a littler different output and that is why one specified version would be preferred. |
Hi @dpfrey it is really important to stick with one concrete version of clang-format application. Even minor version may provide different output. If users will change code with different clang-format application, they may change formatted code back and forth. This may result in redundant code format changes pushed to the repository. |
Other changes looks great. Btw i would like to add this link to several places to let user know where to download binary https://releases.llvm.org/download.html (like documentation, formatting script,...). What do you think @dpfrey, @MichalPrincNXP ? |
The previous version required clang-format >= 10.0.0, but this could cause problems if a version > 10.0.0 formatted differently.
Thanks for the feedback @Hadatko And @MichalPrincNXP. I agree that it would be a problem if a clang-format newer than 10.0 produced output different from 10.0.0. In the latest commit, I require clang-format == 10.0.0 and I also made |
Great, thank you @dpfrey ! |
No description provided.