Skip to content

Commit

Permalink
Merge pull request #797 from hzeller/disable-indent-initializer
Browse files Browse the repository at this point in the history
Comment out initializer list improvement until regression found.
  • Loading branch information
hzeller authored Apr 26, 2021
2 parents 495dda7 + 1950090 commit 003bcd5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions verilog/formatting/formatter_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1576,6 +1576,7 @@ static constexpr FormatterTestCase kFormatterTestCases[] = {
" localparam baz = 2 //comment\n"
") ();\n"
"endmodule\n"},
#if 0 // Disabled for now, see https://github.com/google/verible/pull/755
{"module foo;"
"localparam logic [63:0] RC[24] = '{\n"
"64'h 1,\n"
Expand All @@ -1602,6 +1603,7 @@ static constexpr FormatterTestCase kFormatterTestCases[] = {
" 64'h8000_0000_8000_8008 // 23\n"
" };\n"
"endmodule\n"},
#endif
{"module top;"
"foo#( \"test\" ) foo( );"
"bar#( \"test\" ,5) bar( );"
Expand Down
2 changes: 2 additions & 0 deletions verilog/formatting/tree_unwrapper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ void TreeUnwrapper::SetIndentationsAndCreatePartitions(
break;
}

#if 0 // Disabled for now, see https://github.com/google/verible/pull/755
case NodeEnum::kExpressionList: {
// This allows for indenting initializer lists
if (Context().DirectParentIs(NodeEnum::kAssignmentPattern)) {
Expand All @@ -955,6 +956,7 @@ void TreeUnwrapper::SetIndentationsAndCreatePartitions(
}
break;
}
#endif
// For the following constructs, always expand the view to subpartitions.
// Add a level of indentation.
case NodeEnum::kPackageImportList:
Expand Down
2 changes: 2 additions & 0 deletions verilog/formatting/tree_unwrapper_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -702,6 +702,7 @@ const TreeUnwrapperTestData kUnwrapModuleTestCases[] = {
L(0, {"endmodule"})),
},

#if 0 // Disabled for now, see https://github.com/google/verible/pull/755
{
"module with parameters and initializer list",
"module foo;"
Expand Down Expand Up @@ -740,6 +741,7 @@ const TreeUnwrapperTestData kUnwrapModuleTestCases[] = {
L(1, {"}", ";"})),
L(0, {"endmodule"})),
},
#endif

{
"module with header import",
Expand Down

0 comments on commit 003bcd5

Please sign in to comment.