Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR stabilizes inline linting for spirit migrate by renaming/remodeling flags away from “experimental”, simplifying the migrate-time lint configuration surface, and updating docs/tests accordingly.
Changes:
- Add
--lintand--lint-onlyflags tospirit migrate, and run inline linting only when those flags are set. - Remove experimental linter enable/disable and config parsing from migrate-time linting.
- Update docs and migration lint tests to use the stable flags and revised behavior.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pkg/migration/runner.go | Switches migrate-time lint triggering to --lint / --lint-only and exits early on lint-only. |
| pkg/migration/migration.go | Adds new CLI flags and validates flag combinations. |
| pkg/migration/lint.go | Removes experimental linter config parsing/enabling logic, leaving default settings only. |
| pkg/migration/lint_test.go | Updates tests to use Lint/LintOnly and removes tests for removed config features; adds lint-only implication test. |
| docs/migrate.md | Documents new migrate flags and removes prior “Inline Linting” section describing experimental flags. |
| docs/lint.md | Updates “See Also” link to point at spirit migrate --lint. |
| docs/diff.md | Updates “See Also” link to point at spirit migrate --lint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
aparajon
approved these changes
Mar 2, 2026
|
|
||
| Spirit can optionally run lint checks before executing a migration. This uses the same linting engine as [`spirit lint`](lint.md) and [`spirit diff`](diff.md), but runs inline as part of the migration process. | ||
|
|
||
| ### lint-only |
Collaborator
There was a problem hiding this comment.
Is this option any different than using spirit lint by itself?
Collaborator
Author
There was a problem hiding this comment.
Not materially. The use case is I can see someone wanting to use the same command but first pre-checking it with lint-only for errors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Pull Request should be associated with an Issue.
Fixes #446
This renames the lint options so they are no longer experimental. Importantly, it also removes linter configuration (for now) which I think could be controversial. Let me explain that decision: