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
+79-48Lines changed: 79 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,83 +30,78 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
30
30
31
31
1.**Fork the repository**
32
32
2.**Create a new branch** from `main`:
33
-
```powershell
33
+
```powershell
34
34
git checkout -b feature/your-feature-name
35
-
```
35
+
```
36
36
3.**Make your changes**:
37
-
- Follow the existing code style
38
-
- Add comments for complex logic
39
-
- Update documentation if needed
37
+
- Follow the existing code style
38
+
- Add comments for complex logic
39
+
- Update documentation if needed
40
40
4.**Test your changes**:
41
-
- Test on a clean Windows machine if possible
42
-
- Ensure backward compatibility
41
+
- Test on a clean Windows machine if possible
42
+
- Ensure backward compatibility
43
43
5.**Commit your changes**:
44
-
```powershell
44
+
```powershell
45
45
git commit -m "Add feature: your feature description"
46
-
```
46
+
```
47
47
6.**Push to your fork**:
48
-
```powershell
48
+
```powershell
49
49
git push origin feature/your-feature-name
50
-
```
50
+
```
51
51
7.**Open a Pull Request** with a clear title and description
52
52
53
53
## Coding Standards
54
54
55
55
### PowerShell Script Guidelines
56
56
57
57
1.**Use meaningful variable names**
58
-
```powershell
58
+
```powershell
59
59
# Good
60
60
$serverHostname = "example.com"
61
-
61
+
62
62
# Bad
63
63
$s = "example.com"
64
-
```
65
-
64
+
```
66
65
2.**Include comment-based help** for all scripts
67
-
```powershell
66
+
```powershell
68
67
<#
69
68
.SYNOPSIS
70
69
Brief description
71
-
70
+
72
71
.DESCRIPTION
73
72
Detailed description
74
-
73
+
75
74
.PARAMETER Name
76
75
Parameter description
77
-
76
+
78
77
.EXAMPLE
79
78
script.ps1 -Name "test"
80
79
#>
81
-
```
82
-
80
+
```
83
81
3.**Use approved verbs** for function names
84
-
- Get-, Set-, New-, Remove-, Add-, etc.
85
-
- Check: `Get-Verb`
86
-
82
+
- Get-, Set-, New-, Remove-, Add-, etc.
83
+
- Check: `Get-Verb`
87
84
4.**Handle errors gracefully**
88
-
```powershell
85
+
```powershell
89
86
try {
90
87
# Your code
91
88
} catch {
92
89
Write-Host "Error: $($_.Exception.Message)" -ForegroundColor Red
93
90
exit 1
94
91
}
95
-
```
96
-
92
+
```
97
93
5.**Support common parameters** when appropriate
98
-
```powershell
94
+
```powershell
99
95
[CmdletBinding()]
100
96
param(
101
97
[Parameter(Mandatory=$true)]
102
98
[string]$Name
103
99
)
104
-
```
105
-
100
+
```
106
101
6.**Provide meaningful output**
107
-
- Use colored output for better UX
108
-
- Support `-AsJson` for programmatic use where appropriate
109
-
- Show progress for long-running operations
102
+
- Use colored output for better UX
103
+
- Support `-AsJson` for programmatic use where appropriate
104
+
- Show progress for long-running operations
110
105
111
106
### Configuration
112
107
@@ -131,9 +126,32 @@ Enhancement suggestions are tracked as GitHub issues. When creating an enhanceme
131
126
132
127
## Testing
133
128
134
-
While we don't have automated tests yet, please:
129
+
Tests are written with [Pester 5](https://pester.dev/) in the `tests/` directory. Run the full suite with:
130
+
131
+
```powershell
132
+
.\Invoke-Tests.ps1
133
+
```
134
+
135
+
This installs Pester 5+ if needed and runs all tests with detailed output. Tests also run automatically via GitHub Actions CI on every push and pull request.
136
+
137
+
When adding new commands, please add corresponding test coverage. Tests should use the Pester 5 `BeforeAll` pattern:
Copyright='(c) 2025 PowerShell Dev Toolkit Contributors. All rights reserved.'
8
+
Description='A comprehensive collection of PowerShell productivity tools for Windows developers. SSH tunneling, project management, AI integration, dev servers, and more.'
0 commit comments