Skip to content
New issue

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

nargo fmt: Undesirable line break before { when comments are present in function signature #3310

Closed
ghost opened this issue Oct 27, 2023 · 0 comments · Fixed by #3473
Closed
Labels
bug Something isn't working

Comments

@ghost
Copy link

ghost commented Oct 27, 2023

Aim

When comments are included within the function signature, specifically in the parameter list, the code formatter introduces an unwanted line break before the opening curly brace {. This might affect the code's visual alignment and readability.

fn main(
  // Receiver public key
  to_pubkey_x: Field, 
) -> pub [Field; 2]
{

Expected Behavior

The opening curly brace { should ideally be on the same line as the last parameter or return type to maintain a consistent and clean code structure, like so:

fn main(
  // Receiver public key
  to_pubkey_x: Field, 
) -> pub [Field; 2] {

Bug

Undesirable line break before { when comments are present in function signature

To Reproduce

Installation Method

Compiled from source

Nargo Version

No response

Additional Context

No response

Would you like to submit a PR for this Issue?

No

Support Needs

No response

@ghost ghost added the bug Something isn't working label Oct 27, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Noir Oct 27, 2023
@ghost ghost mentioned this issue Oct 27, 2023
2 tasks
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Noir Nov 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

0 participants