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

When clang-format fails in CI, it could print the diff #5666

Open
antkmsft opened this issue May 25, 2024 · 0 comments
Open

When clang-format fails in CI, it could print the diff #5666

antkmsft opened this issue May 25, 2024 · 0 comments
Labels
needs-triage This is a new issue that needs to be triaged to the appropriate team.

Comments

@antkmsft
Copy link
Member

antkmsft commented May 25, 2024

I think we can make a simple fix to make it so that if the clang-format fails, it would not only list the files where it failed, but would also print the diff.

I would not propose this, if I thought it would be expensive to fix, but I think we might be able to get away with the git diff command.

An output like this could be helpful when clang-format behaves differently on the developer machine and the CI machine, also there could be differen versions, and different behavior on different platforms. It does not happen very often, but when it happens, it can drive you crazy. When this happen, I myself run the WSL, install clang-format there, clone the repo, and do clang-format there. It takes time. Sometimes, I would be happy to just copy several strings from the build logs, and be done with it.

When we have this, and it works, I think it can be cheaply ported to the Codegen repo, and to the Embedded C repo (I am not creating similar work items in those repositories for now).

@github-actions github-actions bot added the needs-triage This is a new issue that needs to be triaged to the appropriate team. label May 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage This is a new issue that needs to be triaged to the appropriate team.
Projects
None yet
Development

No branches or pull requests

1 participant