feat(diagnostics): turn on warnings about width#214
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Vide’s default Slang diagnostics configuration to enable width-related warnings by default, and keeps the runtime defaults aligned with the published user-config schema and the VS Code extension’s generated configuration.
Changes:
- Enable
width-expand,width-trunc,port-width-expand, andport-width-truncby default indiagnostics.slang.warnings. - Update the user-config JSON schema and VS Code extension defaults to match the new runtime defaults.
- Add regression tests covering (1) default warnings being emitted and (2) explicit empty
warnings: []suppressing the warning.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/tests.rs |
Adds regression tests verifying default port-width warnings are emitted and can be suppressed via explicit empty warnings. |
src/config/user_config.rs |
Introduces a default warning list constant and wires it into config defaults, schema defaults, and config metadata; adds parsing/default tests. |
schemas/v1/user-config.schema.json |
Updates schema defaults to reflect the new enabled-by-default width warning groups. |
editors/vscode/src/generated/configuration.ts |
Updates generated VS Code configuration defaults for diagnostics.slang.warnings. |
editors/vscode/package.json |
Updates the VS Code extension setting default array for vide.diagnostics.slang.warnings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Docs preview: https://vide.pascal-lab.net/preview/pr-214/ |
hongjr03
approved these changes
Jun 2, 2026
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
diagnostics.slang.warnings的默认值改为开启width-expand、width-trunc、port-width-expand、port-width-truncuser-configschema,确保编辑器展示和运行时默认一致Testing
cargo test -p videcargo xtask check-config-artifactscargo xtask check-schemas