Skip to content

fix: enable qlty-ignore comments for structure issues#2492

Open
marschattha wants to merge 4 commits intomainfrom
ma/enable_qlty_ignore_comments_for_smells
Open

fix: enable qlty-ignore comments for structure issues#2492
marschattha wants to merge 4 commits intomainfrom
ma/enable_qlty_ignore_comments_for_smells

Conversation

@marschattha
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 29, 2025 13:10
@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 PR adds support for inline issue muting using qlty-ignore comments in the structure smell checker. The key changes involve moving shared functionality to common locations and integrating issue transformation logic into the structure analysis pipeline.

  • Moves SourceReader trait and IssueMuter from qlty-check to qlty-analysis for shared use
  • Adds transformer support to the structure smell detection pipeline to apply ignore rules, triages, and deprecated overrides
  • Introduces a Workspace abstraction in qlty-smells to handle source file reading with proper path resolution

Reviewed Changes

Copilot reviewed 20 out of 22 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
qlty-analysis/src/source_reader.rs Moved from qlty-check; provides trait and filesystem implementation for reading source files
qlty-analysis/src/issue_muter.rs Moved from qlty-check; implements inline comment-based issue suppression using tree-sitter
qlty-smells/src/structure/workspace.rs New workspace abstraction for path-aware source reading in structure checker
qlty-smells/src/structure/planner.rs Extended to compute issue transformers including ignore rules, muting, and triage logic
qlty-smells/src/structure/plan.rs Added transformers field to store issue transformation pipeline
qlty-smells/src/structure/executor.rs Applies transformers to issues after checking
qlty-check/src/planner.rs Updated import to use moved IssueMuter from qlty-analysis
qlty-cli/tests/cmd/smells/structure.in/returns.js Test file updated with qlty-ignore comment
qlty-cli/tests/cmd/smells/structure.stdout Expected test output reflecting ignored function parameters issue

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

@qltysh
Copy link
Contributor

qltysh bot commented Oct 29, 2025

2 new issues

Tool Category Rule Count
qlty Structure High total complexity (count = 59) 1
qlty Duplication Found 34 lines of identical code in 2 locations (mass = 179) 1

}
}

triages
Copy link
Contributor

Choose a reason for hiding this comment

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

Found 34 lines of identical code in 2 locations (mass = 179) [qlty:identical-code]

@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 67.9%.

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

File Coverage Changes
Path File Coverage Δ Indirect
qlty-analysis/src/issue_muter.rs 99.3
qlty-analysis/src/source_reader.rs 100.0
qlty-check/src/issue_muter.rs -99.1
qlty-check/src/source_reader.rs -100.0
qlty-cli/src/commands/build.rs 0.1
qlty-cli/src/commands/smells.rs 0.5
qlty-config/src/config/ignore.rs 6.1
qlty-config/src/library.rs -0.5
qlty-coverage/src/ci/github.rs -0.3
qlty-smells/src/structure/planner.rs -3.2
qlty-smells/src/structure/workspace.rs 76.9
🛟 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 67.9%.

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

File Coverage Changes
Path File Coverage Δ Indirect
qlty-analysis/src/issue_muter.rs 99.3
qlty-analysis/src/source_reader.rs 100.0
qlty-check/src/issue_muter.rs -99.1
qlty-check/src/source_reader.rs -100.0
qlty-cli/src/commands/build.rs 0.1
qlty-cli/src/commands/smells.rs 0.5
qlty-config/src/config/ignore.rs 6.1
qlty-coverage/src/ci/github.rs -0.3
qlty-smells/src/structure/planner.rs -3.2
qlty-smells/src/structure/workspace.rs 76.9
🛟 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 29, 2025 13:38
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