pottential fix for EIDSCA generator - #2111
Conversation
Block : EIDSCA generator
Name : It generates canonical sources from fixture input
Result : Failed
Message : Expected $true, but got $false.
[21:46:37][pester.ps1] 1 tests out of 10394 tests failed!
Exception: D:\a\maester\maester\powershell\tests\pester.ps1:236
Line |
236 | throw "$totalFailed / $totalRun tests failed!"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 / 10394 tests failed!
Error: Process completed with exit code 1.
…nput pottential fix for
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe PowerShell test generator normalizes CRLF and LF sequences to the platform newline format, trims trailing whitespace and blank lines, and writes the cleaned content. ChangesGenerated test newline normalization
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Up to standards ✅🟢 Issues
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@build/eidsca/Update-EidscaTests.ps1`:
- Around line 451-454: Update both generated-file paths in Update-EidscaTests to
derive the newline separator from [System.Environment]::NewLine rather than
detecting it from template content. Keep the existing normalization flow, but
ensure all generated files use the host platform newline format regardless of
whether the input template uses LF or CRLF.
- Around line 451-454: Update the content-normalization flow in CreateFile so it
first converts all line endings to LF, trims trailing spaces and tabs plus
trailing blank lines, and only then converts LF to $newLine. Ensure
RemoveTrailingWhitespace operates on LF-normalized content before CRLF
conversion, preventing whitespace from remaining before carriage returns.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 23dd20bc-53fc-4373-9ebe-82813b16c238
📒 Files selected for processing (1)
build/eidsca/Update-EidscaTests.ps1
📑 Description
Block : EIDSCA generator Name : It generates canonical sources from fixture input Result : Failed Message : Expected $true, but got $false.
[21:46:37][pester.ps1] 1 tests out of 10394 tests failed! Exception: D:\a\maester\maester\powershell\tests\pester.ps1:236 Line | 236 | throw "$totalFailed / $totalRun tests failed!"
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| 1 / 10394 tests failed!
Error: Process completed with exit code 1.
Closes # I never created an issue for it
✅ Checks
/powershell/tests/pester.ps1locally.ℹ️ Additional Information
How to Contribute
🏗️ Read our full contributing guide for the Maester project.
🧪 We also have additional instructions and a checklist for creating tests.
Join us at the Maester repository discussions or Entra Discord for more help and conversations!
While you wait for a review, why not spread some Maester love on social media? Thank you! 💖
Summary by CodeRabbit