~pepe/jlnt.kak

8e14d05f82de371f6713a336b733b7b8d21eb7d7 — Josef Pospíšil 3 months ago edcb981 master
Add license, remove unused importers
2 files changed, 20 insertions(+), 1 deletions(-)

A LICENSE
M jlnt
A LICENSE => LICENSE +19 -0
@@ 0,0 1,19 @@
Copyright (c) 2020 Calvin Rose and contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

M jlnt => jlnt +1 -1
@@ 13,6 13,7 @@

(defn warns [file]
  (def emit (partial printf "%s:%i:%i: %s: %s" file))

  (defn warning-forms [pos forms]
    (defn three [sym subst]
      (if (some |(= (length $) 3) ((walk-for sym) forms))


@@ 22,7 23,6 @@
      (emit ;pos "warning" "`tracev`"))
    (three 'when 'if)
    (three 'unless 'if-not))
  (def- importers {'import true 'import* true 'dofile true 'require true})

  (with [f (file/open file :r)]
    (var lines 0)