You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+19-9Lines changed: 19 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,15 +4,25 @@ Thank you for your interest in contributing! Your help is greatly appreciated.
4
4
This document outlines the process for contributing to the project.
5
5
6
6
## Coding Guidelines
7
-
- MVVM architecture
8
-
- SOLID principles
9
-
- Clean Code practices
10
-
- Unit testing with msTest
11
-
- Dependency Injection
12
-
- Asynchronous programming with async/await
13
-
- Error handling and logging
14
-
- Consistent naming conventions
15
-
- XML documentation for public members
7
+
8
+
This project uses PowerShell for scripting. Follow these PowerShell-specific guidelines:
9
+
10
+
- Follow PowerShell best practices and the PowerShell Style Guidelines.
11
+
- Use approved verbs for functions (see `Get-Verb`) and choose clear, descriptive function names.
12
+
- Prefer advanced functions with `CmdletBinding()` so common parameters and `-Verbose`/`-Debug` are available.
13
+
- Use strong typing and parameter validation attributes (`[Parameter()]`, `ValidateSet`, `ValidateNotNullOrEmpty`, etc.).
14
+
- Support pipeline input for functions where appropriate and implement `Begin/Process/End` blocks when processing pipeline input.
15
+
- Provide comment-based help for all public functions and scripts (examples, parameters, outputs).
16
+
- Avoid aliases and use full cmdlet names in committed code (aliases are fine interactively).
17
+
- Use `ShouldProcess`/`-WhatIf` for destructive operations and honor `-Confirm` when appropriate.
18
+
- Use `Try/Catch` for error handling and throw or `Write-Error` as appropriate; prefer terminating errors when callers must act on failures.
19
+
- Use `Write-Verbose`, `Write-Debug`, `Write-Warning`, and `Write-Error` for structured output and logging; do not write unstructured progress to stdout.
20
+
- Keep formatting consistent (4-space indentation is recommended), avoid global variables, and keep functions focused and small.
21
+
- Use `PSScriptAnalyzer` to lint scripts and address reported issues. Include a baseline or configuration if needed.
22
+
- Organize modules with a `.psm1` and `.psd1` manifest; explicitly export public functions with `Export-ModuleMember`.
23
+
- Write unit tests with `Pester` and place tests under a `tests/` folder. Run tests locally and in CI.
24
+
- Avoid hard-coded credentials/secrets; use secure methods (secure strings, environment variables, or secret stores).
25
+
- Use semantic versioning for modules and include a changelog for releases.
0 commit comments