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
🩹 [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]](diffhunk://#diff-dc2e5a659836b1b73abb03421c567f5018c2755677c4a0aa764cb26117b68011L5-L15)
`scripts/tests/PSScriptAnalyzer/PSScriptAnalyzer.Tests.ps1`
[[2]](diffhunk://#diff-506030604c5eac4d6d266aa14f0e8cf3a8121425c1f579406e3a003d5b091ac9L14-R32)
[[3]](diffhunk://#diff-506030604c5eac4d6d266aa14f0e8cf3a8121425c1f579406e3a003d5b091ac9R76-R87)
[[4]](diffhunk://#diff-506030604c5eac4d6d266aa14f0e8cf3a8121425c1f579406e3a003d5b091ac9L91-R122)
`README.md`
[[5]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L91-R125)
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]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R29-R30)
[[2]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R54-R55)
[[3]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R80-R81)
[[4]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R133-R134)
[[5]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R155-R179)
`.github/workflows/Auto-Release.yml`
[[6]](diffhunk://#diff-d3f6900ee5159d4bc4ba6d893e2dd8443c2691b0490d7351cffbd7a37ed8d95aR30-R31)
`.github/workflows/Linter.yml`
[[7]](diffhunk://#diff-482e65806ed9e4a7320f14964764086b91fed4a28d12e4efde1776472e147e79R24)
* 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]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R98-R123)
[[2]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4R155-R179)
`tests/Get-AggregatedStatus.ps1`
[[3]](diffhunk://#diff-dc50f3891fd8a2d62df15437f55b45ed09c908756bd8bfdc11fd71826abda1b7L23-R92)
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](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L91-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](diffhunk://#diff-482e65806ed9e4a7320f14964764086b91fed4a28d12e4efde1776472e147e79R34-R36))
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
0 commit comments