Skip to content

Conversation

@k1LoW
Copy link
Owner

@k1LoW k1LoW commented Oct 26, 2025

This pull request updates the handling of Go version checks in go.mod, especially around the "oldstable" version and patch version requirements. The changes clarify the behavior of the lax input, improve how patch versions are checked, and add new test cases to ensure correctness.

Go version check logic improvements:

  • Updated the version comparison logic in mod/mod.go to allow go.mod files without a patch version (e.g., 1.21) to pass if their major.minor matches the oldstable version, and to only require exact matches when a patch version is present.

Documentation and configuration updates:

  • Clarified the lax input description in action.yml to indicate that it allows oldstable or older versions and only errors on stable versions.
  • Updated the example table in README.md to show that omitting the patch version in the go directive is now considered OK if it matches oldstable, and added a new row for version 1.20.

Test coverage improvements:

  • Updated the test case in mod/mod_test.go so that a minor-only version matching oldstable passes when not in lax mode.
  • Added new test cases to mod/mod_test.go to verify behavior for mismatched minor versions (no patch) and mismatched patch versions.

@k1LoW k1LoW self-assigned this Oct 26, 2025
@k1LoW k1LoW merged commit 423b636 into main Oct 26, 2025
3 checks passed
@k1LoW k1LoW deleted the allow-no-patch branch October 26, 2025 14:18
@github-actions github-actions bot mentioned this pull request Oct 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants