Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Extend functions that implement classes for ParameterInfo and Command with additional parameter options

Aperta
#208 0 commenti 2 reazioni 0 assegnatari Vedi su GitHub

@steviecoaster ci sta già lavorando.

Dal 11/4/2024.

  • #209 di @steviecoaster — aperta

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
powershell
Ambito
cli

Direzione di ricerca

Start with Microsoft.PowerShell.Crescendo/src/Microsoft.PowerShell.Crescendo.psm1 and the ParameterInfo source around line 53. Inspect the New-* functions for ParameterInfo and Command, then confirm which class members should be accepted as parameters; the work is done when module authors can provide those options directly through the constructors.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Issue-Enhancement
Summary of the new feature / enhancement

Based on the[ParameterInfo] source as an example, it would make sense to provide some additional parameters (or all of them) so a Crescendo module author can more completely construct things without additional code.

For example, dealing with parameters that require NoGap be set to $true currently requires something like this to be done:

$parameterInfo = New-ParameterInfo -Name MyParameter -OriginalName '--original-parameter-name'
$parameterInfo.NoGap = $true
Proposed technical implementation details (optional)

I propose that class members be added as parameters to available New-* functions so Crescendo module authors have less and cleaner code to write.

E.g. I'd like to see this work:

$piSplat = @{
Name = 'FancyParameter'
OriginalName = '--fancy-param'
Description = 'This describes the parameter'
DefaultValue = 'SomeDefault
NoGap = $true

New-ParameterInfo @piSplat

I"m happy to help here, if you want to tell me "PRs greatly appreciated!" 😂

Lingua principale
PowerShell
Stelle
437
Fork
49
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PowerShell/Crescendo

Tutte le issue di PowerShell/Crescendo

Issue simili

Altre issue su CLI

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.