Skip to content

Make config discovery root-aware - #2234

Merged
woodruffw merged 16 commits into
mainfrom
ww/fix-2229
Jul 27, 2026
Merged

Make config discovery root-aware#2234
woodruffw merged 16 commits into
mainfrom
ww/fix-2229

Conversation

@woodruffw

@woodruffw woodruffw commented Jul 26, 2026

Copy link
Copy Markdown
Member

WIP. Fixes #2229.

TL;DR: This takes the repository root that we discover for path presentation (see #2095) and uses it as another hint during config discovery. This is a lot more reliable than our previous heuristics, which involved trying to figure out where we were in some directory tree.

(Like with path presentation, the previous heuristics remain for when we don't have a Git repo to root against. This can happen e.g. if the user runs zizmor . on an extracted archive rather than a real repository.)

Needs more tests, plus another tweak to the heuristics to ensure we treat .github/workflows correctly.

Another perk of this is that it adds a proper "workspace" testing abstraction, which will make it possible for me to patch the downstream testing pain experienced in #2139.

@woodruffw woodruffw self-assigned this Jul 26, 2026
@woodruffw woodruffw added bugfix Fixes a known bug config Configuration functionality labels Jul 26, 2026
Comment thread crates/zizmor/tests/integration/common.rs Outdated
@woodruffw
woodruffw marked this pull request as ready for review July 27, 2026 02:51
@woodruffw
woodruffw merged commit 852b8d0 into main Jul 27, 2026
14 checks passed
@woodruffw
woodruffw deleted the ww/fix-2229 branch July 27, 2026 03:02
@woodruffw woodruffw modified the milestones: 1.29.0, 1.30.0 Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Fixes a known bug config Configuration functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: zizmor.yaml (or other config names) is not found when the repo is called "workflows"

1 participant