-
Notifications
You must be signed in to change notification settings - Fork 511
Code formatting breaks the code by moving brace to a comment #1272
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
Comments
This would be expected to me and not the main reason but one of the reasons why I don't use inline comments. |
@wsmelton I agree and I don't use inline comments. |
what if you change the formatting to different code formatting preset? PoshCode/PowerShellPracticeAndStyle#81 Seems like Allman could work here? |
This has been fixed in PowerShell/PSScriptAnalyzer#929 . In the next PSScriptAnalyzer version, this will be fixed and the next vscode-extension release after that will contain that fix. |
I'm going to close this for now as external/dupe of PowerShell/PSScriptAnalyzer#826. If you want to get the CI build of PSSA so that this doesn't happen, go here: And put the unzipped folder in your No guarantee that the CI build will be 100% stable 😄 |
System Details
$PSVersionTable
:Issue Description
I am experiencing a problem with code formatting.
I used default powershell.codeFormatting settings and have set:
If I paste a code with opening brace on second line it doesn't check if previous line finished with a comment and moves brace, breaking the code.
The text was updated successfully, but these errors were encountered: