feat(fmt): use nearest project configs - #16064
Merged
Merged
Conversation
Amp-Thread-ID: https://ampcode.com/threads/T-019fd364-d525-75c9-8463-dcd72ffc81f9 Co-authored-by: Amp <amp@ampcode.com>
Contributor
✅ Changelog foundThe deterministic check will validate the changed entry. |
Amp-Thread-ID: https://ampcode.com/threads/T-019fd364-d525-75c9-8463-dcd72ffc81f9 Co-authored-by: Amp <amp@ampcode.com>
figtracer
marked this pull request as ready for review
August 7, 2026 11:01
figtracer
requested review from
0xrusowsky,
DaniPopes,
grandizzy,
mablr,
mattsse and
stevencartavia
as code owners
August 7, 2026 11:01
mablr
previously approved these changes
Aug 7, 2026
mablr
left a comment
Member
There was a problem hiding this comment.
LGTM, some non-blocking suggestions...
Amp-Thread-ID: https://ampcode.com/threads/T-019fd364-d525-75c9-8463-dcd72ffc81f9 Co-authored-by: Amp <amp@ampcode.com>
mablr
approved these changes
Aug 7, 2026
stevencartavia
approved these changes
Aug 7, 2026
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.
Motivation
forge fmtapplies one config to every input, making mixed-config Solidity monorepos require separate invocations.Closes #5686.
Solution
Add
forge fmt --nearestto resolve each file's nearestfoundry.toml, including its formatter settings and ignore rules. Existing behavior is unchanged without the flag.Validation
sablier-labs/evm-monorepo: 645 files across 6 projects matched independent--rootruns byte-for-byte; its ignored deployed source remained untouched.latticexyz/mud: 495 files across 25 projects matched independent--rootruns byte-for-byte, including 487 reformatted files.