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
🚀[Feature]: Use local PSScriptAnalyzer files (#228)
The workflow now uses
[Invoke-ScriptAnalyzer@v4](https://github.com/PSModule/Invoke-ScriptAnalyzer),
enabling automatic discovery of local PSScriptAnalyzer configuration
files. This allows projects to maintain custom linting rules in their
repository without requiring centralized settings management. The
upgrade also streamlines workflow configuration by removing deprecated
parameters and improving checkout efficiency.
## Updated to PSScriptAnalyzer v4
Upgraded the `PSModule/Invoke-ScriptAnalyzer` action from v3 to v4 in
linting workflows (`Lint-SourceCode.yml` and `Test-Module.yml`). This
version automatically discovers and uses local
`.powershell-psscriptanalyzer.psd1` configuration files from the
`.github/linters/` directory, providing better support for
repository-specific linting rules.
## Removed Deprecated Settings Parameter
The `Settings` parameter has been removed from both `Lint-SourceCode`
and `Lint-Module` workflow steps. PSScriptAnalyzer now automatically
discovers local configuration files, eliminating the need to explicitly
specify settings profiles.
## Workflow Configuration Improvements
- Added a `Checkout repository` step to the `Lint-Module` job to ensure
the codebase (including local configuration files) is available before
linting
- Removed `fetch-depth: 0` from checkout steps to use shallow clones,
reducing workflow execution time
- Removed unused `Name` parameter from test workflow
## Custom Linting Configuration Support
Added a `.powershell-psscriptanalyzer.psd1` configuration file in the
test repository (`tests/srcWithManifestTestRepo/.github/linters/`)
demonstrating how projects can define custom code style rules, including
formatting preferences, line length limits, and rule exclusions.
0 commit comments