C++ formatting suggestions on PRs#3829
Conversation
|
I'm not sure I see from your local testing how this is different from what it does now? It was already providing an annotation that indicated which lines were breaking the test, but not how it was failing or how to correct it. In your testing on your fork, I don't see different - or am I looking in the wrong place? |
I spoke too soon... I see it now as code comments |
|
Related - while I'm sure it's a class A hassle to do it - is there a plan or protocol for updating clang-format versions? V15 is now 3 years old and increasingly difficult to get on new development environments. |
Description
The C++ linter check has been a hassle for a number of contributors due to differing behavior for various versions of clang-format that sometimes aren't covered by our style file.
This PR adds the option for inline suggestions from the
cpp-linteractions in a PR when thecpp-format-suggestlabel is applied to the PR.When the C++ formatting check fails and the label isn't present, a comment is added by the workflow with instructions on how to get inline suggestions for format fixes. By adding the
-labelevent trigger to the workflow, all one has to do to get these suggestions is add the label.I can't really demonstrate this here until it's merged but here's a PR in my fork where I've been playing around with the updated workflow: pshriwise#33
Fixes #2746
Checklist
I have performed a self-review of my own codeI have run clang-format (version 15) on any C++ source files (if applicable)I have followed the style guidelines for Python source files (if applicable)I have made corresponding changes to the documentation (if applicable)I have added tests that prove my fix is effective or that my feature works (if applicable)