suppress output on tests
All checks were successful
Generic zig build / build (push) Successful in 5m39s
Generic zig build / publish-macos (push) Successful in 11s
Generic zig build / deploy (push) Successful in 18s

This commit is contained in:
Emil Lerch 2026-06-28 08:09:18 -07:00
parent 821c084f70
commit 020fb2db77
Signed by: lobo
GPG key ID: A7B62D657EF764F8

View file

@ -3,6 +3,7 @@
/// Takes portfolio allocations (with market values) and classification metadata,
/// produces breakdowns by asset class, sector, geographic region, account, and tax type.
const std = @import("std");
const builtin = @import("builtin");
const srf = @import("srf");
const Allocation = @import("valuation.zig").Allocation;
const ClassificationMap = @import("../models/classification.zig").ClassificationMap;
@ -257,7 +258,11 @@ pub fn parseAccountsFile(allocator: std.mem.Allocator, data: []const u8) !Accoun
// treat the account as unset so the audit uses its default.
const lot_threshold: ?f64 = if (entry.audit_large_lot_threshold) |t| blk: {
if (t > 0) break :blk t;
log.warn("accounts.srf: account '{s}': audit_large_lot_threshold must be > 0 (got {d}); ignoring", .{ entry.account, t });
// No-op under `zig build test`: the parser's own tests feed
// invalid thresholds (0, negative) on purpose to verify they
// are rejected, and the warn spam pollutes test output.
if (!builtin.is_test)
log.warn("accounts.srf: account '{s}': audit_large_lot_threshold must be > 0 (got {d}); ignoring", .{ entry.account, t });
break :blk null;
} else null;