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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub go.mod Go version contains comment #10079

Closed
maratori opened this issue Apr 6, 2024 · 0 comments 路 Fixed by #10080
Closed

GitHub go.mod Go version contains comment #10079

maratori opened this issue Apr 6, 2024 · 0 comments 路 Fixed by #10080
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas

Comments

@maratori
Copy link
Contributor

maratori commented Apr 6, 2024

Are you experiencing an issue with...

shields.io

馃悶 Description

go.mod file can contain comments

module github.com/my/module

go 1.18 // some comment

Expected behavior: badge contains only version
Actual behavior: badge contains version and comment

馃敆 Link to the badge

Generated:

Static image:
image

馃挕 Possible Solution

Need to fix regexp

const goVersionRegExp = /^go (.+)$/m

@maratori maratori added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Apr 6, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 7, 2024
* [GithubGoMod] Ignore comment after version (fixes #10079)

* add unit tests for GithubGoModGoVersion.transform

---------

Co-authored-by: chris48s <git@chris-shaw.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Support questions, usage questions, unconfirmed bugs, discussions, ideas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant