Tags: HeyItsGilbert/GoodEnoughRules
Tags
fix: 🐛 Update AST search logic to resolve duplicate errors (#8) * Modified `Measure-BasicWebRequestProperty` and `Measure-InvokeWebRequestWithoutBasic` to fix duplicate errors caused by recursive AST searches. * Updated `CHANGELOG.md` for version 0.3.1 to reflect these fixes. * Added tests to ensure proper detection of method usage with `Invoke-WebRequest`. Fixes #7
release: [0.3.0] 2025-12-13 (#6) ### Added - `Measure-BasicWebRequestProperty`: Detects when `Invoke-WebRequest` uses `UseBasicParsing` with incompatible properties like `Forms`, `ParsedHtml`, `Scripts`, or `AllElements`. Works with both direct property access and variable assignments. - `Measure-InvokeWebRequestWithoutBasic`: Flags `Invoke-WebRequest` (and its aliases `iwr`, `curl`) when used without the `UseBasicParsing` parameter. - `Get-CommandParameter`: New private helper function to parse command parameters from AST, including support for positional parameters. - Documentation for new rules in `docs/en-US/` directory. - Comprehensive test coverage for new rules. ### Changed - Updated `about_GoodEnoughRules.help.md` with complete module documentation including examples, rule descriptions, and troubleshooting guidance. - `Measure-SecureStringWithKey`: Standardized parameter block formatting and updated to use `Get-CommandParameter` helper function. - Test files: Added BeforeAll checks to ensure module builds before testing. - Improved code consistency across all rule files (param block formatting, using consistent helper function names).