requires -modules hashtable must only occur in a single line, -psedition missing
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 45/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- powershell
- Domaine
- tooling
Piste de recherche
Start with TheBigTestFile.ps1 and locate the syntax rules or tests that handle #requires statements. Compare the multiline and single-line -Modules examples, then inspect how -psedition and abbreviated parameter names are recognized. Done means the valid single-line hashtable form and the reported parameter behavior are handled consistently.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
The hashtable option on a #requires statement must all be on one line (as all #requires statements must be), due to the fundamentals of the single line comment that it rides on, and backticks cannot be used to extend the line, nor can the quoted strings. A special syntax could be applied, but both unquoted and quoted property names are permitted, so it might not be foolproof to only syntax the known property names.
Reference TheBigTestFile.ps1:
#Requires -Modules PSWorkflow @{
ModuleName="PSScheduledJob"
ModuleVersion="1.0.0.0"
}
This is the correct syntax:
#Requires -Modules PSWorkflow, @{ModuleName="PSScheduledJob"; ModuleVersion="1.0.0.0"}
Also, the -psedition parameter is not scoped. At this time it has only known arguments, 'core' and 'desktop'.
And it also appears that these parameter names work differently and allow for shortcutting, using no more characters than required to uniquely distinguish the parameter name.
- Langage dominant
- PowerShell
- Étoiles
- 151
- Forks
- 55
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de PowerShell/EditorSyntax
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
PowerShell/EditorSyntax#224 · 2 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
PowerShell/EditorSyntax#222 · 2 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 55/100
PowerShell/EditorSyntax#221 · 2 commentaires ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100
PowerShell/EditorSyntax#220 · 2 commentaires · 1 réaction ·
-
Issue-Bug
Difficulté 3/5 1-2 jours Accessibilité débutants 48/100
PowerShell/EditorSyntax#219 · 2 commentaires ·
Toutes les issues de PowerShell/EditorSyntax
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
0xMiden/bridge-portal#132 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
newrelic-experimental/preflight#793 · 1 commentaire ·
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 70/100
babalae/bettergi-scripts-list#3674 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
caddyserver/caddy#8046 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
zilliztech/memsearch#759 ·