PowerShell / PowerShell/PowerShellEditorServices
Functions (and other logic) within Regions should be indented
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- C#
- Star
- 767
- Fork
- 266
- Merge trung bình
- 3 ngày 16 giờ
- Pull request đã merge (30 ngày)
- 1
Mô tả
Summary of the new feature / enhancement
Indentation should incoprorate Regions, if they exist. This logic is akin to why the contents of functions is indented.
Note: I have searched and found no support for this, and Found no better place to request this enhancement. I am using Visual Studio Code with the MS PowerShell Plugin. Language specific Editor settings do not support doing this: https://code.visualstudio.com/docs/getstarted/settings#_language-specific-editor-settings
___ is used instead of spaces because the View of the issue removed spaces
Preferred:
================
Expanded:
Region Main
___Function Main {
______ValidateSettings
Collapsed:
Region Main
___Function Main {
___}
___Function Function1 {
___}
___Function Function2 {
___}
Current:
Expanded:
Region Main
Function Main {
_____ValidateSettings
Collapsed:
Region Main
Function Main {
_____ValidateSettings
}
Function Function1 {
}
Function Function2 {
}
Proposed technical implementation details (optional)
The Default Auto-Formatting should indent Functions when they exist within Regions.
Not preferred, as this is user by user: provide language-specific-editor-settings to enable this
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
Bắt đầu bằng cách xác định triển khai tự động định dạng mặc định được dịch vụ ngôn ngữ PowerShell sử dụng và so sánh nó với các ví dụ Region được mở rộng và thu gọn trong issue. Kiểm tra cách nội dung của các hàm hiện được thụt lề, sau đó xác định cách biểu diễn việc lồng Region được yêu cầu và xác thực hành vi thông qua đường dẫn kiểm thử hoặc xác minh hiện có của formatter, nếu có.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- csharp, powershell
- Lĩnh vực
- developer-experience, tooling
- Loại issue
- Tính năng
- Độ 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