Skip to content

Enhance ScopeToPullRequest to validate only changed lines in PR#52

Merged
ajeckmans merged 12 commits intomainfrom
scope-to-pull-request-changed-lines
Jan 30, 2026
Merged

Enhance ScopeToPullRequest to validate only changed lines in PR#52
ajeckmans merged 12 commits intomainfrom
scope-to-pull-request-changed-lines

Conversation

@ajeckmans
Copy link
Owner

This PR enhances the ScopeToPullRequest feature to not only limit the format check to files in the PR, but also to only check formatting issues on the lines that have actually changed in the PR. This is particularly useful for files with conditional compilation blocks or other platform-specific code that might have formatting issues that are not relevant to the current changes.

Changes made:

  1. Updated the PullRequestFileChange type to include an array of line numbers that have changed in the file
  2. Modified the getPullRequestChanges method to include the inlineChangedLines=true parameter
  3. Updated the getChangedFilesInPR function to extract and include line changes in PullRequestFileChange objects
  4. Enhanced the runFormatCheck function to filter format check results to only include issues in the changed lines
  5. Added tests to verify the new functionality
  6. Updated the README to document the enhanced feature

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
D Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@sonarqubecloud
Copy link

@ajeckmans ajeckmans merged commit 0512c75 into main Jan 30, 2026
3 of 4 checks passed
@ajeckmans ajeckmans deleted the scope-to-pull-request-changed-lines branch January 30, 2026 22:58
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