Skip to content

Expand Alias Problem fixer is broken if alias is followed by a '{' #414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
gerane opened this issue Dec 23, 2016 · 3 comments
Closed

Expand Alias Problem fixer is broken if alias is followed by a '{' #414

gerane opened this issue Dec 23, 2016 · 3 comments

Comments

@gerane
Copy link

gerane commented Dec 23, 2016

if you use the new Problem fixer for Aliases it breaks if followed by a '{'. It appears to remove everything following the '{' until it encounters the first line that doesn't start with a space.

System Details

  • Operating system name and version: Windows 10
  • VS Code version: 1.9.0-Insiders
  • PowerShell extension version: 1.8 (Modified version with working Editor Commands)
  • Output from $PSVersionTable:
Name                           Value                                                                                                                                      
----                           -----                                                                                                                                      
PSVersion                      5.1.14393.206                                                                                                                              
PSEdition                      Desktop                                                                                                                                    
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                    
BuildVersion                   10.0.14393.206                                                                                                                             
CLRVersion                     4.0.30319.42000                                                                                                                            
WSManStackVersion              3.0                                                                                                                                        
PSRemotingProtocolVersion      2.3                                                                                                                                        
SerializationVersion           1.1.0.1                                                                                                                                    

Issue Description

Gif demonstrating the issue in different scenarios.

expandaliasissue

This does not happen if using the PowerShell: Expand Alias from the Command Palette. Regex issue maybe?

Attached Logs

@daviwil
Copy link
Contributor

daviwil commented Dec 23, 2016

@kapilmb fixed this in PSScriptAnalyzer, we just need to ship the update: PowerShell/PSScriptAnalyzer#685

@gerane
Copy link
Author

gerane commented Dec 23, 2016

@daviwil Ahh ok, didn't realize that was being handled by PSScriptAnalyzer.

Not a big deal, I rarely ever use aliases in an editor, this was me fixing an alias in someone else's code lol =)

@SydneyhSmith
Copy link
Collaborator

Closing as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants