We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sfv2
Currently only structs and tuples are handled for multiline formatting. That still leaves:
structs
tuples
forc fmt
array
match
sway-fmt
if_else
if really_long_var_name > other_really_long_var || really_long_var_name <= 0 && other_really_long_var != 0 { ... }
should be:
fn_signature
fn foo(really_long_var: String, other_really_long_var: String, hi_its_another_long_var: String) -> Result<(), Error> { ... }
fn foo( really_long_var: String, other_really_long_var: String, hi_its_another_long_var: String, ) -> Result<(), Error> { ... }
The text was updated successfully, but these errors were encountered:
expr
sway-fmt-v2
Additional comment for params in version 0.24.4.
0.24.4
The following code
fn claim( amount: u64, key: u64, num_leaves: u64, proof: [b256; 2], to: Identity, );
turns into
fn claim(amount: u64, key: u64, num_leaves: u64, proof: [b256; 2], to: Identity, );
instead of the preferred
fn claim(amount: u64, key: u64, num_leaves: u64, proof: [b256; 2], to: Identity);
Sorry, something went wrong.
eureka-cpu
No branches or pull requests
Currently only
structs
andtuples
are handled for multiline formatting. That still leaves:forc fmt
doesn't format arrays very well. #726 Adds multiline formatting forarray
#2593match
) Match expressions should be formatted like enums and structs #604sway-fmt
formats match enum variants into one long line #1689if_else
control flow blocks #2564 )should be:
fn_signature
insfv2
#2566should be:
The text was updated successfully, but these errors were encountered: