This is a quicker alternative to lein eastwood
or lein kibit
when you already have an nREPL running. The main driver is to be able to refer this from Vim for tools like ALE
There are pre-built binaries available in the releases. I sign all releases, so look for the Verified sign!
I use glide to build this project.
Note
|
I had to run git config --global http.https://gopkg.in.followRedirects true with the latest git.
|
$ glide install
$ go build (1)
-
Creates ./clojure-check
You can get output from eastwood & kibit on a running nREPL via
$ ./output -nrepl localhost:33999 -namespace app.website -file - < src/app/website.clj(1)
$ ./output -nrepl localhost:33999 -namespace app.website -file src/app/website.clj
-
Read from Stdin
{:user
{:dependencies
[[jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]]
[jonase/kibit "0.1.3" :exclusions [org.clojure/clojure]]]}}
;; OR merge this with your cider task
(deftask linters "Linter profile"
[]
(require 'boot.repl)
(swap! @(resolve 'boot.repl/*default-dependencies*)
concat '[[jonase/eastwood "0.2.3" :exclusions [org.clojure/clojure]]
[jonase/kibit "0.1.3" :exclusions [org.clojure/clojure]])
identity)
Inspired by fzf I have included a plugin folder in this repo which allows easy integration with Vim. I welcome similar PRs for other editors.
There is ALE integration available in this repo. It depends on Fireplace to find connection details.
Plug 'w0rp/ale' Plug 'SevereOverfl0w/clojure-check', {'do': './install'}
There is Neomake integration available in this repo. It depends on Fireplace to find connection details.
Plug 'neomake/neomake' Plug 'SevereOverfl0w/clojure-check', {'do': './install'} let g:neomake_clojure_enabled_makers = ['check']
It’s easy to integrate clojure-check with :make
in Vim.
Plug 'SevereOverfl0w/clojure-check', {'do': './install'}
As parameters are required for making with this CLI, I suggest you also include the ClojureMake
wrapper for :make
to automatically insert those args, or any similar usage of the same thing.
let &makeprg=g:clojure_check_bin.' $* -file %' command! ClojureMake :execute ':make '.join(ClojureCheckArgs(bufnr('%')))