Skip to content

Exclude test sources from FindApiCalls recipe#989

Merged
timtebeek merged 1 commit intomainfrom
tim/fix-428
Apr 8, 2026
Merged

Exclude test sources from FindApiCalls recipe#989
timtebeek merged 1 commit intomainfrom
tim/fix-428

Conversation

@timtebeek
Copy link
Copy Markdown
Member

Summary

  • Fixes Find API calls recipe returns test results #428FindApiCalls was returning results from test source sets where RestTemplate calls are typically mocked
  • Wraps the visitor with Preconditions.check(new InJavaSourceSet<>("main"), ...) so only main sources are searched
  • Adds a doesNotMatchTestSources test verifying that test source set files are skipped

@github-project-automation github-project-automation bot moved this to In Progress in OpenRewrite Apr 8, 2026
@timtebeek timtebeek merged commit a84a600 into main Apr 8, 2026
1 check passed
@timtebeek timtebeek deleted the tim/fix-428 branch April 8, 2026 15:52
@github-project-automation github-project-automation bot moved this from In Progress to Done in OpenRewrite Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Find API calls recipe returns test results

1 participant