how to check for unnecessary local declarations?
bobsneidar at iotecdigital.com
Wed Jul 1 23:47:23 CEST 2015
Seems you could write a handler to do it pretty easily.
— get stack script
— find “local “
— get word 2 of found line
— filter with “*” & word 2 of found line & “*”
— count number of lines. if only 1 then delete that line
— get list of cards
— repeat for every card
— get card script
— what I just said
— get list of objects on card
— repeat for every object on card
— get script of object
— do I have to repeat myself again??
It might be a little more complicated if you have multiple local variable declarations, but not much.
> On Jul 1, 2015, at 06:44 , Tiemo Hollmann TB <toolbook at kestner.de> wrote:
> I am using the strict compilation mode. When working over longer time on a
> project it regularly happens that I have orphaned local variable
> Actually they don't hurt, but I like to keep my code clean and wonder if
> there is any hidden feature, which checks for not any more needed local
> declarations (beside scripting a check myself)?
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode