Ticket #48692: portlint.diff

File portlint.diff, 984 bytes (added by kurthindenburg (Kurt Hindenburg), 9 years ago)
  • port1.0/portlint.tcl

     
    149149    set require_after ""
    150150    set seen_portsystem false
    151151    set seen_portgroup false
     152    set seen_revision false
    152153    set in_description false
    153154
    154155    array set portgroups {}
     
    329330            incr errors
    330331        }
    331332
     333        if {[string match "revision*" $line]} {
     334            set seen_revision true
     335        }
     336
    332337        ### TODO: more checks to Portfile syntax
    333338
    334339        incr lineno
     
    430435        ui_error "Port revision is not numeric: $revision"
    431436        incr errors
    432437    }
     438    if {$seen_revision && [string is integer -strict $revision] && $revision == 0} {
     439        ui_warn "Port revision matches the default so no need to include it: $revision"
     440        incr warnings
     441    }
    433442
    434443    set variantnumber 1
    435444    foreach variant $all_variants {