mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
Merge branch 'unstable' into agents/daily/perf-agent-2026-02-15-3720994187998550610
This commit is contained in:
287 files changed
+243764
-7024
No files matched your search
+21
-5
@@ -56,7 +56,9 @@ for (const glob of IGNORED_GLOBS) {
|
||||
|
||||
// We rely on 'git' being available and 'git grep' supporting -P.
|
||||
// Typically available in most CI/dev environments.
|
||||
const result = spawnSync('git', gitArgs, { encoding: 'utf8' });
|
||||
// Increase maxBuffer to 10MB to avoid ENOBUFS on large outputs.
|
||||
console.log("Running git with args:", gitArgs.join(" "));
|
||||
const result = spawnSync('git', gitArgs, { encoding: 'utf8', maxBuffer: 1024 * 1024 * 10 });
|
||||
|
||||
if (result.error) {
|
||||
console.error('Failed to execute git grep:', result.error.message);
|
||||
@@ -69,10 +71,24 @@ if (result.error) {
|
||||
// 2+ on errors.
|
||||
|
||||
if (result.status === 0 && result.stdout.trim()) {
|
||||
console.error('Hex colors detected outside tokens or SVG assets:');
|
||||
console.error(result.stdout.trimEnd());
|
||||
console.error('\nAllowed exceptions: tokens (css/tokens.css) and vector logos (*.svg).');
|
||||
process.exit(1);
|
||||
const lines = result.stdout.trim().split('\n');
|
||||
|
||||
// Robust filtering: If git grep exclusion fails (e.g. in some CI environments),
|
||||
// we filter out known ignored files here.
|
||||
const filteredLines = lines.filter(line => {
|
||||
// Output format is filename:line:content...
|
||||
// We just check if the line starts with a known ignored file.
|
||||
if (line.startsWith('js/webtorrent.min.js')) return false;
|
||||
if (line.startsWith('perf/hits-')) return false;
|
||||
return true;
|
||||
});
|
||||
|
||||
if (filteredLines.length > 0) {
|
||||
console.error('Hex colors detected outside tokens or SVG assets:');
|
||||
console.error(filteredLines.join('\n'));
|
||||
console.error('\nAllowed exceptions: tokens (css/tokens.css) and vector logos (*.svg).');
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if (result.status && result.status !== 1) {
|
||||
|
||||
Reference in new issue
Block a user