PowerShell / PowerShell/PSScriptAnalyzer

Enable enforcing consistent casing

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

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

Area - Formatter Issue - Enhancement Up-for-Grabs
主要言語
C#
スター
2.2k
フォーク
414
平均マージ
13時間 1分
マージ済み PR(30日)
2

説明

Summary of the new feature

PowerShell code used in official examples and VS Code code generation seems to follow some basic casing conventions:

  • PascalCase for
    • cmdlets
    • parameters
    • constants
  • lowercase for
    • operators
    • statements (if, foreach, etc)
  • camelCase for
    • local variables
  • casing of module names and .NET types, enum values, etc consistent with their original case-sensitive casing

I would like to optionally enforce these casing conventions with PSScriptAnalyzer.

Proposed technical implementation details (optional)

I would like to enable rules in my PSScriptAnalyzerSettings.psd1 that enforce the casing rules above and autofix casing issues.

What is the latest version of PSScriptAnalyzer at the point of writing
1.18.2

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

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

はじめの一歩

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

調査の方向性

まず、issue で提案されている大文字と小文字の使用規約と、PSScriptAnalyzer の設定でルールを有効にする方法を確認します。完了条件には、一覧にある大文字と小文字のカテゴリに対する任意の適用と autofix のサポートを含め、元の大文字と小文字を維持したモジュール名および定義済みの .NET 型に対する動作を定義する必要があります。

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

評価

技術スタック
powershell
領域
tooling
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

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

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