[30277] trunk/base/src/port1.0/portlint.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Tue Oct 23 03:05:15 PDT 2007
Revision: 30277
http://trac.macosforge.org/projects/macports/changeset/30277
Author: afb at macports.org
Date: 2007-10-23 03:05:15 -0700 (Tue, 23 Oct 2007)
Log Message:
-----------
look for newline at EOF (from ryandesign, #12967)
Modified Paths:
--------------
trunk/base/src/port1.0/portlint.tcl
Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl 2007-10-23 09:55:37 UTC (rev 30276)
+++ trunk/base/src/port1.0/portlint.tcl 2007-10-23 10:05:15 UTC (rev 30277)
@@ -166,6 +166,12 @@
while {1} {
set line [gets $f]
if {[eof $f]} {
+ seek $f -1 end
+ set last [read $f 1]
+ if {![string match "\n" $last]} {
+ ui_warn "Line $lineno has missing newline (at end of file)"
+ incr warnings
+ }
close $f
break
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071023/76d69567/attachment.html
More information about the macports-changes
mailing list