PowerShell / PowerShell/PowerShellEditorServices

Provide diagnostic marker API in $psEditor

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

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

Issue-Enhancement
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ả

It would be useful if there was an API to add diagnostic markers to script files so that any editor command could add "squigglies" to arbitrary regions of an open file. Markers would be added in relation to a named "layer" which would allow Editor Services to keep track of a unique set of markers for each module or use case.

The API might look something like this:

$file = $context.CurrentFile
# OR: $file = $psEditor.Workspace.GetFile("filePath.ext")
$file.SetMarkers("MarkerLayerName", markerArray)

We should also provide an API for clearing markers, either for a specific layer or for all layers:

$file.ClearMarkers("MarkerLayerName")
$file.ClearMarkers()

Once this API exists, I'll use it to implement the new integration model for PSScriptAnalyzer in issue #213.

FEEDBACK NEEDED: Is SetMarkers good enough or should it be SetFileMarkers, SetDiagnosticMarkers or something else?

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 xem xét API tệp $psEditor hiện có và issue #213 để hiểu các marker chẩn đoán sẽ được sử dụng như thế nào. Giải quyết thiết kế lớp marker và quy ước đặt tên, sau đó xác định hành vi của SetMarkers và ClearMarkers đối với các vùng tệp tùy ý và từng lớp.

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
api, developer-experience
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
30/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.