fix(amlich): extract continuity condition to satisfy staticcheck QF1001

This commit is contained in:
2026-08-08 23:29:42 +07:00
parent aa7026706b
commit 91b7461fe5
+2 -1
View File
@@ -76,7 +76,8 @@ func TestSolarLunarRoundTrip(t *testing.T) {
}
// Consecutive solar days are either consecutive lunar days or the
// first day after a month of 29 or 30 days.
if jd > start && lunarDay != prevDay+1 && !(lunarDay == 1 && (prevDay == 29 || prevDay == 30)) {
startsNewMonth := lunarDay == 1 && (prevDay == 29 || prevDay == 30)
if jd > start && lunarDay != prevDay+1 && !startsNewMonth {
t.Fatalf("discontinuity at %d/%d/%d: lunar day %d after %d",
solarDay, solarMonth, solarYear, lunarDay, prevDay)
}