review: harden readonly git checks and lint verification

This commit is contained in:
ejclaw
2026-04-22 20:48:33 +09:00
parent 977d22cea7
commit 12838a8b07
9 changed files with 185 additions and 9 deletions

View File

@@ -11,7 +11,12 @@ import {
} from './workspace-package-manager.js';
import { computeVerificationSnapshotId } from '../shared/verification-snapshot.js';
export const VERIFICATION_PROFILES = ['test', 'typecheck', 'build'] as const;
export const VERIFICATION_PROFILES = [
'test',
'typecheck',
'build',
'lint',
] as const;
export type VerificationProfile = (typeof VERIFICATION_PROFILES)[number];
@@ -91,12 +96,19 @@ export function buildVerificationCommand(
profile: VerificationProfile,
repoDir: string = process.cwd(),
): VerificationCommandSpec {
const scripts = readPackageScripts(repoDir);
const scriptName =
profile === 'test'
? 'test'
: profile === 'typecheck'
? 'typecheck'
: 'build';
: profile === 'build'
? 'build'
: scripts['lint:ci']
? 'lint:ci'
: scripts['lint:check']
? 'lint:check'
: 'lint';
const command = buildWorkspaceScriptCommand(repoDir, scriptName);
return {
file: command.file,