Skip to content

Latest commit

 

History

History
42 lines (32 loc) · 673 Bytes

LinterRules.Pwsh.todo.md

File metadata and controls

42 lines (32 loc) · 673 Bytes

2023-04-02

0x1 Rule: Never alias command with the same name

Working Case

# is okay
function ShouldHide {  '🐈' }
ShouldHide

function ShouldHide { 
   [CmdletBinding()]
   param()
   '🐈'
}

# is okay
ShouldHide

Failed case

function ShouldHide { 
   [Alias('ShouldHide')]
   [CmdletBinding()]
   param()
   '🐈'
}

ShouldHide

### failed reference

ShouldHide: 
Line |
   8 |  ShouldHide
     |  ~~~~~~~~~~
     | The term 'ShouldHide' is not recognized as a name of a cmdlet, function, script file, or executable program. 
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.