Skip to content

Introduce validation command and enhance diagnostics#536

Open
jessehouwing wants to merge 4 commits intomicrosoft:masterfrom
jessehouwing:feat/structuredErrorMessages
Open

Introduce validation command and enhance diagnostics#536
jessehouwing wants to merge 4 commits intomicrosoft:masterfrom
jessehouwing:feat/structuredErrorMessages

Conversation

@jessehouwing
Copy link
Contributor

@jessehouwing jessehouwing commented Feb 22, 2026

Add a validation command that includes detailed line, column, and file information for warnings and errors. Extend this functionality to other manifests and refactor diagnostics handling for improved formatting and normalization. Address flaky integration tests related to task.json formatting and enhance error handling for better reliability.

This pull request introduces structured and location-aware validation for extension manifest and task.json files, and adds support for treating warnings as errors. The changes improve error reporting by including file, line, and column information for validation issues, and allow users to opt into stricter validation via a new warningsAsErrors option. Additionally, the handling of JSON/JSONC parsing is enhanced for better diagnostics.

Validation and Error Reporting Improvements

  • Validation errors and warnings for manifest and task.json files now include structured metadata: file, line, column, and message, making it easier to identify and fix issues. [1] [2] [3] [4]
  • All warnings collected during task.json validation can now be promoted to errors if the warningsAsErrors flag is set, and are reported with detailed location info. [1] [2] [3]

JSON/JSONC Parsing Enhancements

  • Manifest and overrides files are now parsed using jsonc-parser to support comments and trailing commas (when json5 is enabled), with parse errors reported with offset-to-line/column conversion. [1] [2] [3] [4]

Command-line and API Additions

  • A new warningsAsErrors command-line argument is introduced and passed through all relevant code paths, allowing users to opt into strict validation. [1] [2] [3] [4] [5] [6] [7]

Type and Interface Updates

  • The MergeSettings interface now includes the optional warningsAsErrors property, and a new ExtensionVersionInfo interface is introduced for consistent extension metadata. [1] [2] [3] [4]

Miscellaneous

  • Improved the handling of build task contributions and their validation, ensuring all contributions are tracked with origin and location information for better diagnostics. [1] [2] [3]

These changes collectively make extension validation more robust, user-friendly, and configurable, especially for teams seeking stricter CI/CD enforcement of manifest correctness.

…zeIssue functions, replace inline formatting with these utilities across multiple files.
Align the invalid task.json server-integration assertion with current CLI
diagnostic output and harden async error handling in done-style tests.

remove dependency on legacy "Invalid task json" prefix
assert on field-level validation errors (id, name, friendlyName)
wrap assertion logic in try/catch inside rejection handlers
call done(assertionError) on assertion failures to fail fast (not timeout)
apply the same catch-block hardening pattern across related build server tests
@jessehouwing jessehouwing requested review from a team as code owners February 22, 2026 23:28
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.

1 participant