You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a cool feature idea! On first glance, I'm thinking this would be useful to annotate each incorrectly formatted file in a PR diff - is this what you had in mind?
For a use-case, I'm trying to think through what scenarios would lead a user to this feature being useful - could you elaborate on that a bit more?
Here are my initial thoughts on such scenarios:
clang-format is notoriously hard to configure to ignore specific files (ignores can be set up for all files in a directory) without some wrapper scripting, so (to my knowledge) most projects would take the dive of just formatting their project all at once and/or configuring format-on-save for their editor's project settings, coupled with some per-directory .clang-format settings files if some parts of the project need to remain unformatted or formatted differently. So, annotations in a PR marking which files are unformatted aren't much use when the least error-prone flow is to run clang-format on the entire project (if you don't format on save) to fix a CI failure from my Action.
The annotations are usually more useful in quickly surfacing what the issues are directly in the Files tab, instead of having to drill through to the CI log. I think the assumption of it being clean normally on a repo is true, but this is helpful for PRs.
Since clang-format does emit the position information, I think the config would look something like
See https://github.com/actions/toolkit/blob/main/docs/problem-matchers.md for the basic JSON schema for the matcher and about the registration of the matcher
The text was updated successfully, but these errors were encountered: