Files
openclaw/scripts/check-no-conflict-markers.d.mts
efa7e1a85a fix(scripts): bound conflict-marker scan reads to prevent OOM on large files (#104420)
* fix(scripts): bound conflict-marker scan reads to prevent OOM on large files

* test(scripts): add regression test for bounded conflict-marker scan on large files

* fix(scripts): update conflict-marker declaration for bounded scan params

* fix(scripts): bounded exact scan for conflict markers

* fix(scripts): use git grep line-number output for conflict-marker scan

* style(scripts): rename shadowed variable in conflict-marker parser

* ci(scripts): retry build artifacts after plugin-sdk export check flake

* fix(scripts): report tracked conflict-marker paths relative to cwd

* test(scripts): type execFileSync error by stderr shape

* fix(scripts): parse NUL-delimited path before record split in conflict-marker scan

* refactor(scripts): remove obsolete conflict scan helper

* fix(scripts): disable color in conflict marker scan

Co-authored-by: 陈宪彪0668000387 <chen.xianbiao@xydigit.com>

---------

Co-authored-by: Peter Steinberger <steipete@gmail.com>
Co-authored-by: Peter Steinberger <peter@steipete.me>
2026-07-18 12:25:40 +01:00

32 lines
886 B
TypeScript

#!/usr/bin/env node
/**
* Returns one-based line numbers containing merge conflict markers.
*/
export function findConflictMarkerLines(content: string): number[];
/**
* Scans a list of files for merge conflict markers, skipping binary content.
* Intended for direct/small-scale use; the tracked-files path uses git grep
* directly to avoid reading large files into memory.
*/
export function findConflictMarkersInFiles(
filePaths: string[],
readFile?: (path: string) => string | Buffer,
): {
filePath: string;
lines: number[];
}[];
/**
* Uses git grep to find exact conflict-marker matches in tracked files.
*/
export function findConflictMarkersInTrackedFiles(
cwd?: string,
run?: typeof import("node:child_process").spawnSync,
): {
filePath: string;
lines: number[];
}[];
/**
* Runs the merge conflict marker check.
*/
export function main(): Promise<void>;