Warn on unused bindings (strict lint).

This does create a lot of warnings, especially in the test suite, but
should improve code and point out real issues.

To disable individual messages, either disable linting, add the metadata :unused to a
binding, or add the prefix "_" to a symbol.
This commit is contained in:
Calvin Rose
2026-01-10 07:59:11 -06:00
parent 84ced08810
commit ddc7cc5ae4
22 changed files with 81 additions and 26 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
(broadcast name (string msg)))
(print name " disconnected")))))
(defn main [& args]
(defn main [&]
(printf "STARTING SERVER...")
(flush)
(def my-server (net/listen "127.0.0.1" "8000"))
+2 -2
View File
@@ -132,7 +132,7 @@
"Go to the next breakpoint."
[&opt n]
(var res nil)
(for i 0 (or n 1)
(repeat (or n 1)
(set res (resume (.fiber))))
res)
@@ -146,6 +146,6 @@
"Execute the next n instructions."
[&opt n]
(var res nil)
(for i 0 (or n 1)
(repeat (or n 1)
(set res (debug/step (.fiber))))
res)
+1 -1
View File
@@ -2,7 +2,7 @@
(def counts (seq [_ :range [0 100]] 0))
(for i 0 1000000
(repeat 1000000
(let [x (math/random)
intrange (math/floor (* 100 x))
oldcount (counts intrange)]
+1 -1
View File
@@ -7,7 +7,7 @@
(ev/give chan (math/random))
(ev/give chan (math/random))
(ev/sleep 0.5)
(for i 0 10
(repeat 10
(print "giving to channel...")
(ev/give chan (math/random))
(ev/sleep 1))