Revision
89610
Author
raimue@macports.org
Date
2012-02-03 15:40:39 -0800 (Fri, 03 Feb 2012)

Log Message

port1.0/portlint.tcl:
Rewrite check for maintainers; warn when using unobfuscated addresses.

Modified Paths

Diff

Modified: trunk/base/src/port1.0/portlint.tcl (89609 => 89610)


--- trunk/base/src/port1.0/portlint.tcl	2012-02-03 23:25:15 UTC (rev 89609)
+++ trunk/base/src/port1.0/portlint.tcl	2012-02-03 23:40:39 UTC (rev 89610)
@@ -496,17 +496,23 @@
         incr errors
     }
 
-    if {[string match "*darwinports@opendarwin.org*" $maintainers]} {
-        ui_warn "Using legacy email address for no/open maintainer"
-        incr warnings
+    foreach addr $maintainers {
+        if {$addr == "nomaintainer@macports.org" ||
+                $addr == "openmaintainer@macports.org"} {
+            ui_warn "Using full email address for no/open maintainer"
+            incr warnings
+        } elseif [regexp "^(.+)@macports.org$" $addr -> name] {
+            ui_warn "Maintainer email address for $name includes @macports.org"
+            incr warnings
+        } elseif {$addr == "darwinports@opendarwin.org"} {
+            ui_warn "Using legacy email address for no/open maintainer"
+            incr warnings
+        } elseif [regexp "^(.+)@(.+)$" $addr -> localpart domain] {
+            ui_warn "Maintainer email address should be obfuscated as $domain:$localpart"
+            incr warnings
+        }
     }
 
-    if {[string match "*nomaintainer@macports.org*" $maintainers] ||
-        [string match "*openmaintainer@macports.org*" $maintainers]} {
-        ui_warn "Using full email address for no/open maintainer"
-        incr warnings
-    }
-
     if {$license == "unknown"} {
         ui_warn "no license set"
         incr warnings