--check is now --lint

This commit is contained in:
XeroOl 2024-06-23 15:44:35 -05:00
parent 664ba9b13d
commit d8bfaa3559
2 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
(local json-rpc (require :fennel-ls.json-rpc))
(λ check [filenames]
"non-interactive mode that gets executed from CLI with --check.
"non-interactive mode that gets executed from CLI with --lint.
runs lints on each file, then formats and prints them"
(local files (require :fennel-ls.files))
(local lint (require :fennel-ls.lint))
@ -38,10 +38,10 @@
(λ main []
(case arg
["--check" & filenames] (check filenames)
["--lint" & filenames] (check filenames)
(where (or ["--server"] [nil])) (main-loop (io.input)
(io.output))
_args (do (io.stderr:write "USAGE: fennel-ls [--check file] [--server]\n")
_args (do (io.stderr:write "USAGE: fennel-ls [--lint file] [--server]\n")
(os.exit 1))))
(main)

View File

@ -7,11 +7,11 @@
(doto (io.open input-file-name :w)
(: :write "(local x 1)")
(: :close))
(let [output-file (io.popen (.. "./fennel-ls --check "
(let [output-file (io.popen (.. "./fennel-ls --lint "
input-file-name)
:r)]
(faith.= (.. input-file-name ":1:7: unused definition: x\n")
(output-file:read :*a) )
(output-file:read :*a))
(os.remove input-file-name))
nil))