惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园 - 司徒正美
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
大猫的无限游戏
大猫的无限游戏
博客园 - Franky
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
爱范儿
爱范儿
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园_首页
有赞技术团队
有赞技术团队
WordPress大学
WordPress大学
宝玉的分享
宝玉的分享
V
V2EX
V
Visual Studio Blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
量子位
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
Target changed lint checks (#94708) · openclaw/openclaw@8...
RomneyDa · 2026-06-25 · via Recent Commits to openclaw:main

@@ -49,10 +49,19 @@ const RUNTIME_SIDECAR_BASELINE_PATH_RE =

4949

const CANVAS_A2UI_NATIVE_RESOURCE_PATH_RE =

5050

/^(?:pnpm-lock\.yaml$|apps\/shared\/OpenClawKit\/Sources\/OpenClawKit\/Resources\/CanvasA2UI\/|extensions\/canvas\/(?:package\.json$|scripts\/bundle-a2ui\.mjs$|src\/host\/a2ui(?:\/(?:index\.html|a2ui\.bundle\.js|\.bundle\.hash)$|-app\/))|scripts\/(?:bundle-a2ui|sync-native-a2ui)\.mjs$)/u;

5151

const CORE_OXLINT_TS_CONFIG = "config/tsconfig/oxlint.core.json";

52-

const TARGETED_CORE_LINT_PATH_LIMIT = 8;

52+

const EXTENSIONS_OXLINT_TS_CONFIG = "config/tsconfig/oxlint.extensions.json";

53+

const SCRIPTS_OXLINT_TS_CONFIG = "config/tsconfig/oxlint.scripts.json";

54+

const TARGETED_LINT_PATH_LIMIT = 8;

5355

const LINTABLE_CORE_PATH_RE = /^(?:src|ui|packages)\/.+\.[cm]?[jt]sx?$/u;

56+

const LINTABLE_EXTENSION_PATH_RE = /^extensions\/[^/]+\/.+\.[cm]?[jt]sx?$/u;

57+

const LINTABLE_SCRIPT_PATH_RE = /^scripts\/.+\.[cm]?[jt]sx?$/u;

58+

const MARKDOWN_LINT_OPTIMIZATION_NEUTRAL_PATH_RE = /^(?:docs\/|README\.md$|.*\.mdx?$)/u;

5459

const CORE_LINT_OPTIMIZATION_NEUTRAL_PATH_RE =

5560

/^(?:scripts|test\/scripts)\/|^\.github\/workflows\/ci\.yml$/u;

61+

const EXTENSION_LINT_OPTIMIZATION_NEUTRAL_PATH_RE =

62+

/^(?:test\/scripts\/|\.github\/workflows\/ci\.yml$)/u;

63+

const SCRIPT_LINT_OPTIMIZATION_NEUTRAL_PATH_RE =

64+

/^(?:test\/scripts\/|\.github\/workflows\/ci\.yml$)/u;

5665

const ANDROID_VERSION_SYNC_PATHS = new Set([

5766

"apps/android/CHANGELOG.md",

5867

"apps/android/Config/Version.properties",

@@ -413,10 +422,32 @@ export function createChangedCheckPlan(result, options = {}) {

413422

addLint("lint core", ["lint:core"]);

414423

}

415424

if (lanes.extensions || lanes.extensionTests) {

416-

addLint("lint extensions", ["lint:extensions"]);

425+

const extensionLintCommand = createTargetedExtensionLintCommand(result.paths, baseEnv);

426+

if (extensionLintCommand) {

427+

addCommand(

428+

extensionLintCommand.name,

429+

extensionLintCommand.bin,

430+

extensionLintCommand.args,

431+

extensionLintCommand.env,

432+

);

433+

} else {

434+

addLint("lint extensions", ["lint:extensions"]);

435+

}

417436

}

418437

if (lanes.tooling || lanes.liveDockerTooling) {

419-

addLint("lint scripts", ["lint:scripts"]);

438+

const scriptLintCommand = createTargetedScriptLintCommand(result.paths, baseEnv);

439+

if (scriptLintCommand) {

440+

addLint("lint docker-e2e", ["lint:docker-e2e"]);

441+

addLint("raw HTTP/2 import guard", ["lint:tmp:no-raw-http2-imports"]);

442+

addCommand(

443+

scriptLintCommand.name,

444+

scriptLintCommand.bin,

445+

scriptLintCommand.args,

446+

scriptLintCommand.env,

447+

);

448+

} else {

449+

addLint("lint scripts", ["lint:scripts"]);

450+

}

420451

}

421452

if (lanes.apps && shouldSkipAppLintForMissingSwiftlint({ ...options, env: baseEnv })) {

422453

addCommand(

@@ -466,29 +497,73 @@ export function createChangedCheckPlan(result, options = {}) {

466497

}

467498468499

export function createTargetedCoreLintCommand(paths, env = process.env, options = {}) {

500+

return createTargetedOxlintCommand({

501+

env,

502+

label: "core",

503+

lintablePathRe: LINTABLE_CORE_PATH_RE,

504+

neutralPathRe: CORE_LINT_OPTIMIZATION_NEUTRAL_PATH_RE,

505+

paths,

506+

tsconfig: CORE_OXLINT_TS_CONFIG,

507+

...options,

508+

});

509+

}

510+511+

export function createTargetedExtensionLintCommand(paths, env = process.env, options = {}) {

512+

return createTargetedOxlintCommand({

513+

env,

514+

label: "extension",

515+

lintablePathRe: LINTABLE_EXTENSION_PATH_RE,

516+

neutralPathRe: EXTENSION_LINT_OPTIMIZATION_NEUTRAL_PATH_RE,

517+

paths,

518+

tsconfig: EXTENSIONS_OXLINT_TS_CONFIG,

519+

...options,

520+

});

521+

}

522+523+

export function createTargetedScriptLintCommand(paths, env = process.env, options = {}) {

524+

return createTargetedOxlintCommand({

525+

env,

526+

label: "script",

527+

lintablePathRe: LINTABLE_SCRIPT_PATH_RE,

528+

neutralPathRe: SCRIPT_LINT_OPTIMIZATION_NEUTRAL_PATH_RE,

529+

paths,

530+

tsconfig: SCRIPTS_OXLINT_TS_CONFIG,

531+

...options,

532+

});

533+

}

534+535+

function createTargetedOxlintCommand({

536+

env = process.env,

537+

fileExists = existsSync,

538+

label,

539+

lintablePathRe,

540+

neutralPathRe,

541+

paths,

542+

tsconfig,

543+

}) {

469544

if (

470545

paths.some(

471546

(changedPath) =>

472-

!LINTABLE_CORE_PATH_RE.test(changedPath) &&

473-

!CORE_LINT_OPTIMIZATION_NEUTRAL_PATH_RE.test(changedPath),

547+

!lintablePathRe.test(changedPath) &&

548+

!neutralPathRe.test(changedPath) &&

549+

!MARKDOWN_LINT_OPTIMIZATION_NEUTRAL_PATH_RE.test(changedPath),

474550

)

475551

) {

476552

return null;

477553

}

478554

const targets = paths

479-

.filter((changedPath) => LINTABLE_CORE_PATH_RE.test(changedPath))

555+

.filter((changedPath) => lintablePathRe.test(changedPath))

480556

.toSorted((left, right) => left.localeCompare(right));

481-

if (targets.length === 0 || targets.length > TARGETED_CORE_LINT_PATH_LIMIT) {

557+

if (targets.length === 0 || targets.length > TARGETED_LINT_PATH_LIMIT) {

482558

return null;

483559

}

484-

const fileExists = options.fileExists ?? existsSync;

485560

if (!targets.every((target) => fileExists(target))) {

486561

return null;

487562

}

488563

return {

489-

name: targets.length === 1 ? "lint core changed file" : "lint core changed files",

564+

name: targets.length === 1 ? `lint ${label} changed file` : `lint ${label} changed files`,

490565

bin: "node",

491-

args: ["scripts/run-oxlint.mjs", "--tsconfig", CORE_OXLINT_TS_CONFIG, ...targets],

566+

args: ["scripts/run-oxlint.mjs", "--tsconfig", tsconfig, ...targets],

492567

env,

493568

};

494569

}

@@ -544,6 +619,11 @@ function printPlan(result, plan, options) {

544619

for (const reason of result.reasons) {

545620

console.error(`${prefix} ${reason}`);

546621

}

622+

if (options.dryRun) {

623+

for (const command of plan.commands) {

624+

console.error(`${prefix} would run: ${formatPlanCommand(command)}`);

625+

}

626+

}

547627

}

548628549629

async function runPnpm(command, timings) {

@@ -557,6 +637,15 @@ async function runPlanCommand(command, timings) {

557637

return await runPnpm(command, timings);

558638

}

559639640+

function formatPlanCommand(command) {

641+

const argv = command.bin ? [command.bin, ...command.args] : ["pnpm", ...command.args];

642+

return argv.map(formatShellToken).join(" ");

643+

}

644+645+

function formatShellToken(token) {

646+

return /^[A-Za-z0-9_./:@=-]+$/u.test(token) ? token : `'${token.replaceAll("'", "'\\''")}'`;

647+

}

648+560649

export function createPnpmManagedCommand(command, env = process.env) {

561650

const commandEnv = command.env ?? resolveLocalHeavyCheckEnv(env);

562651

if (isTruthyEnvFlag(commandEnv.CI) || isTruthyEnvFlag(commandEnv.GITHUB_ACTIONS)) {