Skip to content

Add local lint option#5876

Open
EthanVieira wants to merge 5 commits into
SQLMesh:mainfrom
EthanVieira:local-lint-option
Open

Add local lint option#5876
EthanVieira wants to merge 5 commits into
SQLMesh:mainfrom
EthanVieira:local-lint-option

Conversation

@EthanVieira

@EthanVieira EthanVieira commented Jul 1, 2026

Copy link
Copy Markdown

Description

As mentioned in #5182, the lint command still requires the remote state to resolve references in the multi-repo case. These changes add an optional --local option to the lint command so it is runnable without a reachable state backend. This is useful for faster lint iterations in repositories where all referenced models are available locally.

In multi-repo setups, or when linting only a subset of projects, --local may produce additional linting errors because SQLMesh will not resolve references or schemas from models that exist only in remote state.

Updated the linter guide and CLI reference to document the new flag and caveat.

Resolves: #5182

Test Plan

  • Added CLI test coverage for sqlmesh lint --local to verify Context is constructed with load_state=False and state sync is not accessed.

Checklist

  • I have run make style and fixed any issues
  • I have added tests for my changes (if applicable)
  • All existing tests pass (make fast-test)
  • My commits are signed off (git commit -s) per the DCO
evieira and others added 5 commits July 1, 2026 11:07
Signed-off-by: evieira <t01etvi@tryg.dk>
Signed-off-by: evieira <t01etvi@tryg.dk>
Signed-off-by: evieira <t01etvi@tryg.dk>
Signed-off-by: evieira <t01etvi@tryg.dk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants