Mercurial > irccd
view vera/rules/L003.tcl @ 651:1081e45b8628
Tests: use command_test::request helper, closes #784 @1h
author | David Demelier <markand@malikania.fr> |
---|---|
date | Tue, 27 Mar 2018 20:12:02 +0200 |
parents | 6ec510722582 |
children |
line wrap: on
line source
#!/usr/bin/tclsh # No leading and no trailing empty lines foreach f [getSourceFileNames] { set lineCount [getLineCount $f] if {$lineCount > 0} { set firstLine [getLine $f 1] if {[string trim $firstLine] == ""} { report $f 1 "leading empty line(s)" } set lastLine [getLine $f $lineCount] if {[string trim $lastLine] == ""} { report $f $lineCount "trailing empty line(s)" } } }