Add support for multi-style block comments#1543
Open
lzulberti wants to merge 3 commits intojeremiah-c-leary:masterfrom
Open
Add support for multi-style block comments#1543lzulberti wants to merge 3 commits intojeremiah-c-leary:masterfrom
lzulberti wants to merge 3 commits intojeremiah-c-leary:masterfrom
Conversation
13b5fae to
93c2731
Compare
93c2731 to
68c41d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds support for configuring multiple block comment styles by allowing array-valued configuration entries in:
block_comment_001block_comment_002block_comment_003Each position in the arrays represents one complete block comment style, and the same index is applied consistently across header, body, and footer. This makes it possible to define several valid block comment formats within the same project.
The change is backward compatible: existing single-value configurations continue to work as before and are internally handled as a single-style configuration.
This PR also enables autofix support for block comment separator normalization, for example by rebuilding header/footer separator lines to the configured length when the style can be determined safely.
Motivation
Some projects use more than one block comment convention, for example:
At the moment, the configuration supports only one block comment style at a time. This PR removes that limitation.
Example
Supported block comment styles may include: