Whenever there is a contest within any voting district, a primary election shall be held in the voting district and the names of all candidates for state office and the names of only those candidates for local office that are contesting a particular local office or offices shall appear on the ballots.
R.I. Gen. Laws § 17-15-12