Skip to content

Add description property to wireit script configs#1392

Open
RodrigoHamuy wants to merge 1 commit intogoogle:mainfrom
RodrigoHamuy:feat/add-description-property
Open

Add description property to wireit script configs#1392
RodrigoHamuy wants to merge 1 commit intogoogle:mainfrom
RodrigoHamuy:feat/add-description-property

Conversation

@RodrigoHamuy
Copy link

@RodrigoHamuy RodrigoHamuy commented Mar 3, 2026

Fixes #1015.

Summary

Adds an optional description: string field to wireit script configurations, allowing developers to document what each script does.

  • JSON Schema updated with markdownDescription for IDE autocomplete/hover support
  • Parsing and validation handled in the analyzer
  • TypeScript BaseScriptConfig interface updated
  • Test coverage added for valid and invalid values

Usage

"wireit": {
  "build": {
    "description": "Compile TypeScript sources to JavaScript",
    "command": "tsc --build",
    "files": ["src/**/*.ts"],
    "output": ["lib/**"]
  },
  "cleanup": {
    "description": "Delete paths that are not version controlled.",
    "command": "rm -rf some/path/* && rm -rf some/other/path/*"
  }
}

@google-cla
Copy link

google-cla bot commented Mar 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@RodrigoHamuy RodrigoHamuy marked this pull request as ready for review March 3, 2026 13:57
Adds an optional `description` string field to wireit script
configurations, allowing developers to document what each script does.

- schema.json: adds `description` property with markdownDescription for
  IDE autocomplete/hover support
- src/config.ts: adds `description: string | undefined` to
  BaseScriptConfig
- src/analyzer.ts: adds #processDescription() method and wires it into
  script config parsing
- src/test/json-schema.test.ts: adds test cases for valid/invalid values
- src/test/util/package-json.ts: adds description to test PackageJson type

Closes google#1015
@RodrigoHamuy RodrigoHamuy force-pushed the feat/add-description-property branch from 9536095 to ab711f1 Compare March 3, 2026 14:22
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.

Add support for script comment/description

1 participant