vscode-powershell icon indicating copy to clipboard operation
vscode-powershell copied to clipboard

Indent in Pester It Statement with curly braces is confused

Open fromthewoods opened this issue 6 years ago • 2 comments

Issue Type: Bug

Formatter doesn't treat script blocks inside It statements correctly in Pester:

  • I'm using 2 spaces for indentation
  • Periods '.' indicate spaces
..It 'should not format way' {
.{ & $runnerScript @badparams} | Should -Throw "an error"
..}

The above block of code should look like this:

..It 'should not format way' {
....{ & $runnerScript @badparams } | Should -Throw "an error"
..}

Extension version: 2020.5.0 VS Code version: Code - Insiders 1.46.0-insider (cd41dd1f6065db76c77c6e2f659bb50e6f558dec, 2020-05-29T05:51:32.662Z) OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8850H CPU @ 2.60GHz (12 x 2592)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off_ok
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.78GB (7.68GB free)
Process Argv
Screen Reader no
VM 0%

fromthewoods avatar May 29 '20 20:05 fromthewoods

Thanks @fromthewoods this looks likes a duplicate of https://github.com/PowerShell/PSScriptAnalyzer/issues/1496

SydneyhSmith avatar Jun 02 '20 21:06 SydneyhSmith

This issue has been marked as duplicate and has not had any activity for 1 day. It has been closed for housekeeping purposes.

ghost avatar Jun 03 '20 22:06 ghost