(diff: DiffLine[])
| 100 | |
| 101 | const REMOVAL_PERCENTAGE_THRESHOLD = 0.3; |
| 102 | function shouldRejectDiff(diff: DiffLine[]): boolean { |
| 103 | const numRemovals = diff.filter((line) => line.type === "old").length; |
| 104 | if (numRemovals / diff.length > REMOVAL_PERCENTAGE_THRESHOLD) { |
| 105 | return true; |
| 106 | } |
| 107 | return false; |
| 108 | } |
| 109 | |
| 110 | function nodeSurroundedInLazyBlocks( |
| 111 | parser: Parser, |
no outgoing calls
no test coverage detected