-
Notifications
You must be signed in to change notification settings - Fork 0
🌟[Major]: Remove Settings with predefined settings
#18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR simplifies the PSScriptAnalyzer action configuration by removing the predefined Settings input modes and standardizing on a single SettingsFilePath approach. Users now always provide a custom settings file path instead of choosing between Module, SourceCode, or Custom modes.
- Removed the
Settingsinput parameter and its associated logic throughout the codebase - Updated default settings file path to be relative instead of absolute
- Added an example SourceCode settings file for testing purposes
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| action.yml | Removed Settings input and updated SettingsFilePath description and default |
| scripts/main.ps1 | Simplified logic to only handle SettingsFilePath resolution and validation |
| README.md | Updated documentation to reflect Settings input removal and new workflow |
| .github/workflows/Action-Test.yml | Updated test workflows to use SettingsFilePath instead of Settings |
| tests/srcWithManifestTestRepo/tests/SourceCode.Settings.psd1 | Added example settings file for source code analysis |
Comments suppressed due to low confidence (1)
action.yml:1
- The default path should include
${{ github.workspace }}/prefix to ensure the path is resolved relative to the repository root, maintaining consistency with the README documentation which still references the full path.
name: Invoke-ScriptAnalyzer (by PSModule)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Settings with predefined settingsSettings with predefined settings
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 5 out of 7 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <[email protected]>
Description
This pull request simplifies the configuration of the script analyzer action by removing the
Settingsinput (which previously allowed selecting betweenModule,SourceCode, orCustommodes) in favor of always using aSettingsFilePath. 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:
Settingsinput fromaction.yml, the workflow, and environment variables, so users now always specify aSettingsFilePathfor analyzer configuration. The default settings file path is now.github/linters/.powershell-psscriptanalyzer.psd1. [1] [2] [3] [4] [5] [6] [7]Documentation Updates:
README.mdto remove references to the oldSettingsinput and predefined settings types, clarifying that users should provide a settings file viaSettingsFilePath. Usage instructions and examples are revised accordingly. [1] [2] [3]Implementation Changes:
scripts/main.ps1to resolve only theSettingsFilePathand validate its existence, removing all logic related to theSettingsinput and its switch statement.Test and Example Improvements:
tests/srcWithManifestTestRepo/tests/SourceCode.Settings.psd1file containing example analyzer rules for source code analysis.