Page 1 of 1

un-declare symbols check tool for newLISP

Posted: Tue Jan 13, 2015 12:24 pm
by ssqq
I write a tool for checking un-declare symbol of newLISP code, it need improve more.

https://github.com/songzan/Spp/blob/master/strict.lsp

If you want test it, pls link it first (or change default *main-args* number):

On Winxp:

> newlisp -x strict.lsp strict.exe
> strict your-script.lsp

On Linux:

> newlisp -x strict.lsp strict
> chmod 755 strict
> ./strict your-script.lsp

1. all un-declare symbol would output an warning.
2. all un-used symbol declared with *local*, *let*, *letn*, *letex* would output an warning.
3. all symbol declared with *set* or *setq* in *lexical scope* would throw an warning.

todo:

1. could not check the symbols *import* from C module
2. could not check *other* context symbols.
3. could not check symbol created with *new* or *bind*.
4. warning message have not the line number and pos message.

welcome give me some suggest.

Re: un-declare symbols check tool for newLISP

Posted: Wed Feb 10, 2016 9:42 am
by TedWalther
Very nice. Any further development on it? I really could have used this last summer, but my brain overlooked your post. Sorry.