Ticket #14799: portlint.tcl.blank-lines.diff

File portlint.tcl.blank-lines.diff, 2.1 KB (added by ryandesign (Ryan Carsten Schmidt), 17 years ago)

don't warn about missing blank lines

  • portlint.tcl

     
    159159    ui_debug "$portfile"
    160160
    161161    set topline_number 1
    162     set require_blank false
    163     set require_after ""
    164162    set seen_portsystem false
    165163    set seen_portgroup false
    166164    set in_description false
     
    190188            incr errors
    191189        }
    192190
    193         if {[string equal "PortSystem" $require_after] && \
    194             [string match "PortGroup*" $line]} {
    195             set require_blank false
    196         }
    197 
    198         if {$require_blank && ($line != "")} {
    199             ui_warn "Line $lineno should be a newline (after $require_after)"
    200             incr warnings
    201         }
    202         set require_blank false
    203 
    204191        if {[regexp {\S[ \t]+$} $line]} {
    205192            # allow indented blank lines between blocks of code and such
    206193            ui_warn "Line $lineno has trailing whitespace before newline"
     
    216203            incr warnings
    217204        } elseif {($lineno == $topline_number)} {
    218205            ui_info "OK: Line $lineno has RCS tag (\$Id\$)"
    219             set require_blank true
    220             set require_after "RCS tag"
    221206        }
    222207
    223208        if {[string match "PortSystem*" $line]} {
     
    231216                 incr errors
    232217            }
    233218            set seen_portsystem true
    234             set require_blank true
    235             set require_after "PortSystem"
    236219        }
    237220        if {[string match "PortGroup*" $line]} {
    238221            if {$seen_portgroup} {
     
    245228                 incr errors
    246229            }
    247230            set seen_portgroup true
    248             set require_blank true
    249             set require_after "PortGroup"
    250231        }
    251232
    252233        # TODO: check for repeated variable definitions
     
    258239        }
    259240        if {$in_description && ([string range $line end end] != "\\")} {
    260241            set in_description false
    261             #set require_blank true
    262             #set require_after "long_description"
    263         } elseif {$in_description} {
    264             set require_blank false
    265242        }
    266243
    267244        if {[string match "variant*" $line]} {