microsoft / microsoft/vscode-cpptools
clang-format won't use .clang-format file on UNC-style network share out of box
Đang mở
Chưa có ai nhận issue này.
bug
Language Service
network drive
- Ngôn ngữ chính
- TypeScript
- Star
- 6.2k
- Fork
- 1.7k
- Merge trung bình
- 14 giờ 46 phút
- Pull request đã merge (30 ngày)
- 61
Mô tả
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.
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện lỗi định dạng bằng cách sử dụng tệp .clang-format trên một network share Windows kiểu UNC, sau đó so sánh với một share có ký tự ổ đĩa và một ổ đĩa cục bộ. Theo dõi formatter của extension C/C++ và cách xử lý fallbackStyle; hoàn tất khi tệp .clang-format của cây được sử dụng trên các đường dẫn UNC mà không yêu cầu đặt fallbackStyle thành "none".
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- cpp, typescript
- Lĩnh vực
- operating-systems, tooling
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100