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

Formatter incorrectly indent after unique case statement #716

Open
BrianLChen opened this issue Jan 20, 2025 · 0 comments
Open

Formatter incorrectly indent after unique case statement #716

BrianLChen opened this issue Jan 20, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@BrianLChen
Copy link

Describe the bug
The formatter not working properly with unique case or priority case statements.

To Reproduce
Test case

module test();
  logic [7:0] var1;
  logic [7:0] value;

  always_comb
  begin
    unique case (var1)
      1:
      begin
      value= 1;
      end
      2:
      begin
      value = 2;
      end
      default:
      begin
      value = 0;
      end
    endcase
  end
endmodule

Actual output

module test();
  logic [7:0] var1;
  logic [7:0] value;

  always_comb
  begin
    unique case (var1)
             1:
             begin
               value= 1;
             end
             2:
             begin
               value = 2;
             end
             default:
             begin
               value = 0;
             end
           endcase
         end
       endmodule

the expect output is the same as the test case

Where the indent is try to align the case, and indent all the code after it to incorrect place

  • OS: [Windows 23H2]
  • VSCode version version [1.96.0]
@BrianLChen BrianLChen added the bug Something isn't working label Jan 20, 2025
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
None yet
Development

No branches or pull requests

1 participant