Tags: PSModule/Invoke-ScriptAnalyzer
Tags
🪲 [Fix]: When an issue is found, output script path (#10) ## Description This pull request includes a small change to the `PSScriptAnalyzer.Tests.ps1` file. The change modifies the way script paths are handled in test results to improve the readability of issue locations. * [`scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1`](diffhunk://#diff-506030604c5eac4d6d266aa14f0e8cf3a8121425c1f579406e3a003d5b091ac9L109-R110): Changed the script path handling to use `relativeScriptPath` instead of `relativePath` for better readability in issue locations. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Fix output formatting (#8) ## Description This pull request includes a small change to the `scripts/main.ps1` file. The change modifies the output formatting by adding `Out-String` to the pipeline. * [`scripts/main.ps1`](diffhunk://#diff-dc2e5a659836b1b73abb03421c567f5018c2755677c4a0aa764cb26117b68011L23-R23): Added `Out-String` to the pipeline after `Format-List` to ensure the output is properly formatted as a string. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Align `WorkingDirectory` usage in workflows and update pat… ( #7) ## Description This pull request includes changes to ensure consistency in setting the `WorkingDirectory` parameter and improve the handling of paths in the script. ### Changes to workflows * `.github/workflows/Action-Test.yml`: * Consistently set the `WorkingDirectory` parameter for different job configurations to ensure the correct directory is used in each case. ### Documentation update * `README.md`: * Updated the `Path` parameter in the `Invoke PSScriptAnalyzer` job to use `src` instead of `${{ github.workspace }}` aligning with the change of adding a `WorkingDirectory`. ### Script improvement * `scripts/main.ps1`: * Improved the handling of the `Path` parameter by adding a check for an empty string and defaulting to `'.'` if empty, ensuring the script resolves the correct path. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🪲 [Fix]: Version of Invoke-Pester to v3, was custom branch (#6) ## Description This pull request includes a small change to the `action.yml` file. The change reverts the `Invoke-Pester` module to use version `v3` instead of the `fixCOntainerEval` version. * [`action.yml`](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L59-R59): Reverted the `Invoke-Pester` module to use version `v3` instead of `fixCOntainerEval`. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [x] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Add `WorkingDirectory` and align naming of internal envvar… … which are mapped to inputs (#5) ## Description This pull request includes several updates to the workflow configuration files, documentation, and scripts to improve the setup and execution of tests. The most important changes include the addition of a new input parameter `WorkingDirectory`, updates to environment variable names, and corrections to default values and paths. Updates to workflow configuration: * `.github/workflows/Action-Test.yml`: * Added `WorkingDirectory` input parameter and updated `Path` and `SettingsFilePath` values to reflect the new structure. Documentation updates: * `README.md`: * Updated the default value for `Path` and added a description for the new `WorkingDirectory` input parameter. Updates to action inputs: * `action.yml`: * Added `WorkingDirectory` input parameter and updated environment variable names and default values for consistency. Script updates: * `scripts/main.ps1`: * Updated environment variable names to use the new naming convention. * `scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Container.ps1`: Updated environment variable names to use the new naming convention. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Add basic GitHub-Script inputs (#4) ## Description This pull request includes updates to the README.md and action.yml files to add new input options for the GitHub-Script action. Updates to input options: - `README.md`: - Modified the description for the Debug option and added new options for Verbose, Version, and Prerelease. - `action.yml`: - Updated the Debug option description and added new input options Verbose, Version, and Prerelease with their respective descriptions and default values. - Added the new input options Debug, Prerelease, Verbose, and Version to the runs configuration to ensure they are passed correctly to the script. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [x] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🌟 [Major]: Cleanup outputs + Bump and align with `Invoke-Pester@v3` (#3) ## Description This pull request introduces significant changes to the GitHub Actions workflows and some configuration files. The main objective is to consolidate multiple workflow files into a single file and update the configurations accordingly. Here are the most important changes: ### The action itself * `action.yml`: * Updated to use `PSModule/Invoke-Pester@v3` instead of `PSModule/Invoke-Pester@v2` * Removed the `outputs` section🌟. ### Consolidation of Workflows * [`.github/workflows/Action-Test.yml`](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R1-R228): Added a new workflow file that consolidates multiple workflows into one, handling different test types such as `Src-SourceCode`, `Src-Custom`, `Src-WithManifest`, and `outputs`. This file also includes a new job `CatchJob` to aggregate the status of all tests. ### Removal of Redundant Workflow Files: * Removed the following workflow files as they are consolidated into the `Action-Test.yml` * `.github/workflows/Action-Test-Src-Default-Custom.yml` * `.github/workflows/Action-Test-Src-Default.yml` * `.github/workflows/Action-Test-Src-WithManifest.yml` * `.github/workflows/Action-Test-outputs.yml` ### Test and Script Updates * `scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1`: * Refactored the script to improve readability and logging, including changes to how paths are resolved and how test results are logged. * Added a failing test to see that the action actually will detect failures. * Removed the `SuppressMessageAttribute` for the `Set-PSModuleTest` function in `tests/srcWithManifestTestRepo/src/functions/public/SomethingElse/Set-PSModuleTest.ps1`. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [x] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Obey settings for skips (#2) ## Description This pull request includes several changes to improve the GitHub Actions workflows, update the documentation, and enhance the PSScriptAnalyzer settings. ### Documentation Updates * Updated `README.md` to improve clarity, add dependencies, and update the example workflow section. * Added a new `Settings.md` file to document the PSScriptAnalyzer settings file format and key configuration options. ### Custom PSScriptAnalyzer Settings * Added a new workflow configuration file `.github/workflows/Action-Test-Src-Default-Custom.yml` to run tests showing that the `Custom` settings and a `SettingsPath` works as it should. * Added a new custom settings file `tests/srcTestRepo/tests/Custom.Settings.psd1` with specific rules and configurations for PSScriptAnalyzer. * Fixed `scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1` to include new log outputs and rule evaluation logic. This now skips tests as per the settings file that is used. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Obey settings for skips (#2) ## Description This pull request includes several changes to improve the GitHub Actions workflows, update the documentation, and enhance the PSScriptAnalyzer settings. ### Documentation Updates * Updated `README.md` to improve clarity, add dependencies, and update the example workflow section. * Added a new `Settings.md` file to document the PSScriptAnalyzer settings file format and key configuration options. ### Custom PSScriptAnalyzer Settings * Added a new workflow configuration file `.github/workflows/Action-Test-Src-Default-Custom.yml` to run tests showing that the `Custom` settings and a `SettingsPath` works as it should. * Added a new custom settings file `tests/srcTestRepo/tests/Custom.Settings.psd1` with specific rules and configurations for PSScriptAnalyzer. * Fixed `scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1` to include new log outputs and rule evaluation logic. This now skips tests as per the settings file that is used. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas
🩹 [Patch]: Obey settings for skips (#2) ## Description This pull request includes several changes to improve the GitHub Actions workflows, update the documentation, and enhance the PSScriptAnalyzer settings. ### Documentation Updates * Updated `README.md` to improve clarity, add dependencies, and update the example workflow section. * Added a new `Settings.md` file to document the PSScriptAnalyzer settings file format and key configuration options. ### Custom PSScriptAnalyzer Settings * Added a new workflow configuration file `.github/workflows/Action-Test-Src-Default-Custom.yml` to run tests showing that the `Custom` settings and a `SettingsPath` works as it should. * Added a new custom settings file `tests/srcTestRepo/tests/Custom.Settings.psd1` with specific rules and configurations for PSScriptAnalyzer. * Fixed `scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1` to include new log outputs and rule evaluation logic. This now skips tests as per the settings file that is used. ## Type of change <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] 📖 [Docs] - [ ] 🪲 [Fix] - [ ] 🩹 [Patch] - [ ]⚠️ [Security fix] - [ ] 🚀 [Feature] - [ ] 🌟 [Breaking change] ## Checklist <!-- Use the check-boxes [x] on the options that are relevant. --> - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas