Skip to content

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

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

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