Prevent new projects from being named "cljs".

Fixes #2382.
This commit is contained in:
Phil Hagelberg 2017-12-26 14:57:11 -08:00
parent 04c68cd7d5
commit 186911472f

View file

@ -67,9 +67,9 @@
(abort "Sorry, names such as cleaxure or *eaxure are not allowed." (abort "Sorry, names such as cleaxure or *eaxure are not allowed."
"\nIf you intend to use this name ironically, please set the" "\nIf you intend to use this name ironically, please set the"
"\nLEIN_IRONIC_EAXURE environment variable and try again.") "\nLEIN_IRONIC_EAXURE environment variable and try again.")
(= name "clojure") (or (= name "clojure") (= name "cljs"))
(abort "Sorry, clojure can't be used as a project name." (abort "Sorry, clojure and cljs can't be used as project names."
"\nIt will confuse Clojure compiler and cause obscure issues.") "\nIt will confuse the compiler and cause obscure issues.")
(and (re-find #"[A-Z]" name) (and (re-find #"[A-Z]" name)
(not (System/getenv "LEIN_BREAK_CONVENTION"))) (not (System/getenv "LEIN_BREAK_CONVENTION")))
(abort "Project names containing uppercase letters are not recommended" (abort "Project names containing uppercase letters are not recommended"