Commit f58d089
committed
Override isAcceptable in ChangeDependency outer visitor
The conversion to ScanningRecipe in #6858 introduced a wrapper
TreeVisitor that did not override isAcceptable(), causing it to
inherit the default TreeVisitor.isAcceptable() which returns true
for all files. This made every Gradle recipe's isAcceptable check
pass for non-Gradle files like plain text and Java sources.
Add isAcceptable() to the outer visitor that checks for the
GradleProject marker for Gradle files and accepts only
gradle.properties for Properties files.1 parent 3e403bf commit f58d089
2 files changed
Lines changed: 29 additions & 0 deletions
File tree
- rewrite-gradle/src
- main/java/org/openrewrite/gradle
- test/java/org/openrewrite/gradle
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
467 | 475 | | |
468 | 476 | | |
469 | 477 | | |
| |||
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
20 | 24 | | |
21 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
| |||
1061 | 1068 | | |
1062 | 1069 | | |
1063 | 1070 | | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
1064 | 1085 | | |
0 commit comments