v4.0.0
🌟[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
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:
- Updated
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:
- Refactored
scripts/main.ps1to resolve only theSettingsFilePathand validate its existence, removing all logic related to theSettingsinput and its switch statement.
Test and Example Improvements:
- Added a new
tests/srcWithManifestTestRepo/tests/SourceCode.Settings.psd1file containing example analyzer rules for source code analysis.