build.ps1/build_helpers.ps1 issues
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tái cấu trúc
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- powershell
- Lĩnh vực
- build-system, tooling
Hướng nghiên cứu
Read build.ps1 and tools/build-helpers.ps1, starting with ParseJasmine and RunSpecs, then review ExtractAtom and the build entry points against the linked lines. Done means the listed help, attribute, invocation, path, and parsing issues are addressed without breaking the build or Jasmine output.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Issue Description
build.ps1
- comment based help attempt to include an argument to the example statement, this causes PowerShell to invalidate the comment based help entirely.
https://github.com/PowerShell/EditorSyntax/blob/cf27d6e54ff9fc593bfb46d22a671898fb31c0a9/build.ps1#L10 [cmdletbinding()]and[parameter()]attributes are unnecessary.
https://github.com/PowerShell/EditorSyntax/blob/cf27d6e54ff9fc593bfb46d22a671898fb31c0a9/build.ps1#L28-L33- use of
&(call operator) to execute commands with an unquoted (and non-expanded) name are unnecessary. (3 occurrences total)
https://github.com/PowerShell/EditorSyntax/blob/cf27d6e54ff9fc593bfb46d22a671898fb31c0a9/build.ps1#L41
tools\build_helpers.ps1
function ExtractAtom
- doesn't support UNC paths due to
$PSScriptRootandResolve-Pathwill format with thefilesystem::provider, which notation is not acceptable to[System.IO.Compression.ZipFile]::ExtractToDirectory()method. This is informational only, due to the fact that UNC paths do not work for NPM anyway.
function ParseJasmine
- first line starts with using
$stringparameter, the rest use$_. Surprisingly it works, but only because inRunSpecsthe call toParseJasmineis part of aForEach-Objectwhich populates the$_automatic variable. - the
^\s+Expectedreplacement doesn't seem to be working correctly. Maybe Atom/Atom-Grammar-Test has changed? I think 'to equal' now is to be 'instead found'. - this function should really be a filter as it might provide a better fit. Note, also demonstrating the 'switch' statement with -regex parameter:
This requires changingfilter ParseJasmine { switch -regex ($_) { ^\s+at { '' break } ^\s+it { $_ -replace '^(\s+)(it)', '$1[-] It' break } ^\s+Expected { $_ -replace '^(\s*)(Expected.*?)\s(instead found .*)', "`$1`$2`n`$1`$3" break } default { $_ } } }RunSpecs:
https://github.com/PowerShell/EditorSyntax/blob/cf27d6e54ff9fc593bfb46d22a671898fb31c0a9/tools/build-helpers.ps1#L73
to read more like:& $script:ATOM_EXE_PATH --test $specpath *>&1 | ParseJasmine
function RunSpecs
- quotes around the variable
$script:ATOM_EXE_PATHare unneeded, probably old habit from CMD or another shell? (seen below) - test path 'specs' is literal on ATOM command, but yet in a variable
$specpathin a test previously. Only issue with using the variable is a chance to get the PowerShellfilesystem::provider notation injected.
https://github.com/PowerShell/EditorSyntax/blob/cf27d6e54ff9fc593bfb46d22a671898fb31c0a9/tools/build-helpers.ps1#L72-L73
I'll post a PR shortly demonstrating these changes.
- Ngôn ngữ chính
- PowerShell
- Star
- 151
- Fork
- 55
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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.
Issue khác của PowerShell/EditorSyntax
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
PowerShell/EditorSyntax#224 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
PowerShell/EditorSyntax#222 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
PowerShell/EditorSyntax#221 · 2 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
PowerShell/EditorSyntax#220 · 2 bình luận · 1 reaction ·
-
Issue-Bug
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
PowerShell/EditorSyntax#219 · 2 bình luận ·
Tất cả issue của PowerShell/EditorSyntax
Issue tương tự
-
Update to NCCL 2.32 Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
conda-forge/nccl-feedstock#166 ·
-
next-devel: s390x build fails — chccwdev/vmur/zkey missing from initramfs after s390utils 2.44 split Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
coreos/fedora-coreos-tracker#2228 ·
-
Python versions Đang mởenhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
MunchLab/ceREEBerus#121 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
integration-meraki type: bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
nautobot/nautobot-app-chatops#463 ·