Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shorten comments not workring correctly #125

Open
amandeepgautam opened this issue Apr 5, 2024 · 0 comments
Open

shorten comments not workring correctly #125

amandeepgautam opened this issue Apr 5, 2024 · 0 comments

Comments

@amandeepgautam
Copy link

For the following:

╰─ cat /tmp/minimal.go
package main

type A interface {
	// This is a small example with 79 char but is formatted when limit is 80 chars.
	Create(uniqueIdWithPaddingToRe int, nameWithPaddingToRe string) (*int, error)

	// AcquireWithMin method is used to acquire desired and minimum number of
	// units. This may block if at least the minimum number of resources are not
	// available. It returns the number of units allocated which can be between
	// desired or minimum units. Additionally it returns the percent of capacity
	// used including the current allocation. If a request tries to allocate more
	// than the capacity, it will receive units equal to the capcity when available.
}

func main() {}

The format response is creating new incomplete lines

╰─ ~/.vim-go/golines -m 79 --shorten-comments /tmp/minimal.go
package main

type A interface {
	// This is a small example with 79 char but is formatted when limit is 80
	// chars.
	Create(
		uniqueIdWithPaddingToRe int,
		nameWithPaddingToRe string,
	) (*int, error)

	// AcquireWithMin method is used to acquire desired and minimum number of
	// units. This may block if at least the minimum number of resources are
	// not    <<<<<<<< This is not expected.
	// available. It returns the number of units allocated which can be between
	// desired or minimum units. Additionally it returns the percent of
	// capacity used including the current allocation. If a request tries to
	// allocate more than the capacity, it will receive units equal to the
	// capcity when available.
}

func main() {}
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

No branches or pull requests

1 participant