PowerShell / PowerShell/PSScriptAnalyzer
Additional settings file for developement
Chưa có ai nhận issue này.
- 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
There is currently one PSScriptAnalyzerSettings.psd1 file shipped with the PSScriptAnalyzer but there are at least two use cases with a different requirement:
-
Design-time
During this phase (often done is VSCode or Visual Studio), any cutting-edge alert for a potential PowerShell pitfall is welcome. -
Continuous Integration
During this phase (e.g. in a CI/CD street), any change is supposed to passed the given tests.
Apparently, there is a (undocumented?) convention that our convention is to ship it opt-in via ConfigurableRule with Enable = false but that convention only satisfies the builder phase.
Proposed technical implementation details (optional)
Ship the PSScriptAnalyzer with an additional settings file that is focused on the development phase.
The "development" settings file might than be used as a default by e.g. VSCode (powershell.scriptAnalysis.settingsPath).
Caveats
- The settings file under VSCode "This setting may not work as expected currently!", see: https://github.com/PowerShell/vscode-powershell/issues/4653
- https://github.com/PowerShell/vscode-powershell/issues/5385? "Users keep getting bitten by the extension's effective defaults differing from Invoke-ScriptAnalyzer's defaults", I believe this isn't a feature but a bug, see: https://github.com/PowerShell/vscode-powershell/issues/5474
What is the latest version of PSScriptAnalyzer at the point of writing
1.25.0
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.
Hướng nghiên cứu
Bắt đầu với PSScriptAnalyzerSettings.psd1 được cung cấp cùng sản phẩm và thiết lập VSCode powershell.scriptAnalysis.settingsPath được đề cập trong issue. So sánh các yêu cầu về thời điểm thiết kế và CI, sau đó xác định các quy tắc tập trung vào phát triển cũng như cách tệp bổ sung cần được phân phối. Hoàn tất có nghĩa là có sẵn một tệp thiết lập phát triển riêng mà không thay đổi tệp thiết lập hiện có.
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, vscode
- Lĩnh vực
- developer-experience, 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
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100