Repository navigation
feat: add the alint action - #1
Merged
Merged
Conversation
The action installs alint, writes the provider configuration, and restores the cache. Then it lints the changed files of a pull request and keeps the findings on changed lines. It publishes a check run with line annotations, one summary comment, and a job summary. The check run fails only when a finding is an error. Co-authored-by: Neko Ayaka <neko@ayaka.moe> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
| Location | Rule | Finding | |
|---|---|---|---|
test/fixture/src/add.ts:2 |
fixture/no-fixme |
A FIXME note is in the changed code. 💡 Resolve the note or remove it. |
Commit 83899e7 · run · 0 tokens
The publication flow follows the report script that LobeHub wrote for its monorepo. Co-authored-by: Arvin Xu <28616219+arvinxx@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
A repository that runs
alintin CI must write its own steps to install the CLI, select the changes of a pull request, and show the result. This PR adds a composite action that does these steps.The action publishes a check run with line annotations, one summary comment that each run rewrites, and a job summary. It replaces alint-dev/alint#94, which put the publication logic in the CLI.
Change map
action.ymlalint, writes the provider configuration, installs plugins, restores.alintcache, and runs the bundle.src/main.tsalint, and publishes.src/changes.tssrc/lint.ts,src/output.tsalint --format jsonand validate the output with Valibot.src/findings.tssrc/github.tsdist/index.mjsBehavior
HEAD.GITHUB_SHAis the temporary merge commit there.failurefor an error,neutralfor warnings only, andsuccessfor no findings. The step fails only whenalintexits with 2 or GitHub rejects a request.Boundaries and risks
main.test.tswith 120 diagnosticsfindings.test.tsalint setupwrites one model without an alias or a size. A rule that requests a model by size can fail to resolve it.e2ejob runs the action on this pull request.alint (fixture)check and the summary comment on this pull request.Verification
pnpm test:run: 17 tests passed.main.test.tsruns the full flow against a local HTTP server and a program that stands in foralint. It uses no mocks.pnpm typecheck: passed.pnpm lint: passed.pnpm build: wrotedist/index.mjs.alint0.7.3 ontest/fixture/src/add.ts: reported thefixture/no-fixmewarning on line 2.🤖 Generated with Claude Code