Skip to content

Add InputGroup::root#2095

Merged
woodruffw merged 3 commits into
mainfrom
ww/ig-root
Jun 20, 2026
Merged

Add InputGroup::root#2095
woodruffw merged 3 commits into
mainfrom
ww/ig-root

Conversation

@woodruffw

@woodruffw woodruffw commented Jun 2, 2026

Copy link
Copy Markdown
Member

Every input group now tracks its "root", i.e. the repository root it belongs to (if it has one). We then use this to opportunistically provide a better "SARIF path" for both the SARIF and GH annotations output formats.

WIP, not plumbed yet. The idea here is to address a class of recurring problems where users run zizmor .github or similar and get relative paths in their outputs that they don't expect (or that their tools don't expect).

TODO:

  • Plumb this into the GitHub annotations format as well
  • Clean up more

Context: #1745 #2046 #2113 and probably several others. Augments the initial fix in #1748.

@woodruffw woodruffw self-assigned this Jun 2, 2026
@woodruffw woodruffw added the refactor Refactoring tasks label Jun 2, 2026
@woodruffw
woodruffw force-pushed the ww/ig-root branch 2 times, most recently from dc51437 to a1de44e Compare June 13, 2026 23:23
@woodruffw
woodruffw marked this pull request as ready for review June 13, 2026 23:37
@woodruffw woodruffw added this to the 1.26.0 milestone Jun 13, 2026
Comment thread crates/zizmor/src/registry/input.rs
Comment thread crates/zizmor/src/registry/input.rs Outdated
Add InputGroup::discover_root

Docs

Rework sarif_path

Dechaff

Use sarif_path in annotations too

More replacements

Record changes

Consolidate changelog

Honor GIT_CEILING_DIRECTORIES

Handle bare inputs when discovering root

Push SARIF path compute up, remove prefix

sarif_path -> best_relative_path

Remove turbofish

Cleanup

Remove get_group

LSP: don't bother with root discovery

Simplify filters

Revert "Simplify filters"

This reverts commit 37cbfe2.

Improve filtering some more
@woodruffw

Copy link
Copy Markdown
Member Author

I don't love this, but it's better than what we had before.

@woodruffw
woodruffw merged commit cdaf536 into main Jun 20, 2026
12 checks passed
@woodruffw
woodruffw deleted the ww/ig-root branch June 20, 2026 04:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactoring tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant