Fix problem with regular expression to grab go version from go.mod#166
Open
trevorackerman wants to merge 4 commits into
Open
Fix problem with regular expression to grab go version from go.mod#166trevorackerman wants to merge 4 commits into
trevorackerman wants to merge 4 commits into
Conversation
Member
|
bugbot run |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
parse-legacy-file against a go.mod file with the directive
is not honoring the version of go specified in go.mod.
It is calculating GOLANG_VERSION to be
1in function get_legacy_version()The regular expression needs to include
.characters in addition to digits.Tested this with gnu sed version 4.9 and builtin sed on MacOS 15.6
Note
Adjusts the sed regex in
get_legacy_versionto include dots when extracting the Go version fromgo.mod/go.workdirectives.bin/parse-legacy-file→get_legacy_versionto widen the sed match froms/go([0-9]+).*/\1/tos/go([0-9]+.).*/\1/, enabling extraction of dotted Go versions fromgo.mod/go.workgodirectives.Written by Cursor Bugbot for commit 7b34481. This will update automatically on new commits. Configure here.