[49406] trunk/base/src/port1.0/portlint.tcl
raimue at macports.org
raimue at macports.org
Wed Apr 8 19:32:39 PDT 2009
Revision: 49406
http://trac.macports.org/changeset/49406
Author: raimue at macports.org
Date: 2009-04-08 19:32:39 -0700 (Wed, 08 Apr 2009)
Log Message:
-----------
port1.0/portlint.tcl:
Do some simple checking for hardcoded version numbers instead of ${version}.
Just an idea, can be removed again if it gives too many false positives.
Modified Paths:
--------------
trunk/base/src/port1.0/portlint.tcl
Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl 2009-04-09 02:17:38 UTC (rev 49405)
+++ trunk/base/src/port1.0/portlint.tcl 2009-04-09 02:32:39 UTC (rev 49406)
@@ -282,6 +282,12 @@
incr warnings
}
+ if {![regexp {^PortSystem|^PortGroup|^version|^(perl5|ruby|haskell).setup} $line]
+ && [string first [option version] $line] != -1} {
+ ui_warn "Line $lineno seems to hardcode the version number, consider using \${version} instead"
+ incr warnings
+ }
+
### TODO: more checks to Portfile syntax
incr lineno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090408/a5c215ba/attachment.html>
More information about the macports-changes
mailing list