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
🌟[Major]: Remove Settings with predefined settings (#18)
## Description
This pull request simplifies the configuration of the script analyzer
action by removing the `Settings` input (which previously allowed
selecting between `Module`, `SourceCode`, or `Custom` modes) in favor of
always using a `SettingsFilePath`. Documentation, workflow, and
implementation are updated to reflect this streamlined approach.
Additionally, a new example settings file for source code analysis is
added for clarity.
**Configuration and API Simplification:**
- Removed the `Settings` input from `action.yml`, the workflow, and
environment variables, so users now always specify a `SettingsFilePath`
for analyzer configuration. The default settings file path is now
`.github/linters/.powershell-psscriptanalyzer.psd1`.
[[1]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L12-R15)
[[2]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L254)
[[3]](diffhunk://#diff-1243c5424efaaa19bd8e813c5e6f6da46316e63761421b3e5f5c8ced9a36e6b6L268)
[[4]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4L35)
[[5]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4L59)
[[6]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4L85-R83)
[[7]](diffhunk://#diff-a12ae5c885b0673c0ff6f70c2670886907590d624626e07da4c52e01aeaf56a4L109)
**Documentation Updates:**
- Updated `README.md` to remove references to the old `Settings` input
and predefined settings types, clarifying that users should provide a
settings file via `SettingsFilePath`. Usage instructions and examples
are revised accordingly.
[[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L21-R21)
[[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L92-R100)
[[3]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L142-R140)
**Implementation Changes:**
- Refactored `scripts/main.ps1` to resolve only the `SettingsFilePath`
and validate its existence, removing all logic related to the `Settings`
input and its switch statement.
**Test and Example Improvements:**
- Added a new
`tests/srcWithManifestTestRepo/tests/SourceCode.Settings.psd1` file
containing example analyzer rules for source code analysis.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|`Path`| The path to the code to test. | false |`'.'`|
21
-
|`Settings`| The type of tests to run: `Module`, `SourceCode`, or `Custom`. | false |`Custom`|
22
-
|`SettingsFilePath`| If `Custom` is selected, the path to the settings file. | false |`${{ github.workspace }}/.github/linters/.powershell-psscriptanalyzer.psd1`|
21
+
|`SettingsFilePath`| The path to the settings file. | false |`.github/linters/.powershell-psscriptanalyzer.psd1`|
0 commit comments