Skip to content

Fix formatter spacing around path separators in macro arguments - #2577

Open
kbrunham-intel wants to merge 2 commits into
chipsalliance:masterfrom
kbrunham-intel:fix/2352
Open

Fix formatter spacing around path separators in macro arguments#2577
kbrunham-intel wants to merge 2 commits into
chipsalliance:masterfrom
kbrunham-intel:fix/2352

Conversation

@kbrunham-intel

@kbrunham-intel kbrunham-intel commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Stops the formatter from treating / between identifiers in macro arguments as a division operator.
  • Paths such as `PROJECT_INCLUDE(`PATH_MY_MODULE/src/config_class.sv) stay compact instead of becoming `PATH_MY_MODULE / src / config_class.sv, which does not compile.
  • Division outside macros is unchanged (assign x = a/b; still becomes a / b).
  • Adds token-annotator and formatter regression tests.

Fixes #2352

Test plan

The formatter treated path separators as division operators, turning
`PATH/src/file.sv into `PATH / src / file.sv and breaking compiles
(issue chipsalliance#2352).
@kbrunham-intel
kbrunham-intel marked this pull request as ready for review August 18, 2026 00:55
@kbrunham-intel

Copy link
Copy Markdown
Contributor Author

Hi @hzeller. Please consider this change which addresses issue 2352 with the formatter.

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.

verible-verilog-format inserting spaces around *nix path separators, resulting in compile errors.

1 participant