Upon motion of a defendant made pursuant to subdivision 23A-8-3(1), (2), or (3), the court must dismiss an indictment or information in any of the following cases:
(1) When it is not found, endorsed, and presented or filed as prescribed by this title;(2) When the names of the witnesses are not inserted at the foot of the indictment or information or endorsed thereon;(3) When it does not substantially conform to the requirements of this title;(4) When more than one offense is charged in a single count;(5) When it does not describe a public offense;(6) When it contains matter which, if true, would constitute a legal justification or excuse of the offense charged, or other bar to the prosecution;(7) When the grand jury which filed the indictment had no legal authority to inquire into the offense charged because it was not within the jurisdiction of the grand jury or because the court was without jurisdiction of the offense charged;(8) When a person was permitted to be present during the session of the grand jury while the charge embraced in the indictment was under consideration, except as provided in § 23A-5-11; or(9) When a defendant charged by information did not have or waive a preliminary hearing before the information was filed.Supreme Court Rule 382, 385, 1939; SDC 1939 & Supp 1960, §§ 34.3509, 34.3514; SDCL, §§ 23-36-1, 23-36-8; SL 1978, ch 178, § 107-A; SL 1979, ch 159, § 46.