microsoft / microsoft/vscode-remote-release

devcontainer-lock.json always get the end newline removed

Open
#11,769 0 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Jul 25, 2026.

Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

GitHub reports files that don't end with an empty newline. All lockfile tools I've used (npm, pnpm, cargo) add this empty newline at the end by default. VSCode does not.
If I add the end newline manually, at the next run, VSCode will update the file and remove it again, even if no other change to the file (sha update, feature added/removed) was necessary.

  • VSCode Version: 1.130.0
  • Local OS Version: Windows 11
  • Remote OS Version: GitHub Codespaces
  • Remote Extension/Connection Type: Dev Containers

Steps to Reproduce:

  1. Open a repo in a devcontainer
  2. devcontainer-lock.json gets generated.
  3. Add an empty newline to the end of the file.
  4. Commit the file.
  5. Close the devcontainer and reopen it again. VSCode will remove your added newline, so the last line will always be the closing } of the JSON file.

Does this issue occur when you try this locally?: Yes
Does this issue occur when you try this locally and all extensions are disabled?: Yes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.