mirror of
https://github.com/fleschutz/PowerShell.git
synced 2024-11-26 18:03:35 +01:00
Update FAQ.md
This commit is contained in:
parent
a7206cb353
commit
c0d474a674
@ -68,7 +68,7 @@ PowerShell scripts should follow the 11 golden rules:
|
|||||||
4. the first line reads `#!/usr/bin/pwsh` (for Linux support)
|
4. the first line reads `#!/usr/bin/pwsh` (for Linux support)
|
||||||
5. provide a comment-based help with syntax, description, link, author, and license
|
5. provide a comment-based help with syntax, description, link, author, and license
|
||||||
6. check the requirements (e.g. #Requires -RunAsAdministrator, or #Requires -Version 3)
|
6. check the requirements (e.g. #Requires -RunAsAdministrator, or #Requires -Version 3)
|
||||||
7. prefer command-line options, else ask the user
|
7. prefer command-line options, else ask the user for help
|
||||||
8. recommended is `Set-StrictMode -Version Latest` to enable additional error checking
|
8. recommended is `Set-StrictMode -Version Latest` to enable additional error checking
|
||||||
9. for readibility use UpperCamelCase for variables and functions, lowerCamelCase for everything else
|
9. for readibility use UpperCamelCase for variables and functions, lowerCamelCase for everything else
|
||||||
10. on error call write-error with keyword "ERROR:" (to support log parsers) and exit the error code (mostly 1)
|
10. on error call write-error with keyword "ERROR:" (to support log parsers) and exit the error code (mostly 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user