Skip to content

Commit

Permalink
Re-introduce test code
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan202 authored and rickie committed Nov 24, 2022
1 parent b4d1479 commit bfcbc3b
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pitest-analyze-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,29 @@ jobs:
with:
name: pitest-reports
path: ./target/pit-reports-ci

# XXX: Drop the job below. Here only for testing purposes.
update-pr:
permissions:
actions: read
checks: write
contents: read
pull-requests: write
needs: analyze-pr
runs-on: ubuntu-22.04
steps:
- name: Check out code
uses: actions/[email protected]
- name: Set up JDK
uses: actions/[email protected]
with:
java-version: 17
distribution: temurin
cache: maven
- name: Download Pitest analysis artifact
uses: actions/[email protected]
with:
name: pitest-reports
path: ./target/pit-reports-ci
- name: Update PR
run: mvn -DrepoToken="${{ secrets.GITHUB_TOKEN }}" pitest-github:updatePR
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState
return Description.NO_MATCH;
}

if (state.getSourceForNode(tree).equals("XXX")) {
return Description.NO_MATCH;
}

if (state.getSourceForNode(tree).equals("YYY")) {
return Description.NO_MATCH;
}

return getPotentiallyBoxedReturnType(tree.getArguments().get(0))
.flatMap(cmpType -> attemptMethodInvocationReplacement(tree, cmpType, isStatic, state))
.map(fix -> describeMatch(tree, fix))
Expand Down

0 comments on commit bfcbc3b

Please sign in to comment.