05c7e605c01e595561c32690eb44a7512041e540
braney
  Wed Sep 23 09:34:08 2026 -0700
hubCheck: reject a bigBed type line that declares fewer than three fields, refs #36940

hgc already stops on "type bigBed 1" or "type bigBed 2", but hubCheck
passed both, so a hub author only found out when a user clicked an item.
Check the declared count against the minimum of three next to the
existing check against the file's field count.  A bare "type bigBed"
does not reach this code and is unchanged.

Adds a fieldCountTooFew test with bigBed 1 and bigBed 2 tracks.

diff --git src/hg/utils/hubCheck/tests/input/fieldCountTooFew.txt src/hg/utils/hubCheck/tests/input/fieldCountTooFew.txt
new file mode 100644
index 00000000000..a135032f8ca
--- /dev/null
+++ src/hg/utils/hubCheck/tests/input/fieldCountTooFew.txt
@@ -0,0 +1,21 @@
+hub fieldCountTooFew
+shortLabel fieldCountTooFew
+longLabel fieldCountTooFew
+email braney@soe.ucsc.edu
+useOneFile on
+
+genome mm10
+
+track fieldTooFew1
+type bigBed 1
+bigDataUrl test6field.bb
+shortLabel fieldTooFew1
+longLabel fieldTooFew1
+visibility dense
+
+track fieldTooFew2
+type bigBed 2
+bigDataUrl test6field.bb
+shortLabel fieldTooFew2
+longLabel fieldTooFew2
+visibility dense