Menu

Tree [r3] /
 History

HTTPS access


File Date Author Commit
 README.txt 2023-04-25 lloydwood [r3] Fixing repeated naming error in README.
 global-var-test-cases.tcl 2020-01-26 lloydwood [r2] iWe fixed that bug by not zealously removing the
 lint-global-vars.tcl 2020-01-26 lloydwood [r1] Initial commit

Read Me

SIMPLE Tcl LINT FOR GLOBAL VARIABLES
====================================

(c) 2020 Lloyd Wood <lloydwood@users.sourceforge.net>

This simple script attempts to identify and report
unnecessary global variables that are declared,
but are not used, in Tcl procedures.


Use is:
	./lint-global-vars.tcl file.tcl
or
	./lint-global-vars.tcl <list of files>

Try:
	./lint-global-vars.tcl *.tcl | more
to report on an entire directory of Tcl
sourcefiles.


Sample test cases can be checked by running:
	./lint-global-vars.tcl global-var-test-cases.tcl


Some caveats:

- Seemingly unused global variables declared in
  a procedure that sources a script may be relied
  on and used by the sourced script.

- it is possible to have a global declaration
  of a variable called 'global', which makes
  checking slightly more difficult.


Lloyd wrote this to tidy up the Tcl/Tk-based SaVi
satellite constellation visualization software:
	http://savi.sourceforge.net/
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.