PowerShell / PowerShell/PSScriptAnalyzer

Add setting to better toggle block comments

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

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

Area - Formatter Issue - New Rule 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ả

Force block comment start (<#) and end (#>) to be on their own line and indent contents

When toggling a block comment the contents are not indented and if white space was not selected the start and end tags will not be on their own lines.
I propose a setting (or two) that would force a newline for the start and end tags and possibly indent the contents. This way when someone goes to toggle block comment it would already be pretty inline with outlined in https://github.com/PoshCode/PowerShellPracticeAndStyle.

Perhaps a dropdown with block comment style similar to the pipeline indentation style option.

I would like that when you toggle block comment that it matches the definition in https://github.com/PoshCode/PowerShellPracticeAndStyle/blob/master/Style-Guide/Documentation-and-Comments.md
This is to say the start and end tags on their own lines and the content indented once.

Appreciate any consideration to add this!

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

Bắt đầu bằng cách xác định phần triển khai chuyển đổi chú thích khối và tùy chọn kiểu thụt lề pipeline hiện có trong PSScriptAnalyzer. So sánh hành vi hiện tại với hướng dẫn được liên kết của PowerShellPracticeAndStyle. Được xem là hoàn tất khi tùy chọn hoặc các tùy chọn được chọn đặt <# và #> trên các dòng riêng và thụt lề nội dung khối khi chuyển đổi chú thích.

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ó
5/5
Thời gian dự kiến
Hơn một tuần
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.