-
Notifications
You must be signed in to change notification settings - Fork 58
Naming Convention
Cmdlets with the intention of being used directly on the Command Line (in PowerShell console) must be named with KeePass as the noun's prefix. This prevents ambiguity, and promotes discover-ability.
Example:
Get-KeePassEntry
Cmdlets with the intention of being used to script with must be named with KP as the noun's prefix. This will help prevent discovering these cmdlets from the CLI, and any confusion of the intention of the cmdlet.
Example:
Get-KPEntry
If the parameter or variable is of a type that comes from the KeePass SDK or is a custom PSObject generated by one of the cmdlets in the PSKeePass module it should be spelled with the prefix of KeePass. It should also be clearly named and not ambiguous with no unnecessary abbreviations:
-
Good:
[KeePassLib.PwDatabase] $KeePassConnection
-
Bad:
[KeePassLib.PwDatabase] $KpConnection
[KeePassLib.PwDatabase] $Connection
[KeePassLib.PwDatabase] $KeePassConn
If the parameter or variable is not of one of the aforementioned types then is should be clearly named and not ambiguous with no unnecessary abbreviations.
-
Good:
[String] $SecureTitle
[String] $SecureURL
-
Bad:
[String] $SecTitle
[String] $SecURL