mirror of
https://github.com/janet-lang/janet
synced 2026-04-23 23:31:28 +00:00
Apply :flycheck on def as well
Signed-off-by: Tw <tw19881113@gmail.com> Change-Id: I7bd10cbaa838b44794f8a881b0deedd06a6a6964
This commit is contained in:
@@ -4110,8 +4110,17 @@
|
||||
true))
|
||||
|
||||
(defn- is-safe-def [thunk source env where]
|
||||
(if (no-side-effects (last source))
|
||||
(thunk)))
|
||||
(if-let [ve (get env (source 1))
|
||||
fc (get ve :flycheck)]
|
||||
(cond
|
||||
# Sometimes safe form
|
||||
(function? fc)
|
||||
(fc thunk source env where)
|
||||
# Always safe form
|
||||
fc
|
||||
(thunk))
|
||||
(if (no-side-effects (last source))
|
||||
(thunk))))
|
||||
|
||||
(defn- flycheck-importer
|
||||
[thunk source env where]
|
||||
|
||||
Reference in New Issue
Block a user