aws-toolkit-vscode
aws-toolkit-vscode copied to clipboard
Application Composer updates template.yaml just by opening it (plus removing trailing empty line)
Problem
Application Composer reformats the file just by opening it. And the reformatting removes the last empty line.
Steps to reproduce the issue
When I have specified a schema in my template.yaml file like
# schema: https://raw.githubusercontent.com/aws/serverless-application-model/main/samtranslator/schema/schema.json
AWSTemplateFormatVersion: 2010-09-09
I get
and when I click that, the 'template.yaml (Application Composer)' window appears. As part of the loading of the window, the document is reformatted.
As such the formatting is not a huge problem, but surprising. However, the removal of the empty line at the end is a problem as super-linter wants YML to end with an empty line.
Expected behavior
A "visualize" command should not update the file. Let "format document" handle that.
And do not remove the last empty line as that gives YAML lint errors from super-linter -
System details (run AWS: About
and/or Amazon Q: About
)
VS Code About:
Version: 1.91.0 (user setup) Commit: ea1445cc7016315d0f5728f8e8b12a45dc0a7286 Date: 2024-07-01T18:52:22.949Z Electron: 29.4.0 ElectronBuildId: 9728852 Chromium: 122.0.6261.156 Node.js: 20.9.0 V8: 12.2.281.27-electron.0 OS: Windows_NT x64 10.0.22631
- OS: Windows 11
- Visual Studio Code version: 1.91.0
- AWS Toolkit version: 3.12.0
- Amazon Q version: n/a