PoshCode / ModuleBuilder

A PowerShell Module to help scripters write, version, sign, package, and publish.
MIT License
445 stars 54 forks source link

fix #96 by moving statements even if parsing errors exists #97

Closed gaelcolas closed 4 years ago

gaelcolas commented 4 years ago

Hi @Jaykul Here's a quick fix for #96

gaelcolas commented 4 years ago

I can add a switch to Build-Module to disable the MovingUsingStatements, but I personally don't see the value (Module load will always fail on UsingMustBeAtStartOfScript(. If you want it, let me know and I'll create another PR.

gaelcolas commented 4 years ago

CI failures seems to be because of Pester 5. I'd suggest to pin to 4.10.1 until the tests are updated (in a different PR), but you'll also miss CodeCoverage I believe. If I'm not mistaken, the error is because TestDrive does not exist during discovery, but there might be other incompatibilities...

Let me know if you want me to try something for this PR.