Skip to content

Conversation

@marschattha
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 29, 2025 15:40
@github-actions
Copy link
Contributor

No issue mentions found. Please mention an issue in the pull request description.

Use GitHub automation to close the issue when a PR is merged

Copy link
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 pull request refactors the issue transformation system by:

  • Changing transform_batch signature to accept a reference (&Vec<Issue>) instead of taking ownership
  • Moving shared transformation logic (IssueMuter, triage handling, ignore rules) into a new BasicTransformations trait in qlty-analysis
  • Moving source_reader and issue_muter modules from qlty-check to qlty-analysis for better code organization
  • Applying basic transformations consistently across check, build, and smells commands
  • Updating test expectations to reflect new triage behavior affecting issue ordering

Reviewed Changes

Copilot reviewed 24 out of 26 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
qlty-config/src/config/issue_transformer.rs Updated trait and tests to use reference parameter
qlty-check/src/report.rs Implemented BasicTransformations trait
qlty-check/src/planner.rs Removed duplicate triage/muter logic now in BasicTransformations
qlty-check/src/lib.rs Removed modules moved to qlty-analysis
qlty-check/src/llm/fixer.rs Updated signature to match trait
qlty-check/src/executor.rs Updated call site to pass reference
qlty-analysis/src/basic_transformations.rs New trait centralizing transformation logic
qlty-analysis/src/source_reader.rs Moved from qlty-check
qlty-analysis/src/issue_muter.rs Moved from qlty-check with minor formatting updates
qlty-analysis/src/workspace_reader.rs New wrapper for workspace-level file reading
qlty-analysis/src/report.rs Implemented BasicTransformations trait with commented-out duplicate code
qlty-cli/src/commands/*.rs Applied basic transformations to reports
Test files Updated expectations for new behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

}

fn transform_batch(&self, issues: Vec<Issue>) -> Vec<Issue> {
fn transform_batch(&self, issues: &Vec<Issue>) -> Vec<Issue> {
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The parameter type &Vec<Issue> should be &[Issue] instead. Using a slice reference is more idiomatic in Rust as it's more flexible (accepts both Vec and array references) and is the standard convention for borrowed sequences.

Suggested change
fn transform_batch(&self, issues: &Vec<Issue>) -> Vec<Issue> {
fn transform_batch(&self, issues: &[Issue]) -> Vec<Issue> {

Copilot uses AI. Check for mistakes.

impl IssueTransformer for Fixer {
fn transform_batch(&self, issues: Vec<Issue>) -> Vec<Issue> {
fn transform_batch(&self, issues: &Vec<Issue>) -> Vec<Issue> {
Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

The parameter type &Vec<Issue> should be &[Issue] instead. Using a slice reference is more idiomatic in Rust as it's more flexible (accepts both Vec and array references) and is the standard convention for borrowed sequences.

Suggested change
fn transform_batch(&self, issues: &Vec<Issue>) -> Vec<Issue> {
fn transform_batch(&self, issues: &[Issue]) -> Vec<Issue> {

Copilot uses AI. Check for mistakes.
Comment on lines 89 to 107
// });
// }
// }

// triages
// }

// pub fn apply_basic_issue_transformations(
// &mut self,
// workspace_root: &Path,
// qlty_config: &QltyConfig,
// ) {
// // Remove issues without location
// let transformers = self.compute_transformers(workspace_root, qlty_config);
// for transformer in transformers {
// self.transform_issues(transformer);
// }
// }

Copy link

Copilot AI Oct 29, 2025

Choose a reason for hiding this comment

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

Remove commented-out code. This large block of commented code (lines 37-106) appears to be duplicate logic that was moved to BasicTransformations trait. Commented code should be removed to improve maintainability; the old implementation can be retrieved from version control if needed.

Suggested change
// });
// }
// }
// triages
// }
// pub fn apply_basic_issue_transformations(
// &mut self,
// workspace_root: &Path,
// qlty_config: &QltyConfig,
// ) {
// // Remove issues without location
// let transformers = self.compute_transformers(workspace_root, qlty_config);
// for transformer in transformers {
// self.transform_issues(transformer);
// }
// }

Copilot uses AI. Check for mistakes.
@qltysh
Copy link
Contributor

qltysh bot commented Oct 29, 2025

1 new issue

Tool Category Rule Count
qlty Structure High total complexity (count = 59) 1

@qltysh
Copy link
Contributor

qltysh bot commented Oct 29, 2025

Diff Coverage for ubuntu-latest: The code coverage on the diff in this pull request is 95.7%.

Total Coverage for ubuntu-latest: This PR will decrease coverage by 0.03%.

File Coverage Changes
Path File Coverage Δ Indirect
qlty-analysis/src/basic_transformations.rs 100.0
qlty-analysis/src/issue_muter.rs 97.2
qlty-analysis/src/report.rs 2.3
qlty-analysis/src/source_reader.rs 100.0
qlty-analysis/src/workspace_reader.rs 76.9
qlty-check/src/executor/driver.rs -0.2
qlty-check/src/issue_muter.rs -99.1
qlty-check/src/planner.rs -1.3
qlty-check/src/report.rs 1.4
qlty-check/src/source_reader.rs -100.0
qlty-cli/src/auth/auth_flow.rs -0.6
qlty-cli/src/commands/build.rs 0.0
qlty-cli/src/commands/check.rs 0.2
qlty-cli/src/commands/smells.rs 0.1
qlty-config/src/config/ignore.rs 6.1
qlty-config/src/config/triage.rs -13.2
qlty-coverage/src/ci/github.rs -0.3
qlty-types/src/lib.rs -0.4
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@qltysh
Copy link
Contributor

qltysh bot commented Oct 29, 2025

Diff Coverage for macos-15: The code coverage on the diff in this pull request is 95.7%.

Total Coverage for macos-15: This PR will decrease coverage by 0.03%.

File Coverage Changes
Path File Coverage Δ Indirect
qlty-analysis/src/basic_transformations.rs 100.0
qlty-analysis/src/issue_muter.rs 97.2
qlty-analysis/src/report.rs 26.7
qlty-analysis/src/source_reader.rs 100.0
qlty-analysis/src/workspace_reader.rs 76.9
qlty-check/src/executor/driver.rs -0.2
qlty-check/src/issue_muter.rs -99.1
qlty-check/src/planner.rs -1.3
qlty-check/src/report.rs 1.4
qlty-check/src/source_reader.rs -100.0
qlty-cli/src/commands/build.rs 0.0
qlty-cli/src/commands/check.rs 0.2
qlty-cli/src/commands/smells.rs 0.1
qlty-config/src/config/ignore.rs 6.1
qlty-config/src/config/triage.rs -13.2
qlty-config/src/library.rs -0.5
qlty-coverage/src/ci/github.rs -0.3
qlty-types/src/lib.rs -0.4
🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@marschattha marschattha requested a review from brynary October 30, 2025 13:16
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