Skip to content

[lint] Add migration linting with static and runtime rules - #8

Open
drycode wants to merge 2 commits into
dy/introspectfrom
dy/migration-linting
Open

[lint] Add migration linting with static and runtime rules#8
drycode wants to merge 2 commits into
dy/introspectfrom
dy/migration-linting

Conversation

@drycode

@drycode drycode commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

drycode added 2 commits March 5, 2026 17:38
Implements `ch-migrate lint` (static-only, CI-friendly) and
`ch-migrate lint <env>` (static + runtime with live DB).

Static rules: DestructiveChangeRule, IdempotencyRule,
ReservedWordRule, MissingOnClusterRule.
Runtime rules: LargeTableMutationRule, MVDependencyRule.

Rules are configurable (warn/error/off) via config.yaml lint
section. Exit code 0 = clean, 1 = errors found.

Solves: DRY-22 Phase 4 migration linting
Tests: 44 tests covering all rules, config, and integration
Adds three analysis modules (deps, diff, hooks) supporting the
migration linting framework, along with CLI commands and display
integration. Includes tests for all three modules plus snapshot
testing.

Solves: Core linting infrastructure for static and runtime analysis
Tests: test_deps, test_diff, test_hooks, test_snapshot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant