Add clj-kondo dependency for linting.

This commit is contained in:
Andrey Antukh 2020-02-24 15:29:12 +01:00
parent 87d355f705
commit 555210175e
5 changed files with 22 additions and 8 deletions

View file

@ -5,7 +5,7 @@
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2016-2019 Andrey Antukh <niwi@niwi.nz>
;; Copyright (c) 2016-2020 Andrey Antukh <niwi@niwi.nz>
(ns user
(:require
@ -17,6 +17,7 @@
[clojure.java.io :as io]
[clojure.repl :refer :all]
[criterium.core :refer [quick-bench bench with-progress-reporting]]
[clj-kondo.core :as kondo]
[promesa.core :as p]
[promesa.exec :as px]
[uxbox.migrations]
@ -71,3 +72,17 @@
(do (require (symbol sns))
(test/test-vars [(resolve o)]))
(test/test-ns o)))))
(defn lint
([] (lint ""))
([path]
(-> (kondo/run!
{:lint [(str "src/" path)]
:cache false
:config {:linters
{:unresolved-symbol
{:exclude ['(uxbox.services.mutations/defmutation)
'(uxbox.services.queries/defquery)
'(promesa.core/let)]}}}})
(kondo/print!))))