mirror of
https://github.com/janet-lang/janet
synced 2026-04-23 15:21:28 +00:00
Merge pull request #1681 from tw4452852/push-somyznopprwr
Apply :flycheck on def as well
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