|
| 1 | +# Contributing to Export-ModuleInfoForLLM |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Export-ModuleInfoForLLM! This document provides guidelines and instructions for contributing. |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +By participating in this project, you agree to maintain a respectful and inclusive environment. |
| 8 | + |
| 9 | +## Getting Started |
| 10 | + |
| 11 | +### Prerequisites |
| 12 | + |
| 13 | +- PowerShell 5.1 or PowerShell Core 7.x |
| 14 | +- Git |
| 15 | +- Pester 5.x for running tests |
| 16 | +- PSScriptAnalyzer for code analysis |
| 17 | + |
| 18 | +### Development Setup |
| 19 | + |
| 20 | +1. Fork the repository |
| 21 | +2. Clone your fork: |
| 22 | + ```powershell |
| 23 | + git clone https://github.com/Warezloder/Export-ModuleInfoForLLM.git |
| 24 | + cd Export-ModuleInfoForLLM |
| 25 | + ``` |
| 26 | + |
| 27 | +3. Install development dependencies: |
| 28 | + ```powershell |
| 29 | + Install-Module -Name Pester -MinimumVersion 5.0 -Scope CurrentUser |
| 30 | + Install-Module -Name PSScriptAnalyzer -Scope CurrentUser |
| 31 | + ``` |
| 32 | + |
| 33 | +4. Import the module for development: |
| 34 | + ```powershell |
| 35 | + Import-Module .\Export-ModuleInfoForLLM.psd1 -Force |
| 36 | + ``` |
| 37 | + |
| 38 | +## Development Guidelines |
| 39 | + |
| 40 | +### Code Standards |
| 41 | + |
| 42 | +- Follow the [PowerShell Practice and Style Guide](https://poshcode.gitbook.io/powershell-practice-and-style/) |
| 43 | +- Use approved verbs (`Get-Verb`) |
| 44 | +- Include comment-based help for all public functions |
| 45 | +- Add parameter validation |
| 46 | +- Implement proper error handling |
| 47 | + |
| 48 | +### Testing |
| 49 | + |
| 50 | +All contributions must include appropriate tests: |
| 51 | + |
| 52 | +```powershell |
| 53 | +# Run all tests |
| 54 | +Invoke-Pester -Path .\Tests |
| 55 | +
|
| 56 | +# Run with code coverage |
| 57 | +Invoke-Pester -Path .\Tests -CodeCoverage .\Public\*.ps1, .\Private\*.ps1 |
| 58 | +
|
| 59 | +# Run specific test file |
| 60 | +Invoke-Pester -Path .\Tests\Unit\Export-ModuleCommandsForLLM.Tests.ps1 |
| 61 | +``` |
| 62 | + |
| 63 | +### Code Analysis |
| 64 | + |
| 65 | +Run PSScriptAnalyzer before submitting: |
| 66 | + |
| 67 | +```powershell |
| 68 | +Invoke-ScriptAnalyzer -Path . -Recurse -Settings PSGallery |
| 69 | +``` |
| 70 | + |
| 71 | +## Submission Process |
| 72 | + |
| 73 | +### Pull Request Process |
| 74 | + |
| 75 | +1. Create a feature branch: |
| 76 | + ```powershell |
| 77 | + git checkout -b feature/your-feature-name |
| 78 | + ``` |
| 79 | + |
| 80 | +2. Make your changes following the code standards |
| 81 | + |
| 82 | +3. Add/update tests for your changes |
| 83 | + |
| 84 | +4. Update documentation if needed |
| 85 | + |
| 86 | +5. Run tests and ensure they pass: |
| 87 | + ```powershell |
| 88 | + .\build.ps1 -Task Test |
| 89 | + ``` |
| 90 | + |
| 91 | +6. Commit your changes: |
| 92 | + ```powershell |
| 93 | + git commit -m "Add: Description of your changes" |
| 94 | + ``` |
| 95 | + |
| 96 | +7. Push to your fork: |
| 97 | + ```powershell |
| 98 | + git push origin feature/your-feature-name |
| 99 | + ``` |
| 100 | + |
| 101 | +8. Create a Pull Request with: |
| 102 | + - Clear description of changes |
| 103 | + - Reference to any related issues |
| 104 | + - Test results summary |
| 105 | + |
| 106 | +### Commit Message Format |
| 107 | + |
| 108 | +Use conventional commits format: |
| 109 | +- `Add:` New feature |
| 110 | +- `Fix:` Bug fix |
| 111 | +- `Update:` Non-breaking change |
| 112 | +- `Breaking:` Breaking change |
| 113 | +- `Docs:` Documentation only |
| 114 | +- `Test:` Test additions/changes |
| 115 | + |
| 116 | +## Project Structure |
| 117 | + |
0 commit comments