Fix invalid config JSON and enforce canonical config format#1318
Open
hakman wants to merge 1 commit into
Open
Conversation
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
hakman
force-pushed
the
fix-config-json-trailing-commas
branch
from
July 13, 2026 14:26
cef4e2d to
c297b25
Compare
hakman
force-pushed
the
fix-config-json-trailing-commas
branch
from
July 13, 2026 14:27
c297b25 to
7b2d3e7
Compare
config/disk-log-message-filelog.json contained trailing commas and no trailing newline, so it could not be parsed by encoding/json and NPD would fail to start when configured with it. - Fix the invalid JSON - Add TestShippedConfigs, which verifies that every shipped config/*.json parses (catching trailing commas, UTF-8 BOMs and other syntax errors) and is in the canonical format (2-space indent, trailing newline), showing a diff on failure - Add `make fmt-configs` to rewrite nonconforming files in place (UPDATE_EXPECTED=y) - Normalize the existing config files to the canonical format (whitespace-only changes)
hakman
force-pushed
the
fix-config-json-trailing-commas
branch
from
July 15, 2026 11:01
7b2d3e7 to
c96c103
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
config/disk-log-message-filelog.jsoncontained trailing commas and no trailing newline, so it could not be parsed byencoding/jsonand NPD would fail to start when configured with it.This PR:
TestShippedConfigs, which verifies that every shippedconfig/*.jsonparses (catching trailing commas, UTF-8 BOMs and other syntax errors) and is in the canonical format (2-space indent, trailing newline), showing a diff on failure.make fmt-configsto rewrite nonconforming files in place (UPDATE_EXPECTED=y).