PowerShell / PowerShell/PSScriptAnalyzer

Add support for space handling after opening and before closing non-empty parenthesis/brackets/braces.

Đang mở
#1,583 1 bình luận 2 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Area - Configuration Area - Formatter Issue - Enhancement Up-for-Grabs
Ngôn ngữ chính
C#
Star
2.2k
Fork
414
Merge trung bình
13 giờ 1 phút
Pull request đã merge (30 ngày)
2

Mô tả

Summary of the new feature

Add functionality to allow the user to control adding spaces after opening and before closing non-empty parenthesis/brackets/braces.

For example:

(a + b) = c ==> ( a + b ) = c

if ($MyVar -eq $true){ } ==> if ( $MyVar -eq $true )

[OutputType([string])] ==> [ OutputType( [ string ] ) ]

Proposed technical implementation details (optional)

The TypeScript extension has the following options:

// Defines space handling after opening and before closing non empty parenthesis.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis": false,

// Defines space handling after opening and before closing non empty brackets.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets": false,

// Defines space handling after opening and before closing non empty braces.
"typescript.format.insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces": true,

// Defines space handling after opening and before closing template string braces.
  "typescript.format.insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces": false,

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Issue không nêu tên tệp hoặc bài kiểm thử nào. Hãy bắt đầu bằng cách lần theo các tùy chọn định dạng hiện có của PSScriptAnalyzer và so sánh chúng với các thiết lập TypeScript được liệt kê. Công việc được xem là hoàn tất khi người dùng có thể độc lập kiểm soát khoảng trắng sau dấu ngoặc mở và trước dấu ngoặc đóng của ngoặc tròn, ngoặc vuông, ngoặc nhọn và ngoặc nhọn trong chuỗi template không rỗng, đồng thời các ví dụ được nêu đều được bao phủ.

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
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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.