fix(lint): resolve JSON blocking errors (39 of 53)#7170
Open
jstirnaman wants to merge 2 commits intomasterfrom
Open
fix(lint): resolve JSON blocking errors (39 of 53)#7170jstirnaman wants to merge 2 commits intomasterfrom
jstirnaman wants to merge 2 commits intomasterfrom
Conversation
Content fixes by pattern:
JSONL relabel — 2 files
shared/influxdb3-admin/databases/list.md
shared/influxdb3-query-guides/execute-queries/influxdb3-cli.md
Multi-document JSON output (one object per line) was tagged `json`,
which only parses a single document. Relabel as `jsonl`, which the
linter validates with the JSONL mode of the JSON validator.
Apache Arrow output — 4 files (Go FlightSQL guides)
shared/influxdb-client-libraries-reference/flight/go-flight.md
influxdb3/{cloud-dedicated,cloud-serverless,clustered}/reference/client-libraries/flight/go-flight.md
Blocks contained `RECORD BATCH\n[...]` — Apache Arrow Go reader
output, not JSON. Relabel as `text` since `RECORD BATCH` is a
literal heading printed by `fmt.Println`, and stripping it would
destroy fidelity to the actual program output.
Wrap partial property fragments in {} — 5 files
shared/influxdb-client-libraries-reference/flight/java-flightsql.md
influxdb3/{cloud-dedicated,cloud-serverless,clustered}/reference/client-libraries/flight/java-flightsql.md
shared/influxdb-v2/monitor-alert/notification-endpoints/create.md
influxdb/cloud/query-data/parameterized-queries.md
Single-key fragments like `"database": "DATABASE_NAME"` are not
valid JSON. The blocks document configuration to add to a metadata
header / request body, so wrapping in `{ ... }` produces a valid
JSON object users can copy-paste verbatim.
Trailing-comma fixes — kapacitor/v1/working/api.md (4 errors),
enterprise_influxdb/.../authorization-api.md, the two influxdb3
databases/list.md files, the cloud-dedicated tokens list.md, and
the clustered prerequisites.md. JSON disallows trailing commas;
removed them.
Missing comma — kapacitor/v1/working/api.md (1)
`"name": "slack"` was followed by a property without a separating
comma. Added it.
Replace bare placeholder values
kapacitor/v1/reference/event_handlers/telegram.md
`"update_id":XXXXXXXXX` was a bare placeholder for an integer.
Replaced with `987654321` (parallels the format of other IDs in
the same example).
Multi-line string with literal newlines (1)
shared/influxdb3-write-guides/troubleshoot-distributed.md
`"message"` value spanned multiple lines with literal newlines —
not valid JSON. Joined into a single string with `\n` escapes.
Wrong fence language
telegraf/v1/data_formats/input/prometheus-remote-write.md
Block was Go syntax (`prompb.WriteRequest{...}`). Relabel as `go`.
Relabel non-JSON illustrations as `text` — 8 errors across 4 files
shared/influxdb-v2/process-data/task-options.md (4)
shared/influxdb-v2/process-data/get-started.md (3)
kapacitor/v1/working/api.md (1)
kapacitor/v1/reference/cli/kapacitor/vars.md (1)
influxdb/cloud/api-guide/api-invokable-scripts/_index.md (2)
enterprise_influxdb/.../replacing-nodes.md (1)
telegraf/v1/data_formats/output/msgpack.md (1)
Each block contained one or more of: bare ellipsis (`...`)
indicating elided properties, JS-style `// comments` (JSON has no
comment syntax), bare `<PLACEHOLDER>` values, multi-line strings
with literal newlines, or unescaped embedded `"` characters. These
are illustrative templates / partial program output, not values
users would copy verbatim. Relabel preserves readability without
blocking CI.
Deferred to upstream telegraf README sync (14 errors):
input-plugins/bind, ctrlx_datalayer, docker
output-plugins/azure_data_explorer, clarify, elasticsearch, zabbix
processor-plugins/lookup
These docs are generated from influxdata/telegraf README files per
content/telegraf/CLAUDE.md. Any fix here would be reverted on the
next sync; they need to be filed and fixed upstream first.
Test coverage: 59/59 lint-codeblocks tests still pass.
Contributor
Vale Style Check Results
Errors (blocking)
Warnings (5)
❌ Check failed — fix 20 error(s) before merging. |
Contributor
|
Contributor
📦 PR Preview — Preview Bot
Pages included in this preview
Preview auto-deploys on push. Will be cleaned up when PR closes. |
2 tasks
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.
Summary
Fixes 39 of 53 JSON blocking errors flagged by
yarn lint-codeblocksoncontent/. The remaining 14 are all in generatedcontent/telegraf/v1/{input,output,processor}-plugins/**files (percontent/telegraf/CLAUDE.md) and need to be fixed upstream ininfluxdata/telegraffirst.Content fixes by pattern
json→jsonl(linter already supports JSONL mode)RECORD BATCHoutput (Go FlightSQL)json→text{ ... }to produce valid JSON objectsXXXXXXXXX)987654321)\nescapesjson)json→gojson→textDeferred to upstream
influxdata/telegraf(14 errors)content/telegraf/v1/input-plugins/bind/_index.md(1)content/telegraf/v1/input-plugins/ctrlx_datalayer/_index.md(3)content/telegraf/v1/input-plugins/docker/_index.md(2)content/telegraf/v1/output-plugins/azure_data_explorer/_index.md(1)content/telegraf/v1/output-plugins/clarify/_index.md(1)content/telegraf/v1/output-plugins/elasticsearch/_index.md(2)content/telegraf/v1/output-plugins/zabbix/_index.md(2)content/telegraf/v1/processor-plugins/lookup/_index.md(2)These docs are generated from
influxdata/telegrafplugin READMEs (percontent/telegraf/CLAUDE.md). Any fix indocs-v2would be reverted on the next sync; they need upstream PRs first. Will file an issue/PR upstream after this lands.Verification
yarn test:lint-codeblocks: 59/59 passyarn lint-codeblockson the affected files: 0 JSON errors remain in editable files\``json` blocks across the repo continue to parse (no regressions)Test plan
jsonblocks;text/go/jsonlhighlighting on the relabeled blocks)