Commit 1233208
authored
fix(lint): resolve TOML blocking errors; add elide-marker normalizer rule (#7166)
Validator improvement:
scripts/lib/codeblock-normalizer.mjs — add a third normalization
rule that comments out standalone elide markers (..., ...., [...])
before parsing. These markers are pervasive in Telegraf and
InfluxDB TOML examples and YAML config snippets to indicate
omitted content, but neither parses as valid TOML/YAML. The new
rule rewrites them as language-appropriate comments (# ... for
TOML/YAML/bash/python, // ... for JS) so blocks with otherwise
valid syntax pass without forcing authors to manually comment
every ellipsis. JSON has no comment syntax, so JSON fences with
ellipses must still be fixed at the source. For YAML, the
substitution skips column-0 ... (the YAML stream document-end
marker) — only indented occurrences are treated as ellipsis. This
alone clears 22 of the 49 originally-flagged TOML errors.
Content fixes (toml fence preserved):
- cloud-dedicated / cloud-serverless / clustered v1 API guides:
Replace curly close-quote (U+201D) in `content_encoding = "gzip”`
with the straight ASCII `"` so the string terminates correctly.
- kapacitor reference/event_handlers/post.md (5 errors):
Strings containing literal `{{index . "time"}}` template
expressions had inconsistent quoting — outer "..." with
unescaped inner ". Switched to TOML literal strings (single-
quoted) for url and row-template values; inner double quotes
are now safe and verbatim.
- kapacitor administration/subscription-management.md (2 errors):
`db_name = <list of retention policies>` had literal angle
brackets, invalid TOML. Changed to a commented pattern.
- kapacitor reference/event_handlers/zenoss.md:
Bare inline table `{ ... }` lacked a key. Added `severity-map = `.
- kapacitor reference/nodes/alert_node.md:
Bare `timeout = 10s` is not valid TOML (TOML has no duration
primitive). Quoted as "10s" — matches the convention used by
39 other duration values across Kapacitor docs. Kapacitor's
config parser still decodes the string into its Duration type.
- kapacitor administration/configuration.md:
Two alternative configs (v1 / v2-or-Cloud) shared the same
[[influxdb]] section, producing duplicate `enabled` and
`default` keys. Split into two separate ```toml fences with
intervening prose. Each block now parses on its own.
- kapacitor administration/auth/kapacitor-auth.md:
`auth-enabled: true` used YAML colon syntax inside a TOML block.
Changed to `auth-enabled = true`.
- kapacitor guides/event-handler-setup.md:
`parse-mode = Markdown` had a bare value; quoted as "Markdown".
- influxdb v1 administration/https_setup.md:
Lone `>` and bracketed `[...]` markers inside a TOML block were
blockquote/elide leakage from rendering. Replaced with
descriptive TOML comments.
- enterprise_influxdb v1 administration/configure/config-data-nodes.md:
Mangled prose-mixed-with-TOML around the [[collectd]] section
(`Default is `false.`, stray backticks). Cleaned up to a
standard commented-defaults block.
- enterprise_influxdb v1 administration/configure/security/ldap.md:
A 12-line comment block was duplicated verbatim, each followed
by the same client-tls-certificate / client-tls-private-key
assignments — producing duplicate-key errors. Removed the second
(byte-identical) block; the original block above documents the
keys.
- enterprise_influxdb v1 tools/influxd-ctl/ldap/sample-config.md:
Shell prompt `meta1:/# influxd-ctl ldap sample-config -h` was
embedded mid-TOML. Moved to a TOML comment showing the producing
command.
- telegraf v1 configuration.md:
Block demonstrates Telegraf's preprocessor `${VAR}` substitution,
which uses bare unquoted form for non-string values
(`skip_database_creation = ${VAR}`). That syntax is a Telegraf
extension to TOML and not parseable by strict TOML validators.
Relabeled the fence as `text` with an HTML comment explaining why.
- telegraf v1 data_formats/input/json_v2.md:
Inline parenthetical `false (or true, just not both)` was not a
valid TOML comment. Changed to a proper trailing `#` comment.
Deferred to upstream telegraf README sync (6 errors):
- input-plugins/jti_openconfig_telemetry, opcua_listener,
postgresql_extensible, win_eventlog
- output-plugins/dynatrace
- processor-plugins/converter
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.1 parent d69aca7 commit 1233208
17 files changed
Lines changed: 93 additions & 48 deletions
File tree
- content
- enterprise_influxdb/v1
- administration/configure
- security
- tools/influxd-ctl/ldap
- influxdb3
- cloud-dedicated/guides/api-compatibility/v1
- cloud-serverless/write-data/api
- clustered/guides/api-compatibility/v1
- influxdb/v1/administration
- kapacitor/v1
- administration
- auth
- guides
- reference
- event_handlers
- nodes
- telegraf/v1
- data_formats/input
- scripts/lib
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1499 | 1499 | | |
1500 | 1500 | | |
1501 | 1501 | | |
1502 | | - | |
1503 | | - | |
1504 | | - | |
| 1502 | + | |
1505 | 1503 | | |
1506 | 1504 | | |
1507 | 1505 | | |
| |||
Lines changed: 0 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | 190 | | |
206 | 191 | | |
207 | 192 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | | - | |
238 | | - | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
239 | 239 | | |
240 | | - | |
| 240 | + | |
241 | 241 | | |
242 | 242 | | |
243 | 243 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
329 | 329 | | |
330 | 330 | | |
331 | 331 | | |
332 | | - | |
| 332 | + | |
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
315 | 315 | | |
316 | 316 | | |
317 | 317 | | |
318 | | - | |
| 318 | + | |
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
| 435 | + | |
| 436 | + | |
435 | 437 | | |
436 | 438 | | |
437 | 439 | | |
| |||
440 | 442 | | |
441 | 443 | | |
442 | 444 | | |
443 | | - | |
444 | | - | |
445 | | - | |
| 445 | + | |
446 | 446 | | |
447 | 447 | | |
448 | 448 | | |
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | 452 | | |
| 453 | + | |
453 | 454 | | |
454 | | - | |
455 | | - | |
456 | | - | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
457 | 460 | | |
458 | 461 | | |
459 | 462 | | |
460 | 463 | | |
461 | 464 | | |
462 | | - | |
463 | | - | |
| 465 | + | |
| 466 | + | |
464 | 467 | | |
465 | 468 | | |
466 | 469 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
0 commit comments