newLISP Fan Club

Forum => So, what can you actually DO with newLISP? => Topic started by: ssqq on January 13, 2015, 04:24:37 AM

Title: un-declare symbols check tool for newLISP
Post by: ssqq on January 13, 2015, 04:24:37 AM
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.
Title: Re: un-declare symbols check tool for newLISP
Post by: TedWalther on February 10, 2016, 01:42:21 AM
Very nice.  Any further development on it?  I really could have used this last summer, but my brain overlooked your post.  Sorry.