Repository navigation
fix: check matrix exclude values against matrix rows only - #20
Merged
Merged
Conversation
include is processed after exclude, so values added only by include cannot be excluded (rhysd/actionlint#634). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
⛔ Files ignored due to path filters (2)
📒 Files selected for processing (4)
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 |
This was referenced Oct 5, 2026
jdx
added a commit
that referenced
this pull request
Oct 5, 2026
🤖 I have created a release *beep* *boop* --- ## [1.8.0](v1.7.12...v1.8.0) (2026-10-05) ### Features * `workflow_dispatch` allows 25 inputs ([38dfd8e](38dfd8e)) * add config-secrets option to allow-list secrets ([#16](#16)) ([b00331b](b00331b)) * add inline ignore comments ([#23](#23)) ([e4dee7a](e4dee7a)) * add opt-in check for local actions used before checkout ([#29](#29)) ([34f436a](34f436a)) * add opt-in check for workflow_run workflow names ([#30](#30)) ([a9d60af](a9d60af)) * add opt-in require-expression-wrapping and check-falsy-ternary ([#25](#25)) ([075f8b8](075f8b8)) * add opt-in require-permissions rule ([#32](#32)) ([736d914](736d914)) * add opt-in require-shell and max-run-lines checks ([#26](#26)) ([7d1db16](7d1db16)) * add opt-in timeout-check rule for job timeout-minutes ([#24](#24)) ([bb70379](bb70379)) * add self-hosted-runner.strict-labels config option ([#21](#21)) ([a9a4ce0](a9a4ce0)) * add support for 'code-quality' permission ([d147267](d147267)) * detect caller/callee permission mismatch in reusable workflow calls ([#13](#13)) ([6699dde](6699dde)) * detect more attacker-controlled script injection inputs ([#22](#22)) ([c962011](c962011)) * import upstream actionlint PRs and fix upstream issues [#747](https://github.com/jdx/jactionlint/issues/747)-[#750](https://github.com/jdx/jactionlint/issues/750) ([#11](#11)) ([143400e](143400e)) * load user-global config from XDG_CONFIG_HOME ([#15](#15)) ([c72f98b](c72f98b)) * opt-in require-commit-hash lint (rhysd/actionlint[#436](https://github.com/jdx/jactionlint/issues/436)) ([#19](#19)) ([acbebb1](acbebb1)) * opt-in required-actions rule (upstream [#474](https://github.com/jdx/jactionlint/issues/474)) ([#17](#17)) ([717783d](717783d)) * **shellcheck:** map errors to source lines in literal blocks ([#18](#18)) ([5d3c39a](5d3c39a)) * support parallel steps (background, wait, wait-all, cancel, parallel) ([#12](#12)) ([35ddf4a](35ddf4a)) * support windows-11-vs2026-arm runner ([5231ce6](5231ce6)) * Support YAML anchors and aliases in parser ([8ed4c46](8ed4c46)) * workflow_dispatch allows 25 inputs ([673e4d3](673e4d3)) ### Bug Fixes * accept boolean wait-all and type-check parallel step expressions ([#31](#31)) ([cddd34b](cddd34b)) * add artifact-metadata ([ff3994b](ff3994b)) * add artifact-metadata ([c2e42cf](c2e42cf)) * add documented job workflow context properties ([f6542f4](f6542f4)) * Add undocumented github.repository_visibility option ([c391460](c391460)) * Add undocumented github.repository_visibility option ([a533631](a533631)) * add windows-11-arm to runner os ([180ef9e](180ef9e)) * check matrix exclude values against matrix rows only ([#20](#20)) ([65dfbe2](65dfbe2)) * repair main's runner label test after concurrent merges ([#27](#27)) ([ada1320](ada1320)) * report correct position for expression errors in literal blocks ([#28](#28)) ([2df981e](2df981e)) * Validating permission scopes: id-token and models ([9510b01](9510b01)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and documentation-only release PR from Release Please; no runtime code changes in the diff, though upgrading to 1.8.0 may surface new linter findings for consumers. > > **Overview** > **Release 1.8.0** — bumps the project version from `1.7.12` to `1.8.0` in `.release-please-manifest.json`, the pre-commit Docker hook (`ghcr.io/jdx/jactionlint:1.8.0`), `docs/usage.md` examples, and the playground version badge/link. > > `CHANGELOG.md` gains a new **1.8.0** section (features and fixes from the release train) and older release headings are normalized from `#` to `##` for consistent markdown structure. > > The substantive product changes in this release (new opt-in lint rules, parallel steps, inline ignores, permission/security checks, etc.) are documented in the changelog; this PR does not modify linter source in the diff shown. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 4632529. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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.
What
exclude:values in a matrix are now checked againstmatrix:rows only, not against values added byinclude:. Keys/values that only appear ininclude:are reported, and anexclude:with no matrix rows (onlyinclude:) is reported as having no matrix variation.Why
GitHub processes
includecombinations afterexclude, so excluding a value that onlyincludeadds is a silent no-op. Previously actionlint accepted it and listed include-added values as "possible values".Upstream: rhysd/actionlint#634.
Not done: #630
Issue #630 asks to reject arrays as values in
include/exclude. A commenter (muzimuzhi) tested on real GitHub that array values ininclude/excludeentries are accepted; the original failure came from using arraymatrix.<entry>values elsewhere. Semantics are not clear, so nothing is implemented for it (false-positive risk).Review notes
include:-contains-expression early return incheckExclude, since include no longer affects exclude checking.matrix_exclude_mismatchtestdata; addedmatrix_exclude_only_in_include; updated docs/checks.md.Caveats
Behavior change: workflows with an
exclude:that only targets include-added values now get new errors (these excludes had no effect at runtime).🤖 Generated with Claude Code
Note
Medium Risk
Linter behavior change: workflows with exclude entries targeting include-only keys or values will start failing actionlint even though GitHub would silently ignore those excludes at runtime.
Overview
Matrix
exclude:validation now matches GitHub’s ordering: entries are checked only against keys and values declared undermatrix:, not values introduced later byinclude:.checkExcludeno longer foldsinclude:combinations into the allowed set, drops the early exit whenincludeuses expressions, and reports an error whenexcludeis present but there are nomatrix:rows (e.g.include:-only matrices). Workflows that try to exclude keys or values that only exist viainclude:now get[matrix]diagnostics instead of being accepted.Docs and error fixtures are updated;
matrix_exclude_only_in_includecovers include-only keys, include-added values, and exclude-with-no-rows cases.Reviewed by Cursor Bugbot for commit 20af678. Bugbot is set up for automated code reviews on this repo. Configure here.