Skip to content

Conversation

0xrusowsky
Copy link
Contributor

Motivation

the naming for the the multiline_func_header config variant "params_first" is counter intuitive, as it is not aligned with the behavior of "params_first_multi".

see how it created confusion for users, who opened this issue:

Solution

because of that, i renamed the config variant to "params_always" to better reflect that this styling option will ALWAYS break the fn header params.

the old name "params_first" is kept as an alias for backwards compatibility

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense, let's update README too https://github.com/foundry-rs/foundry/tree/master/crates/fmt#configuration and dupe the test for params_first too to make sure alias does not get removed / introduce breaking change

@0xrusowsky
Copy link
Contributor Author

makes sense, let's update README too master/crates/fmt#configuration and dupe the test for params_first too to make sure alias does not get removed / introduce breaking change

i tested both locally to make sure. do we still want to duplicate the whole file just for that?

completely forgot about the readme, thanks for the reminder 🤝

@grandizzy
Copy link
Collaborator

makes sense, let's update README too master/crates/fmt#configuration and dupe the test for params_first too to make sure alias does not get removed / introduce breaking change

i tested both locally to make sure. do we still want to duplicate the whole file just for that?

oh, not the whole file, but maybe just a test with inline config to make sure we don't remove the alias in future without ack the breaking change

@0xrusowsky 0xrusowsky requested a review from grandizzy October 3, 2025 07:45
grandizzy
grandizzy previously approved these changes Oct 3, 2025
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@0xrusowsky 0xrusowsky merged commit a841db1 into master Oct 3, 2025
16 checks passed
@0xrusowsky 0xrusowsky deleted the rusowsky/11933 branch October 3, 2025 08:02
@github-project-automation github-project-automation bot moved this to Done in Foundry Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants