microsoft / microsoft/vscode-cpptools
clang-format won't use .clang-format file on UNC-style network share out of box
Open
Nobody has claimed this yet.
bug
Language Service
network drive
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: LanguageService
- OS and Version: Windows 10 1803
- VS Code Version: 1.23.1
- C/C++ Extension Version: 0.17.4
- The
.clang-formatfile will not be used if the project resides on an UNC-style network share, unless the fallback style is forced to "none". - This does not occur on drive-letter mounted network shares or local drives.
To Reproduce
Steps to reproduce the behavior:
- Prepare a directory with a
.clang-formatfile and some source on a network share like my\\10.0.1.15\zao\code\gggtools. - Open the folder with VS Code.
- Open a C++ source file.
- Hit the formatting shortcut.
- Note that it doesn't use the
.clang-formatfile, instead using the fallback style. - Configure
"C_Cpp.clang_format_fallbackStyle": "none"in settings. - Format again.
- Note how the
.clang-formatfile is used as intended.
Expected behavior
I expect the formatter to always find and use the .clang-format file in the tree regardless of fallback style.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the formatting failure using a .clang-format file on a UNC-style Windows network share, then compare it with a drive-letter share and a local drive. Trace the C/C++ extension's formatter and fallback-style handling; done means the tree's .clang-format file is used on UNC paths without requiring fallbackStyle to be set to "none".
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100