PowerShell / PowerShell/PSScriptAnalyzer
Every time we analyze a '.ps1' file with custom rules, we need to import module once again.
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ả
Hi! We are using PSSA to analyze syntax errors in '.ps1' files with custom rules. It seems that a new PowerShell session is created when we invoke-ScriptAnalyzer with custom rules, then all the modules imported before are lost. So, every time we analyze a '.ps1' file with custom rules, we need to import the needed module once again. However, it is time costly for us to import modules again and again. Since we work in the continuous integration environment, we need to import the modules built by CI but not the modules installed locally. 'Import-module' ahead of the '.psm1' file of custom rules seems indispensable. Can you give some suggestions to solve the problem of import modules too many times when analyzing dozens of '.ps1' files? Thanks a lot!
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 tại điểm vào Invoke-ScriptAnalyzer và theo dõi cách các tệp .psm1 của quy tắc tùy chỉnh và các phiên PowerShell được xử lý. Tái hiện việc phân tích một số tệp .ps1 bằng các mô-đun được CI xây dựng, sau đó xác định xem có thể tái sử dụng phiên mà không tải các mô-đun được cài đặt cục bộ hay không. Hoàn thành có nghĩa là các quy tắc tùy chỉnh có thể sử dụng các mô-đun đã nhập theo dự định mà không phải nhập chúng cho từng tệ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
- tooling
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 25/100