Repository navigation
chore: rename the binary, package and product to jactionlint - #36
Merged
Merged
Conversation
Renames the executable, the Go package, the cmd directory, release archives, the Docker entrypoint, the man page, the download script, the problem matcher and the name used in the docs and help text. The config files (.github/actionlint.yaml, $XDG_CONFIG_HOME/actionlint/) and the '# actionlint ignore=' comment used by the original actionlint are still accepted; the jactionlint names take precedence. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important Review skippedToo many files! This PR contains 157 files, which is 57 over the limit of 100. To get a review, reduce the PR to 100 files or fewer by splitting it into smaller PRs or changing its base branch. Upgrade to a paid plan to raise the limit. ⚙️ Run configuration
⛔ Files ignored due to path filters (8)
📒 Files selected for processing (157)
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 13, 2026
jdx
added a commit
that referenced
this pull request
Oct 13, 2026
## What - **`--completion=bash|zsh|fish|powershell`** prints a completion script. It is generated from the option table (`cliOptions`, so a new option is completed without touching the generator) and from the values the options accept: `--format`, `--profile`, `--min-severity`, `--color`, `--fix`, `--online`, `--completion`, and the rule IDs of the registry for `--ignore`, `--fix-rules` (comma separated list, completes the last element) and `--explain`. Files complete for the file options and, for the arguments, `*.yml`/`*.yaml`. Optional-value options (`--color`, `--fix`, ...) complete as `--color=`. - **`--explain RULE`** (also `--explain=RULE`) prints the summary, group, profile, default level, whether there is a fix, the options (type, default, summary), how to configure the rule and the ignore comment, the URLs, and the section of `docs/checks.md` of the rule (with its examples). `docs/checks.md` is embedded with `go:embed`, so there is no generated file to keep in sync and nothing to conflict between PRs that edit it; the section is found by the `DocsAnchor` of the rule. The Dockerfile copies `docs/checks.md` into the build context for it (the only place that builds from a partial copy of the tree). Unknown ID: exit 2 with the closest ID; a retired ID names the rule it was merged into. - Docs: `docs/usage.md` (sections "Shell completion" and "Explain a rule"), option table, man page. Part of #167 (section 6 "Later": shell completions; #121 lists explain as later; ideas ghalint #17, actionlint #27, zizmor #36 completions part). ## Decisions to review - I did not add a `usage` (usage.jdx.dev) spec: the four shell scripts cover what was asked, and a spec is easy to add on the same option table later (`completionOptions()`), but I did not want to ship a KDL output I cannot keep validated in CI. - The scripts embed the rule IDs of the binary (no call back into jactionlint when completing, so completion is instant); the docs say to regenerate after an upgrade. - The size of the binary grows by `docs/checks.md` (about 400 KB). The wasm playground does not reference the code, so the linker drops it (not measured: I did not build the wasm). ## Tests - `completion_test.go`: every shell mentions every option, every rule ID and the values; the offered values are accepted by the parsers (profile, severity, format, online mode, color, fix); syntax check with the installed `bash -n`, `zsh -n`, `fish --no-execute` (skipped when not installed); a behavior test drives the generated bash function with the variables bash sets (`--format `, `--format=js`, `--profile pe`, `--ignore unpinned-u`, a comma list for `--fix-rules`, `--pro`, `--col`, ...). - By hand (not in CI): fish `complete -C` returns the values, rule IDs and options; zsh loads the script with `compinit` and registers `_jactionlint`; PowerShell 7 `TabExpansion2` completes `--format `, `--profile=pe`, comma lists and rule IDs. zsh completion results were not exercised interactively (it needs a pty). - `explain_test.go`: the output for `missing-timeout`, online and opt-in rules, errors, `--explain=ID`, the section extraction (fences, several anchors in a row, the end at the next heading), and **every rule with a `DocsAnchor` has its section in `docs/checks.md`** (this also guards the anchors of the registry). `go vet`, `go test ./...`, `hk check --all` pass. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > CLI-only additions (completion generation and read-only explain output) with no changes to linting behavior; binary size grows from embedding checks documentation. > > **Overview** > Adds **`--completion=SHELL`** (bash, zsh, fish, PowerShell) to print installable completion scripts derived from `cliOptions` and the rule registry—flags, enumerated option values, rule IDs (including comma-separated lists for `--fix-rules`), and workflow YAML paths. > > Adds **`--explain RULE`** for offline rule help: registry metadata, config/ignore hints, and the matching section from **`docs/checks.md`**, which is **`go:embed`**’d into the binary (Dockerfile updated so container builds include that file). > > Wires both flags in `command.go` before linting runs; documents them in `docs/usage.md` and the man page. Large test suites cover script generation, shell syntax/behavior, and per-rule explain output including anchor alignment with `DocsAnchor`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 19a6b76. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added shell completion scripts for Bash, Zsh, Fish, and PowerShell, including suggestions for options, values, rule IDs, and workflow files. * Added `--explain` to display rule documentation, examples, and profile details without a network connection. Unknown or retired rules provide guidance. * **Documentation** * Updated the usage guide and man page with details on both options. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
jdx
added a commit
that referenced
this pull request
Oct 13, 2026
…orgejo and jujutsu roots (#215) Five small, independent commits (each has its docs and tests; review them one by one). | Commit | What | Item | | --- | --- | --- | | `feat(project)` | A directory with `.jj` (a Jujutsu workspace; a secondary one has no `.git`) is a project root like one with `.git` | actionlint#752 | | `feat(format)` | `--show-doc-urls`: the URL of the rule under each finding of the text format (` = docs: ...`; not with `oneline`) and in the message of the `github` annotation | zizmor `--show-audit-urls` | | `feat(pyflakes)` | `--ruff=CMD`: Python scripts are checked with `ruff check --isolated --no-cache --select F --output-format json -` instead of pyflakes; same rule ID `pyflakes`, message `ruff reported issue in this script: 2:7: F821 ...`. The command must exist (exit 3) | actionlint#439 | | `feat(format)` | `--finding-context`: `events` and `permissions` (the token of the job: its own, or else the workflow's; `{"*": "none"}` for `{}`, `{"*":"write"}` for `write-all`; absent when not configured) on each finding of `json`/`jsonl`/`sarif` (`properties`) | zizmor#1569 | | `feat(config)` | Config key `platform: forgejo\|gitea`: `uses: https://host/owner/repo[/path]@ref` is accepted for steps (form checked, pinning policy applied, no GitHub metadata or online checks); on GitHub (default) it stays the `invalid-uses` error with its message unchanged | actionlint#698 | Part of #167 (section 6 "Later": `--ruff`, Jujutsu workspaces; ideas actionlint #26, #28, #33; zizmor #36 (doc links), #39). ## Skipped: `invalid-shell-name` should mention the `{0}` form (actionlint#530) I implemented it and reverted it: the message is one of the messages that `TestCorrectnessProfileKeepsEveryErrorOfActionlint` asserts verbatim against `testdata/examples/shell_name_validation.out` (an original actionlint fixture), because the correctness profile promises the same messages as actionlint ("Coming from actionlint"). A longer message breaks that promise; the test has an `actionlintExceptions` table which is empty today, and adding its first entry is a decision for the maintainer, so I left the message alone. The doc of the shell name check already has a `shell: 'perl {0}'` example. If you want it, it is a three-line change plus the first exception entry. ## Decisions to review - `--finding-context` and `--show-doc-urls` are opt-in: the fields would otherwise change every `--format json` and SARIF golden and the output of every consumer. - `platform: forgejo` covers steps only (not `jobs.<id>.uses`), because everything else that reads a `uses:` (popular-action data, online lookups, typosquats) assumes GitHub; the docs say so. The pinning policy patterns match `owner/repo` whatever the host is. - `--ruff` replaces pyflakes when given, also when `--pyflakes` is given; `--ruff=` (empty) is the same as not given. ## Tests `project_jj_test.go`, `format_doc_urls_test.go`, `rule_ruff_test.go` (a fake ruff for the arguments, stdin, mapping, broken output and replacing pyflakes; the real ruff 0.17 was run through `JACTIONLINT_TEST_RUFF`: F821, F401, a syntax error and a clean script), `finding_context_test.go` (job vs workflow permissions, `{}`, `write-all`, none configured, sarif, off by default, no context for actions and `dependabot.yml`), `platform_uses_test.go` (forms, malformed values, the policy, stays an error on GitHub, config validation and `extends`). `go vet`, `go test ./...`, `hk check --all` pass. ## Expected follow-ups when merged with the other PRs - The JSON Schema PR (`schema/jactionlint-config.json`, `schema/jactionlint-output.json`) must learn the config key `platform` and the output fields `events` and `permissions` (its tests name the config key; the output fields are optional in the schema, which does not forbid extra fields). - The completions PR picks up `--ruff`, `--show-doc-urls` and `--finding-context` from the option table by itself. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > New opt-in flags and `platform` change how `uses:` and structured output behave for Forgejo/Gitea users; ruff replaces pyflakes when enabled and must exist or the run exits 3. > > **Overview** > Adds several **opt-in CLI and config features** for richer output, Python linting, non-GitHub platforms, and repo discovery. > > **Output:** `--show-doc-urls` adds rule documentation links under text findings and in GitHub annotation messages. `--finding-context` attaches workflow `on:` **events** and job/workflow **token permissions** to each finding in JSON, JSONL, and SARIF (via new `finding_context` plumbing on `Error`). > > **Python:** `--ruff` runs **ruff** (pyflakes `F` rules only, isolated) instead of pyflakes for `shell: python` steps, still reporting rule ID `pyflakes`. > > **Config `platform`:** `forgejo` / `gitea` allow step `uses: https://host/owner/repo@ref` with URL syntax and pinning checks; `forbidden-uses` and `required-actions` treat URL uses as `owner/repo`. Default GitHub behavior is unchanged. > > **Projects:** Repository roots are detected with **`.jj`** (Jujutsu) as well as `.git`. > > Docs, man page, and tests cover each area. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 2d9a58b. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Claude Sonnet 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.
Finishes the rename started in #34, which only changed the module path and URLs. The executable, Go package and name in the docs were still
actionlint.Renamed
actionlint->jactionlint,cmd/actionlint->cmd/jactionlint, and everything that follows from it: release archives (jactionlint_<version>_<os>_<arch>), the Homebrew cask name, the Docker entrypoint,-h/version output, the pre-commit hook ids (jactionlint,jactionlint-docker,jactionlint-system).package actionlint->package jactionlint(90 files), with the qualifier incmd/, scripts, the playground anddocs/api.md.man/jactionlint.1.ronn,scripts/download-jactionlint.bash(and its test),scripts/generate-jactionlint-matcher/,.github/jactionlint-matcher.json(problem matcher owner included).jactionlint.Compatibility, as chosen
.github/jactionlint.yaml/.ymlfirst, then the original.github/actionlint.yaml/.yml; user-global$XDG_CONFIG_HOME/jactionlint/first, then$XDG_CONFIG_HOME/actionlint/.-init-configwrites.github/jactionlint.yaml, and refuses if any of the four names exists. Documented indocs/config.md.# jactionlint ignore=...and# actionlint ignore=...work.-init-configwith each name, and both ignore-comment spellings. One project fixture now uses the new config name; the rest keep the old one on purpose, so both are exercised.Kept on purpose
reviewdog/action-actionlint, MegaLinter, the editor plugins (flycheck/flymake/Atom/Nova), trunk's built-in linter, anything underrhysd/, and the "upstream" attribution.CHANGELOG.mdhistory,LICENSE.txt,docs/reference.md(links to the original articles) and test data are untouched.Details worth knowing
Casks/actionlint.rbis deleted. It was GoReleaser output pointing at upstream's archive checksums and at release files that don't exist yet; the first release regenerates it asCasks/jactionlint.rb.JACTIONLINT_REPOandJACTIONLINT_NAMEoverrides. Its test uses them to run against upstream's releases (archives and binary are calledactionlintthere) until this repo has releases of its own.ACTIONLINT_VER(Docker build arg) is nowJACTIONLINT_VER.runActionlint; it is internal to the page and I did not rename it.Verified locally:
go build,go vet,go test ./...,mise run lint(hk, including dog-fooding the renamed binary on this repo's workflows),docs/checks.mdcheck, the playground's own tests, the wasm build,goreleaser check, the download-script test, and end to end with the built binary (new and old config names,-init-config).Breaking for users: the binary name, the Go package identifier, the hook ids and the Docker entrypoint change. The config file and ignore-comment names keep working.
🤖 Generated with Claude Code
Note
Medium Risk
Wide rename touches releases, CI, and the public Go API/binary name, but config and ignore-comment compatibility limits migration pain for most users.
Overview
Renames the product from actionlint to jactionlint across the tree: the CLI binary and
cmd/jactionlint, the Go packagejactionlint, release artifacts (GoReleaser archives/checksums, DockerJACTIONLINT_VER, Homebrew cask), problem matcher, download script, man page, pre-commit hook IDs, and docs/help/branding.Backward compatibility is preserved where it matters: repo and global config still load
.github/actionlint.{yaml,yml}and$XDG_CONFIG_HOME/actionlint/after the newjactionlintpaths; inline ignores accept both# jactionlint ignore=and# actionlint ignore=.-init-configwrites.github/jactionlint.yaml. Tests were added for config name precedence and legacy global config.Release housekeeping: removes stale
Casks/actionlint.rb; download-script tests can target upstream viaJACTIONLINT_REPO/JACTIONLINT_NAMEuntil this fork ships its own release layout.User-facing break: binary name,
go installpath, hook IDs, and Docker entrypoint change; existing config and ignore comments keep working.Reviewed by Cursor Bugbot for commit 1f62f98. Bugbot is set up for automated code reviews on this repo. Configure here.