* Checks if a definitions string is actually an error message from tree-sitter * rather than valid code definitions. These error strings should not be embedded * in the folded file context - instead, the file should be skipped.
(definitions: string)
| 8 | * in the folded file context - instead, the file should be skipped. |
| 9 | */ |
| 10 | function isTreeSitterErrorString(definitions: string): boolean { |
| 11 | // These are known error messages from parseSourceCodeDefinitionsForFile |
| 12 | const errorPatterns = ["This file does not exist", "do not have permission", "Unsupported file type:"] |
| 13 | return errorPatterns.some((pattern) => definitions.includes(pattern)) |
| 14 | } |
| 15 | |
| 16 | /** |
| 17 | * Result of generating folded file context. |
no outgoing calls
no test coverage detected