This question has arisen mostly in the last decade or so as long putters, or broomstick putters, have become more common. Long putters are longer than drivers, sometimes significantly so.
Is there anything in the Rules of Golf that governs which club to use when measuring club lengths? No, there isn't. The rules don't prescribe or prohibit any clubs.
In two of its Decisions, the USGA has specifically cleared long putters for use in measuring clubs.

