Skip to main content

LINT.SKIPPED — the run ended without linting anything

  • Category: safety
  • Level: 0
  • Stability: stable
  • Suites: lint

A run can finish having linted nothing, and there are several ordinary ways to get there. This page covers all of them, because what a reader needs to know is the same in every case: why a run can end without having examined a single migration.

The concrete finding reports as LINT.SKIPPED.<reason> — the reason is part of the id, so the report says which of these happened rather than leaving you to guess.

The reasons​

  • Nothing pending. Every migration has already run. This is the common one, and on a CI job that migrates before linting it is usually a sign the steps are in the wrong order.
  • The path matched nothing. A --path pointing at a directory with no migrations in it, or a --file that does not exist.
  • Capture produced nothing. The migration ran under pretend and emitted no statements — a migration whose up() is empty, or one whose work is entirely result-dependent and therefore invisible to pretend. The second case is reported as undetermined in its own right by the CAP.PRESCAN.* family.

Why it is a finding rather than a silent zero​

Same argument as LINT.NO_ACTIVE_RULES, arrived at from the other side: a run with nothing to lint and a run whose migrations are all clean produce identical output. One of those means your pipeline is not checking anything, and it is worth an explicit sentence.

One page for the whole family​

The id is a family — LINT.SKIPPED.NO_MIGRATION_TABLE, LINT.SKIPPED.MIGRATION_TABLE_UNREADABLE, LINT.SKIPPED.CONNECTION_UNREACHABLE, LINT.SKIPPED.EMPTY_MIGRATION_PATH, LINT.SKIPPED.ONLY_VENDOR_MIGRATIONS, LINT.SKIPPED.MISSING_TOOL — and the registry records that explicitly, so the completeness check does not go looking for a page per reason. LINT.SKIPPED.MISSING_TOOL is the one exception with a page of its own, because its remedy is entirely different.

LINT.SKIPPED.ONLY_VENDOR_MIGRATIONS is the one whose remedy is a setting rather than a repair: every pending migration lives inside a package, and this run does not judge those. Turn security.include_vendor_migrations on if you want them, or name the path with --path. It is reported rather than passed off as a clean run for the reason at the top of this page — a run that looked at nothing must never read like a run that found nothing.

LINT.SKIPPED.MIGRATION_TABLE_UNREADABLE is a missing privilege, and it is undetermined with the reason missing_privilege. The migration table exists, and the role the run reads as may not read its rows, which is the usual state of a read-only role made for the preflight. The finding names the statement that fixes it, with the table and the role the server reported:

GRANT SELECT ON migrations TO sqlens_preflight;

The grant can only be given once the first migrate has created the table. On PostgreSQL the table's owner gives it, which is the role your migrations run as; on MySQL an account allowed to grant it does. The permissions page lists it with the rest of the role.

On MySQL, an account that holds no privilege at all on the table does not see it in information_schema either, so the run reports LINT.SKIPPED.NO_MIGRATION_TABLE for it. The grant above cures both.