/** * Validate Modified Methods Executor * * Validates that modified methods don't exceed a maximum line count (default 80). * This encourages gradual cleanup of legacy long methods - when you touch a method, * you must bring it under the limit. * * Combined with validate-new-methods, this creates a gradual * transition to cleaner code: * - New methods: must be under limit * - Modified methods: must be under limit (cleanup when touched) * - Untouched methods: no limit (legacy allowed) * * Usage: * nx affected --target=validate-modified-methods --base=origin/main * * Escape hatch: Add webpieces-disable max-lines-modified comment with date and justification * Format: // webpieces-disable max-lines-modified 2025/01/15 -- [reason] * The disable expires after 1 month from the date specified. */ import type { ExecutorContext } from '@nx/devkit'; export type MethodMaxLimitMode = 'OFF' | 'NEW_METHODS' | 'NEW_AND_MODIFIED_METHODS' | 'MODIFIED_FILES'; export interface ValidateModifiedMethodsOptions { limit?: number; mode?: MethodMaxLimitMode; disableAllowed?: boolean; } export interface ExecutorResult { success: boolean; } export default function runExecutor(options: ValidateModifiedMethodsOptions, context: ExecutorContext): Promise;