-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add clang-tidy editor.codeActionsOnSave
entry point
#12684
Comments
This feature request is being closed due to insufficient upvotes. Please leave a 👍-upvote or 👎-downvote reaction on the issue to help us prioritize it. When enough upvotes are received, this issue will be eligible for our backlog. |
@sean-mcmanus it seems impossible to get enough upvotes when there is so little activity in the repo and only a 2 month time for something to be upvoted. This is also the defacto standard for how to handle this from VS Code, almost to the point that this should be considered a bug. |
@thernstig, please don't take it personally, we add the "more votes needed" tag to highlight that this feature request can be considered in the future and the bot will reopen it automatically when the votes are received. With over 1000 active issues and a very small team, we have to set some rules for feature requests, not only to help us manage the overall backlog size, but also to set expectations about the chances that something may make it into the product. We do have a modest amount of activity in the repo, but we also set the bar very low for the number of upvotes required. The VS Code team requires 20. We only require 3 and we allow the requestor to vote on their own request. |
@thernstig What exactly do these statements mean: |
@bobbrow oh, thanks @bobbrow 😄. Understandable. I am not as angry as I might sound. I am just a huge DX proponent, and I know how many other languages extensions handles this in VS Code, that feel more modern in key areas around how, as far as my understanding is, should be done. This extensions is great though! I am and want to continue to use it very much, and am merely striving to lift some key areas that I find most language extensions should have (again, from my own experience). Maybe I should send in a resume to see if I can join the team instead of writing issues 😄🤚 @sean-mcmanus see https://github.com/microsoft/vscode-eslint?tab=readme-ov-file#version-204 and https://github.com/astral-sh/ruff-vscode?tab=readme-ov-file#configuring-vs-code for two very large extensions, for the huge languages JavaScript and Python. |
@thernstig I looked at those examples repos, but I still don't see what API they're calling to register a particular fixit values like "source.fixAll.clangTidy". Maybe we can just check the editor.codeActionsOnSave for "source.fixAll" or "source.fixAll.clangTidy", but I don't think it would appear as a completion option in the settings UI. |
@sean-mcmanus https://code.visualstudio.com/api/references/vscode-api#CodeActionKind maybe? It is the https://code.visualstudio.com/api/references/vscode-api and
This all started way back here the discussion around this: microsoft/vscode#47621 |
@thernstig Yeah, thanks, that looks like it's it -- we currently use the QuickFix type. I can change it to a new kind to see if it works. I'm not sure if it'll correctly run the formatter after the fix and before saving though. |
@sean-mcmanus please note this is only for fixing linting issues that are auto-fixable, such as for clang-tidy. It is not supposed to be used for formatters like clang-format. I.e. it is supposed to be used for auto-fixable problems as listed here: https://clang.llvm.org/extra/clang-tidy/checks/list.html |
😄 Unfortunately, we aren't currently hiring, but I think I see you on Linkedin. I'll send you a request to connect. |
@thernstig The formatter generally needs to run on the fixit's or they don't have any alignment. |
Feature Request
The proper way for extensions to add linting fixes (not formatting fixes) is to add entries like this in the VS Code config:
It would be nice if this extension could add a
source.fixAll.clangTidy
that would then automatically fix all fixable problems on save.References
https://stackoverflow.com/a/61051832/1853417
https://code.visualstudio.com/api/references/vscode-api (search for
CodeActionProvider
)https://code.visualstudio.com/updates/v1_83#_code-actions-on-save-and-auto-save
The text was updated successfully, but these errors were encountered: