Skip to content

Add --alignment_group_boundary flag to control alignment group splitting#2501

Open
sjalloq wants to merge 1 commit intochipsalliance:masterfrom
sjalloq:feature-alignment-group-boundary
Open

Add --alignment_group_boundary flag to control alignment group splitting#2501
sjalloq wants to merge 1 commit intochipsalliance:masterfrom
sjalloq:feature-alignment-group-boundary

Conversation

@sjalloq
Copy link
Copy Markdown

@sjalloq sjalloq commented Mar 28, 2026

Currently, alignment groups for module items, statements, and class items are not broken by blank lines or separator comments. This means statements in logically separate sections (e.g., separated by "// ----" headers) get aligned together.

Add a new flag --alignment_group_boundary with four modes:
none (default), blank-lines, separator-comments,
blank-lines-and-separator-comments

A separator comment is an EOL comment whose body consists of 4 or more consecutive identical characters (e.g., "// ----", "// ====", "/////").

Affects AlignModuleItems, AlignStatements, and AlignClassItems.

@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Mar 28, 2026

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: sjalloq / name: Shareef Jalloq (9872699)

@sjalloq
Copy link
Copy Markdown
Author

sjalloq commented Mar 28, 2026

This has been an issue that has bugged me for years so I thought I should just fix it. It allows splitting by block comments such that the following statements aren't aligned.

assign net1 = net2;

// ============================================================
// New Block Comment Divider
// ============================================================

assign net312327837434378347 = net3;

@sjalloq sjalloq force-pushed the feature-alignment-group-boundary branch from 4d288ca to 940f187 Compare March 28, 2026 21:09
Currently, alignment groups for module items, statements, and class items
are not broken by blank lines or separator comments. This means statements
in logically separate sections (e.g., separated by "// ----" headers) get
aligned together.

Add a new flag --alignment_group_boundary with four modes:
  none (default), blank-lines, separator-comments,
  blank-lines-and-separator-comments

A separator comment is an EOL comment whose body consists of 4 or more
consecutive identical characters (e.g., "// ----", "// ====", "/////").

Affects AlignModuleItems, AlignStatements, and AlignClassItems.
@sjalloq sjalloq force-pushed the feature-alignment-group-boundary branch from 940f187 to 9872699 Compare March 29, 2026 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant