Skip to content

fix: improve command and option parsing in generate-docs script#2943

Merged
seanlanglands merged 1 commit into
trunkfrom
fix/generate-docs-script
Jul 7, 2026
Merged

fix: improve command and option parsing in generate-docs script#2943
seanlanglands merged 1 commit into
trunkfrom
fix/generate-docs-script

Conversation

@seanlanglands

Copy link
Copy Markdown
Contributor

Description

This pull request fixes the generate-docs.js script. The output is then ingested into our documentation site.

The vip --help output wraps long option/command descriptions across multiple lines (commander.js wraps to the terminal width, which is 80 columns when stdout is piped in CI). Two bugs resulted:

  1. Corrupted JSON output — every wrapped continuation line (e.g. for a (sub)command. (default: false)) failed the OPTION_REGEXP match and hit console.log('Unknown option', line). That's console.log, so it wrote to stdout — polluting the /tmp/docs.json file the publish-docs workflow redirects to. The JSON was invalid.
  2. Lost description text — the wrapped continuation lines were dropped entirely instead of being appended to their option's description.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@sonarqubecloud

sonarqubecloud Bot commented Jul 7, 2026

Copy link
Copy Markdown

@seanlanglands seanlanglands merged commit 61fa5c2 into trunk Jul 7, 2026
19 checks passed
@seanlanglands seanlanglands deleted the fix/generate-docs-script branch July 7, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants