PowerShell / PowerShell/PSScriptAnalyzer
Additional settings file for developement
まだ誰も着手していません。
- 主要言語
- C#
- スター
- 2.2k
- フォーク
- 414
- 平均マージ
- 13時間 1分
- マージ済み PR(30日)
- 2
説明
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
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
同梱されている PSScriptAnalyzerSettings.psd1 と、issue で言及されている VSCode の powershell.scriptAnalysis.settingsPath 設定から始めます。設計時と CI の要件を比較し、そのうえで開発に重点を置いたルールと、追加ファイルをどのように同梱すべきかを決定します。既存の設定ファイルを変更せずに、開発用の個別の設定ファイルを利用できる状態を完了とします。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- powershell, vscode
- 領域
- developer-experience, tooling
- issue の種類
- 機能追加
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100