PowerShell / PowerShell/vscode-powershell

Go to Definition of function parameter jumps into first function having that parameter

Đang mở
#348 3 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-Symbols & References Issue-Bug
Ngôn ngữ chính
TypeScript
Star
1.9k
Fork
548
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

System Details
  • Operating system name and version: Win10 Anniversary Update
  • VS Code version: 1.7.2
  • PowerShell extension version: 0.7.2
  • Output from $PSVersionTable:
    Name Value

PSVersion 5.1.14393.206
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.206
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

Evaluate $PSVersionTable in PowerShell and paste the output here
Issue Description

I am experiencing a problem with "Go to Definition" feature. When file has multiple function having parameter with same name, "Go to Definition" jumps to first function declaration, regardless from which function parameter we examined. Testfile:

function f1($a) {
    $a + 1;
}

function f2 {
    param($a)
    $a + 2;
}

function f3 {
    param($a)
    $a + 3;
}

Action: Right click on $a inside f3 and select "Go to Definition"
Expected result: editor caret is planced before param $a in function f3 declaration
Actual result: editor caret is planced before param $a in function f1 declaration

The result does not depend on how params are defined (param keyword vs inline declaration)

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

Tái hiện báo cáo trong tệp kiểm thử PowerShell được cung cấp bằng cách gọi Go to Definition trên $a bên trong f3, sau đó lần theo điểm vào của definition-provider của tiện ích mở rộng PowerShell. Hoàn tất khi lệnh chọn tham số của f3 thay vì khai báo khớp đầu tiên, cho cả dạng inline và param-block.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
powershell, typescript
Lĩnh vực
devtools
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
Đặc tả rõ ràng
Mức phù hợp với người mới
38/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.