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

enable/use gofumpt #93

Merged
merged 3 commits into from
Apr 27, 2023
Merged

enable/use gofumpt #93

merged 3 commits into from
Apr 27, 2023

Conversation

kolyshkin
Copy link
Contributor

Gofumpt is a stricter superset of gofmt, enabling some more rules to make the code better (more readable etc).

This PR fixes the existing code with gofumpt, and enables gofumpt linter in CI (to check future PRs).

While at it, remove the comment saying that version has to be specified
without patch number -- this is no longer true (as of a few years back).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This is the result of

	for f in $(git ls-files | grep .go | grep -v ^vendor/); do gofumpt -w $f; done

using gofumpt v0.5.0 (go1.20.2).

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Impose somewhat stricter formatting rules.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@kolyshkin
Copy link
Contributor Author

Golangci bump is here because older golangci errors out on an unrelated code. From https://github.com/cpuguy83/go-md2man/actions/runs/4726984088:

lint: md2man/roff.go#L16
undeclared name: `blackfriday` (typecheck)
lint: md2man/roff.go#L72
undeclared name: `blackfriday` (typecheck)
lint: md2man/roff.go#L77
undeclared name: `blackfriday` (typecheck)
lint: md2man/md2man.go#L4
"github.com/russross/blackfriday/v2" imported but not used (typecheck)
lint: md2man/roff.go#L10
"github.com/russross/blackfriday/v2" imported but not used (typecheck)
lint: md2man/roff_test.go#L6
"github.com/russross/blackfriday/v2" imported but not used (typecheck)

@cpuguy83 cpuguy83 merged commit 6cc2302 into cpuguy83:master Apr 27, 2023
6 checks passed
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.

None yet

2 participants