PowerShell / PowerShell/vscode-powershell

Feature Request: Bring Invoke-PSScriptAnalyzer to PowerShell Command Palate

オープン
#4,444 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Area-Script Analysis Issue-Enhancement Up for Grabs
主要言語
TypeScript
スター
1.9k
フォーク
548
PR マージ指標
30日以内にマージされた PR はありません

説明

Prerequisites
  • I have written a descriptive issue title.
  • I have searched all issues to ensure it has not already been reported.
Summary

For day to day/line by line development the default PSScriptAnalyzer rules in VS Code work well and ensure that it doesn't slow down my development too much. There are however times when I would like to do a more thorough review of the code, for example before publishing remotely or presenting the code to others.

In this scenario, I would like to be able to easily run the full range of tests that PSScriptAnalyzer has without resorting to:

  • Modifying the everyday ruleset
  • Calling the command line directly

For me (and I suspect others) this would enhance discoverability of this great tool, speed up ad-hoc usage and therefore encourage a much greater usage of the non-realtime rulesets

Proposed Design

When I first attempted to do this I instinctively looked for an option in the PowerShell command list, in the same place as 'Run' and 'Run Pester Tests'
image

To cater for multiple rulesets my thought process would be to offer the following command structure:

  • PowerShell: Run PSScriptAnalyzer
    • Default RuleSet (Same as Invoke-PSScriptAnalyser Default RuleSet)
    • All Rules (All code and formatting rules)
    • Realtime Rules (The ruleset currently configured for real-time analysis)
    • Custom (Specify a PSScriptAnalyzer ruleset file)
      • Select Location

Brackets/Names are for explanation purposes rather than anticipated naming

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、Run と Run Pester Tests の既存の VS Code コマンド実装を見つけ、次にコマンドがアクティブなスクリプトと構成済みの PSScriptAnalyzer ルールにどのようにアクセスするかを追跡します。コマンド パレットに default、all、realtime、カスタム ルールセットのオプションが表示され、カスタム ルールセットの場所も選択できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
powershell, vscode
領域
developer-experience, tooling
issue の種類
機能追加
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。