Skip to content

mark linters stable#635

Merged
morgo merged 5 commits intoblock:mainfrom
morgo:mark-linters-stable
Mar 2, 2026
Merged

mark linters stable#635
morgo merged 5 commits intoblock:mainfrom
morgo:mark-linters-stable

Conversation

@morgo
Copy link
Collaborator

@morgo morgo commented Feb 26, 2026

A Pull Request should be associated with an Issue.

We wish to have discussions in Issues. A single issue may be targeted by multiple PRs.
If you're offering a new feature or fixing anything, we'd like to know beforehand in Issues,
and potentially we'll be able to point development in a particular direction.
Further notes in https://github.com/block/spirit/blob/main/.github/CONTRIBUTING.md

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:

  • We have a philosophy of decisions not options.
  • We know that the levels for linters is not perfect right now. If we allow configuration, we don't get the feedback loop of what to change. I'd prefer to force the conversation.
  • For advanced usage, users can always use the API instead
  • I am fine to revisit this later

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 --lint and --lint-only flags to spirit 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.

morgo and others added 2 commits February 26, 2026 06:52
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@morgo morgo requested a review from aparajon February 26, 2026 14:11

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this option any different than using spirit lint by itself?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@morgo morgo merged commit b369782 into block:main Mar 2, 2026
9 checks passed
@morgo morgo deleted the mark-linters-stable branch March 2, 2026 16:36
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.

Implement native Spirit linting

3 participants