Skip to content

Normalize JSON trailing newlines.#14579

Open
sean-mcmanus wants to merge 4 commits into
mainfrom
seanmcm/updateIntelliSenseStringAddJsonNewlines
Open

Normalize JSON trailing newlines.#14579
sean-mcmanus wants to merge 4 commits into
mainfrom
seanmcm/updateIntelliSenseStringAddJsonNewlines

Conversation

@sean-mcmanus

@sean-mcmanus sean-mcmanus commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Normalize JSON trailing newlines.

Fixed by Copilot (Claude Opus 4.8) in VS Code.

Summary

Makes JSON trailing newlines consistent
across the extension and stops them from being silently stripped on save.

JSON trailing-newline consistency

Two settings in .vscode/settings.json disagreed: [jsonc] inserted a final
newline on save, but [json] did not. Because [json] also formats on save,
saving any .json file reformatted it and then dropped the trailing newline,
producing spurious diffs whenever a JSON file was opened and saved. Several
files had already lost their final newline this way.

Changes:

  • .vscode/settings.json: set files.insertFinalNewline to true for [json]
    (it was false), matching [jsonc]. Saving a JSON file no longer strips the
    trailing newline.
  • Normalized all tracked .json files to end with a single trailing newline,
    including the generated i18n/**/*.i18n.json translation files.
  • gulpfile.js (translations-import): append a trailing newline to each
    generated .i18n.json after it is written, so future translation imports keep
    the files consistent with the convention above. The existing generators for
    bin/messages and package.json already write a trailing newline, so no
    change was needed there.

Notes

  • No behavioral change to the extension beyond preventing the localized failure
    described above; the remaining changes are whitespace-only and tooling.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@sean-mcmanus

sean-mcmanus commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

These shouldn't get checked in until the corresponding cpptools side PR 757614 gets approved.

UPDATE: The IntelliSense string changes were moved to #14607 .

Colengms
Colengms previously approved these changes Jul 14, 2026
@sean-mcmanus sean-mcmanus changed the title Add a new IntelliSense translation string and normalize JSON trailing newlines. Normalize JSON trailing newlines. Jul 26, 2026
@sean-mcmanus
sean-mcmanus requested a review from Copilot July 26, 2026 17:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Pull Request

Development

Successfully merging this pull request may close these issues.

3 participants