Skip to content

clang-format won't use .clang-format file on UNC-style network share out of box #2124

@zao

Description

@zao

Type: LanguageService

  • OS and Version: Windows 10 1803
  • VS Code Version: 1.23.1
  • C/C++ Extension Version: 0.17.4
  • The .clang-format file 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:

  1. Prepare a directory with a .clang-format file and some source on a network share like my \\10.0.1.15\zao\code\gggtools.
  2. Open the folder with VS Code.
  3. Open a C++ source file.
  4. Hit the formatting shortcut.
  5. Note that it doesn't use the .clang-format file, instead using the fallback style.
  6. Configure "C_Cpp.clang_format_fallbackStyle": "none" in settings.
  7. Format again.
  8. Note how the .clang-format file 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions