Skip to content

xtask: Convert workspacing checks to new lint structure#3172

Open
smalis-msft wants to merge 1 commit intomicrosoft:mainfrom
smalis-msft:workspaced-lint
Open

xtask: Convert workspacing checks to new lint structure#3172
smalis-msft wants to merge 1 commit intomicrosoft:mainfrom
smalis-msft:workspaced-lint

Conversation

@smalis-msft
Copy link
Copy Markdown
Contributor

Now it doesn't have to traverse the filesystem itself or run cargo metadata, which saves us about half a second.

Copilot AI review requested due to automatic review settings April 1, 2026 16:18
@smalis-msft smalis-msft requested a review from a team as a code owner April 1, 2026 16:18
@smalis-msft smalis-msft enabled auto-merge (squash) April 1, 2026 16:18
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

Moves the “verify workspace Cargo.toml workspacing” checks from a standalone xtask pass into the shared lint framework, avoiding filesystem traversal and cargo metadata for faster runs.

Changes:

  • Removed the VerifyWorkspace fmt pass and its filesystem/cargo metadata implementation.
  • Added a new workspaced lint that validates workspace membership/dependency/exclusion and checks for non-workspaced dependencies.
  • Updated lint error reporting to log using self.path rather than workspace_dir.join(self.path).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 7 comments.

File Description
xtask/src/tasks/fmt/workspace.rs Removes the old workspace verification task implementation (walk FS + cargo metadata).
xtask/src/tasks/fmt/mod.rs Drops the VerifyWorkspace fmt pass and module wiring.
xtask/src/tasks/fmt/lints/workspaced.rs Introduces a new lint implementing workspace/member/dependency checks and dependency workspacing validation.
xtask/src/tasks/fmt/lints.rs Registers the new lint and adjusts error logging to use self.path.

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