microsoft / microsoft/vscode-cpptools
Default clang-format is bundled version not system version
Nessuno ha ancora preso questa issue.
- Lingua principale
- TypeScript
- Stelle
- 6.2k
- Fork
- 1.7k
- Merge medio
- 14h 46m
- PR unite (30g)
- 61
Descrizione
Type: LanguageService
Describe the bug
- OS and Version: Ubuntu 18.-4
- VS Code Version: 1.50.0
- C/C++ Extension Version: 1.01
- Other extensions you installed (and if the issue persists after disabling them):
- Does this issue involve using SSH remote to run the extension on a remote machine?: NA
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).
When using clang-format to format a document with no path set for the field "C_Cpp.clang_format_path" the bundled version is used instead of the system version.
"The full path of the clang-format executable. If not specified, and clang-format is available in the environment path, that is used. If not found in the environment path, a copy of clang-format bundled with the extension will be used."
The only way I can tell this is clang-format-10 reorders groups by default where clang-format-6(18.04 ubuntu default) preserves the group by default. This is checked by specify the path to clang-format and observing the changes.
~/.vscode/extensions/ms-vscode.cpptools-1.0.1/LLVM/bin/clang-format --version
clang-format version 10.0.0 (https://github.com/llvm/llvm-project d32170dbd5b0d54436537b6b75beaf44324e0c28)
clang-format --version
clang-format version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Parti dall'impostazione C_Cpp.clang_format_path e traccia il modo in cui l'estensione risolve clang-format quando l'impostazione non è configurata, confrontando il LLVM/bin/clang-format incluso con l'eseguibile di sistema. Il lavoro è completo quando viene rispettata la preferenza documentata per il percorso dell'ambiente e il comportamento viene verificato rispetto alle versioni di clang-format riportate.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- cpp
- Ambito
- tooling
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100