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

gofumpt should use tagging and version numbers #99

Closed
Zamiell opened this issue Dec 10, 2020 · 3 comments
Closed

gofumpt should use tagging and version numbers #99

Zamiell opened this issue Dec 10, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@Zamiell
Copy link
Contributor

Zamiell commented Dec 10, 2020

Hello again,

In general, it is nice for software to have version numbers, and gofumpt is no exception.

Having versioning is particularly important because according to this comment, gofumpt would automatically be updated inside golangci-lint if it used version tags.

For example, by looking at the commit history for golangci-lint, we can see that one of the latest commits is an automatic commit by Dependabot for the gci linter. This is because the gci linter uses git tags, which are listed here.

It would be nice if gofumpt would follow the same conventions that gci and other linters do, so that golangci-lint would be automatically updated. Even if you don't want to package up a proper release with a zip file or whatnot, it is my understanding that by simply tagging the latest commit on master with a version number, it will get the job done.

Thanks again for the tool.

@mvdan
Copy link
Owner

mvdan commented Dec 17, 2020

I have to say - it feels rather arbitrary that golangci-lint requires tags to automatically update. They could just as easily have a weekly or daily cron job that does a go get some-tool@latest and it would work just fine with tools which don't use tags.

That said, I have been thinking about using tags for a couple of months, simply because the project has grown in popularity and it makes stable usage and packaging easier.

@mvdan mvdan added the enhancement New feature or request label Jan 2, 2021
mvdan added a commit that referenced this issue Jan 5, 2021
This allows for versioned go get/install commands to bundle the module
version in the binary, then the version flag can print it as-is.

Prebuilt binaries will also include it via ldflags.

Not for gofumports, since its days are counted.

For #99.
@mvdan
Copy link
Owner

mvdan commented Jan 5, 2021

First release is out: https://github.com/mvdan/gofumpt/releases/tag/v0.1.0

@mvdan mvdan closed this as completed Jan 5, 2021
@Zamiell
Copy link
Contributor Author

Zamiell commented Jan 5, 2021

Thanks Dan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants