Small Clojure interpreter, linter and formatter.
EPL-1.0 License
Bot releases are hidden (Show)
joker.repl
namespace:ns
and :name
to vars' metajoker.os/chdir
(thanks @jcburley!)clojure.template
and clojure.walk
namespaces (thanks @jcburley!)defmacro
now returns the varrefer-clojure
re-find
with arity 1this
inside proxy
(thanks @conormcd!)in-ns
when linting. This results in more accurate error messages (pointing to the current namespace rather than user
namespace). IMPORTANT: if you have .jokerd/linter.*
files, you might have to add (in-ns 'joker.core)
at the top to make sure your definitions reside in joker.core
namespace and are therefore referred in the namespace being linted.joker.core
vars are now referred in user
namespace (previously, private vars were referred as well)--
to mean only end of Joker options, never stdin. Use -
for stdin. (Thanks @jcburley)requiring-resolve
(from Clojure 1.10)joker --repl localhost:8080
). Thanks @jcburley!cond->
and cond->>
read-line
to read entire lines (thanks @jcburley)joker.os/sh
and joker.os/sh-from
now return integer exit code in :exit
key. (Thanks @jcburley!)--no-readline
. It disables readline functionality in the repl. Useful if joker is called with rlwrap
.joker.core/ex-cause
, joker.core/ex-message
-e <expr>
if not nil
(str <ns>)
now returns namespace's name, while (pr <ns>)
prints #object[Namespace "<name>"]
.--expr
is renamed to --eval
(for consistency with Clojure). (Thanks @jcburley)add-tap
, remove-tap
, tap>
, read+string
, PrintWriter-on
:fn-with-empty-body
flag (defaults to true).:unused-fn-parameters
flag (defaults to false). See https://github.com/candid82/joker/issues/97
unused binding
or unused parameter
warnings if the name starts with underscore.*data-readers*
joker.url
namespace to standard library for encoding / decoding urls..jokerd/linter.clj
)spit
and slurp
:include-macros
linting in ClojureScript (thanks @benalbrecht !)if-let
with one child now gives warning if :if-without-else
is set to true
(https://github.com/candid82/joker/issues/62)joker.os/sh-from
function:unused-as
rule (https://github.com/candid82/joker/issues/59)joker.os/stat
, joker.html/escape
, joker.html/unescape
, joker.html/start-file-server
.jokerd/linter.cljc
(for both Clojure and ClojureScript), .jokerd/linter.clj
(Clojure only), .jokerd/linter.cljs
(ClojureScript only). The rules for locating .jokerd
directory are the same as for locating .joker
file. See #50 for details.joker.http/start-server
functionjoker.time
namespace (see docs)require
(ClojureScript only) (#48)case
macro now works properly (#47)swap-vals!
and reset-vals!
functions (from Clojure 1.9)joker.http/send
, joker.os/mkdir
, joker.os/cwd
, joker.os/ls
, joker.base64/encode-string
, joker.math/sin
, joker.math/cos
, joker.math/hypot
, joker.math/pi
(a var).ex-info
) a map with :message
, :cause
, and :data
keys.joker.core/pprint
function (very basic pretty printing)-e <expression>
will execute provided expression and exit--hashmap-threshold <number>
. Tells Joker the maximum number of slots in array map. A slot is used for either key or value. If there is more keys and values than provided number (defaults to 16), persistent hashmap will be used instead. Negative value means "no limit", so Joker will always use array maps. This parameter is useful when Joker is used to pretty print EDN data structures: setting it to negative value allows prevents Joker from using persistent hashmaps (which don't preserve keys order) and forces it to use array maps instead (which do preserve keys order). For example, the following command can be used to pretty print EDN data structure (read from stdin
):joker --hashmap-threshold -1 -e "(pprint (read))"
:no-forms-threading
to .joker
file. If false
, Joker won't issue a warning on threading macros with no forms (i.e. (-> a)
). Defaults to true
. See https://github.com/candid82/joker/issues/36 for details.case
expressions are now implicitly quoted (https://github.com/candid82/joker/issues/40)--dialect
, --working-dir
(https://github.com/candid82/joker/issues/32). Thanks @nicwest!({})
will now issue a warning)=
, ==
, <
and similar functions with only one argument:refer-macros
properly https://github.com/candid82/joker/issues/23
.
call:known-namespaces
option in .joker
file. It allows to avoid false positives in some edge cases. See https://github.com/candid82/joker/issues/21 for details. Example:{:known-namespaces [clojure.spec.gen.test]}
:known-tags
option in .joker
file. See https://github.com/candid82/joker/issues/24 for details. Example:{:known-tags [db/fn]}
implement better support for defrecord
, deftype
, defmethod
, defprotocol
, extend-type
, reify
, extend-protocol
fix false positives on BigDecimal
fix false positives on symbols with $
alias
and create-ns
and won't complain about symbols or keywords in aliased or created namespaces. See https://github.com/candid82/joker/issues/21 for more details..joker
file:{:known-macros [[riemann.streams/where [service event]]]}
So each element in :known-macros vector can now be either a symbol (as before) or a vector with two elements: macro's name and a list of symbols introduced by this macro. See https://github.com/candid82/joker/issues/20 for the discussion that led to this feature.
new
call.joker
file on windowsjoker.core/joker-version
functionjoker.core/*joker-version*
varjoker.json/write-string
functionjoker.time
standard namespace, currently with only one function joker.time/sleep
array
call in ClojureScript (https://github.com/candid82/joker/issues/18)str
for string, regex and chars(map [1 2] inc)
will result in a warning:Parse warning: arg[1] of #'joker.core/map must have type Seqable, got Fn
joker.os/sh
result now includes correct :success
value (was always true
before, now will be false
if the process exits with non-zero code)