Every person who exercises the duties of any office in violation of the provisions of this article relative to oaths, and every person who knowingly appoints to office a person ineligible by reason of the provisions of this article relative to oaths, is guilty of a felony.