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

Unexpected formatting of interface classes #2145

Open
sriyerg opened this issue Mar 14, 2024 · 1 comment
Open

Unexpected formatting of interface classes #2145

sriyerg opened this issue Mar 14, 2024 · 1 comment
Labels
formatter Verilog code formatter issues

Comments

@sriyerg
Copy link

sriyerg commented Mar 14, 2024

Test case

// Input to the formatter, preferably a reduced test case.
interface class foo;
       pure virtual function void bar(    );
  pure       virtual task baz(
  );
    endclass

Include any options or configuration used.
--inplace

Actual output

// This doesn't look right.
  interface class foo; pure virtual
  function void bar()
  ; pure virtual
  task baz()
  ;
  endclass

Include any possible diagnostic messages from the formatter.

Expected or suggested output

// This result would look better from the formatter.
interface class foo;
  pure virtual function void bar();
  pure virtual task baz();
endclass

Version:

$ verible-verilog-format --version
v0.0-3617-g4f98e145
Commit	2024-03-10
Built	2024-03-11T00:27:27Z

Citations to published style guides would help.
I would have expected interface classes to be formatted as a regular class, but the formatting is way off, as shown above.

@sriyerg sriyerg added the formatter Verilog code formatter issues label Mar 14, 2024
@sriyerg
Copy link
Author

sriyerg commented Mar 14, 2024

Looks like this was already reported over 2 years ago in #1149. Nevertheless, requesting renewed attention on this, hoping not too difficult to fix. Feel free to close bug on ack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatter Verilog code formatter issues
Projects
None yet
Development

No branches or pull requests

1 participant