Skip to content

feat(diagnostics): turn on warnings about width#214

Merged
hongjr03 merged 2 commits into
masterfrom
feat/show-width-warning
Jun 2, 2026
Merged

feat(diagnostics): turn on warnings about width#214
hongjr03 merged 2 commits into
masterfrom
feat/show-width-warning

Conversation

@roife
Copy link
Copy Markdown
Member

@roife roife commented Jun 2, 2026

Summary

  • diagnostics.slang.warnings 的默认值改为开启 width-expandwidth-truncport-width-expandport-width-trunc
  • 同步更新 VS Code 生成配置和 user-config schema,确保编辑器展示和运行时默认一致
  • 增加回归测试,覆盖默认告警生效和显式空配置可关闭告警这两条路径

Testing

  • cargo test -p vide
  • cargo xtask check-config-artifacts
  • cargo xtask check-schemas

Copilot AI review requested due to automatic review settings June 2, 2026 03:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and port-width-trunc by default in diagnostics.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.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 2, 2026

Docs preview: https://vide.pascal-lab.net/preview/pr-214/

@hongjr03 hongjr03 merged commit e5cd28f into master Jun 2, 2026
12 checks passed
@hongjr03 hongjr03 deleted the feat/show-width-warning branch June 2, 2026 14:47
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.

3 participants