Conversation
- Create shared/version package with standardized variable names - Add Info() and Full() helper functions - Update cfl and jtk to use shared version package - Standardize on BuildDate (was Date in cfl) - Update ldflags in Makefiles, .goreleaser.yml, and snapcraft.yaml - Remove tool-specific version packages Both tools now use consistent version formatting. Closes #24
Test Coverage Assessment for PR #28SummaryThis PR consolidates version packages from
Test Coverage AnalysisCurrent State: The new Is this acceptable? Yes, for the following reasons:
Potential Improvements (Optional)If the team wants to enforce test coverage for all shared packages, a simple test would look like: func TestInfo(t *testing.T) {
// Default value when not built with ldflags
if got := Info(); got != "dev" {
t.Errorf("Info() = %q, want %q", got, "dev")
}
}
func TestFull(t *testing.T) {
got := Full()
if !strings.Contains(got, "dev") {
t.Error("Full() should contain version")
}
if !strings.Contains(got, "built") {
t.Error("Full() should contain 'built'")
}
}However, this provides minimal value since it only tests string concatenation with default values. VerdictNo test coverage gaps that would warrant blocking this PR. The code is trivial, follows existing patterns (the deleted code also had no tests), and the real validation happens at build time through ldflags injection. The PR correctly updates all ldflags references, standardizes the variable name ( Automated review by Claude Code |
Summary
shared/versionpackage with standardized variable namesInfo()andFull()helper functionsBuildDate(wasDatein cfl)Variable Names (Standardized)
Test plan
Closes #24
🤖 Generated with Claude Code