get all the rule names without compiling

(cherry picked from commit 746efb341a7b27769078ab0f0a8286d6cb1894cd)