autoCorrectAliases replaces "process {" with "Get-Process {"
See original GitHub issueIssue Type: Bug
Hello,
first, I don’t know whether this setting is due to the Extension or VsCode itself. Please advise if this needs to be raised in the VsCode repo.
This issue does not occur with the default setting for Auto-Correcting Aliases:
// Replaces aliases with their aliased name.
"powershell.codeFormatting.autoCorrectAliases": false,
I have autoCorrectAliases
set to TRUE
and I love this feature 😃
This happens under very specific circumstances, i.E. when code-Errors are present.
I have an advanced script with BEGIN/PROCESS/END block and during changing the description of a Parameter for example, the syntax is incomplete resulting in the code being read differently (usually this is an open comment with ’ or " (when replacing them with the other or adding emphasis within the comment).
my process
block function name gets replaced with Get-Process
resulting the whole Script to be unusable.
❯ Get-Alias process
Get-Alias : This command cannot find a matching alias because an alias with the name 'process' does not exist.
At line:1 char:1
+ Get-Alias process
+ ~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (process:String) [Get-Alias], ItemNotFoundException
+ FullyQualifiedErrorId : ItemNotFoundException,Microsoft.PowerShell.Commands.GetAliasCommand
Process.exe is an executable, but no substitute for Get-Process…
Can this replacement please be excluded?
Extension version: 2021.2.1 VS Code version: Code 1.54.3 (2b9aebd5354a3629c3aba0a5f5df49f43d6689f8, 2021-03-15T10:55:45.459Z) OS version: Windows_NT x64 10.0.19042
System Info
Item | Value |
---|---|
CPUs | Intel® Core™ i7-9700K CPU @ 3.60GHz (8 x 3600) |
GPU Status | 2d_canvas: enabled gpu_compositing: enabled multiple_raster_threads: enabled_on oop_rasterization: enabled opengl: enabled_on protected_video_decode: unavailable_off rasterization: enabled skia_renderer: enabled_on video_decode: enabled vulkan: disabled_off webgl: enabled webgl2: enabled |
Load (avg) | undefined |
Memory (System) | 31.87GB (17.19GB free) |
Process Argv | –crash-reporter-id efc3d77d-4b9d-44d6-894f-bd5aee3260eb |
Screen Reader | no |
VM | 0% |
A/B Experiments
vsliv368cf:30146710
vsreu685:30147344
python383cf:30185419
vspyt653:30270858
vspor879:30202332
vspor708:30202333
vspor363:30204092
vstry914:30276682
pythonvsdeb440:30248342
pythonvsded773:30248341
pythonvspyt875:30259475
pythonvsnew554cf:30280384
pythontbcf:30265426
pythonvspyt943cf:30280190
openwsldoc:30280162
vscoresta800cf:30279782
vspre833:30267464
pythonptprofiler:30281270
vshan820:30276952
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (2 by maintainers)
Top GitHub Comments
More like, “Shaka. When the bug is squashed” 😸
Shaka. When the walls fell. 👍