This repository was archived by the owner on Dec 19, 2025. It is now read-only.
Reflow long comment lines which don't end with a period#59
Open
shivansh wants to merge 4 commits into
Open
Conversation
shivansh
force-pushed
the
shivansh/comment-reflow
branch
from
March 19, 2022 08:48
c4a54ae to
fc397bd
Compare
Contributor
Author
|
Though the comment formatting is still in an experimental stage, I believe this PR will improve it to some extent. However, if this is accepted, a note should be added in README for users to be aware of the usage of period ( The above unexpected behavior can be avoided by adding a |
$ cat x.go package main // Unlike the above comment block, only the current line in this comment block has length greater than the // target maximum line length // but since the previous line doesn't end with a period, it should be reflown with this line // despite both the lines being shorter than the target maximum line length. $ golines --shorten-comments x.go package main // Unlike the above comment block, only the current line in this comment block has length greater // than the // target maximum line length // but since the previous line doesn't end with a period, it should be reflown with this line // despite both the lines being shorter than the target maximum line length. The modified behavior is to reflow long comment lines which don't end with a period with the consecutive comment lines, irrespective of the latter being long or not. $ golines --shorten-comments x.go package main // Unlike the above comment block, only the current line in this comment block has length greater // than the target maximum line length but since the previous line doesn't end with a period, it // should be reflown with this line despite both the lines being shorter than the target maximum // line length.
shivansh
force-pushed
the
shivansh/comment-reflow
branch
from
March 19, 2022 09:48
fc397bd to
d922ed2
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The modified behavior is to reflow long comment lines which don't end
with a period with the consecutive comment lines, irrespective of the
latter being long or not.