microsoft / microsoft/vscode-cpptools

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

オープン
#2,124 コメント 3 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug Language Service network drive
主要言語
TypeScript
スター
6.2k
フォーク
1.7k
平均マージ
14時間 46分
マージ済み PR(30日)
61

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

UNC 形式の Windows ネットワーク共有上で .clang-format ファイルを使用してフォーマットの失敗を再現し、その後、ドライブレター共有およびローカルドライブの場合と比較します。C/C++ 拡張機能の formatter と fallbackStyle の処理を追跡します。完了条件は、fallbackStyle を "none" に設定しなくても、UNC パス上でツリーの .clang-format ファイルが使用されることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cpp, typescript
領域
operating-systems, tooling
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。