Skip to content

v4.0.1

Choose a tag to compare

@github-actions github-actions released this 11 Oct 19:05
· 3 commits to main since this release
24cac04

🩹 [Patch]: Default to built-in Invoke-ScriptAnalyzer settings (#19)

This pull request introduces improved handling of the settings file for the ScriptAnalyzer GitHub Action, adds a new test scenario for default settings, and updates CI workflows and documentation to reflect these changes. The main goals are to make the settings file optional, clarify precedence, and ensure robust testing and reporting.

Key changes:

Settings file handling and usage:

  • The action now treats the settings file as optional; if not provided or not found, it falls back to ScriptAnalyzer defaults. Settings file precedence is clarified and documented, and code is updated to handle missing files gracefully without throwing errors. (scripts/main.ps1 [1] scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1 [2] [3] [4] README.md [5]

Continuous Integration workflow improvements:

  • All actions/checkout steps in workflow files now set persist-credentials: false for improved security and consistency. (.github/workflows/Action-Test.yml [1] [2] [3] [4] [5] .github/workflows/Auto-Release.yml [6] .github/workflows/Linter.yml [7]

  • A new test job, ActionTestSrcWithManifestDefault, is added to verify the action's behavior when no settings file is present (i.e., default settings are used). The workflow aggregation and environment variable naming are updated for clarity and maintainability. (.github/workflows/Action-Test.yml [1] [2] tests/Get-AggregatedStatus.ps1 [3]

Documentation and configuration updates:

  • The README is updated to clearly explain settings file precedence and provide usage examples for all scenarios (custom, default, and none). (README.md README.mdL91-R125)

  • Linter workflow configuration is updated to include new validation options and disables certain Biome and zizmor validations for clarity. (.github/workflows/Linter.yml .github/workflows/Linter.ymlR34-R36)