Add other Clojure suffixes to clojure.tools.namespace.file/clojure-file?

Description

It would be handy to use clojure.tools.namespace.file's clojure-file? function for Clojure files other than vanilla JVM Clojure. I had to copy clojure-file https://github.com/jonase/kibit/blob/master/src/kibit/driver.clj#L17-L22 to be able to let it handle cljs, cljx, and other types of Clojure files. Is it possible to add other extensions to clojure-file? or make a new extended-clojure-file? (or similar name), so that people can reuse the common tooling available in clojure.tools.namespace?

I'm happy to put together a patch for whichever direction you'd prefer, making a new function, or extending the existing one (perhaps by adding a new arity with a clj-only? parameter to not break existing code).

Environment

None

Activity

Show:
Stuart Sierra
December 19, 2014, 11:44 PM

Duplicate of TNS-5

Duplicate
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Stuart Sierra

Reporter

Daniel Compton