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) |
---|
-
portlint.tcl
159 159 ui_debug "$portfile" 160 160 161 161 set topline_number 1 162 set require_blank false163 set require_after ""164 162 set seen_portsystem false 165 163 set seen_portgroup false 166 164 set in_description false … … 190 188 incr errors 191 189 } 192 190 193 if {[string equal "PortSystem" $require_after] && \194 [string match "PortGroup*" $line]} {195 set require_blank false196 }197 198 if {$require_blank && ($line != "")} {199 ui_warn "Line $lineno should be a newline (after $require_after)"200 incr warnings201 }202 set require_blank false203 204 191 if {[regexp {\S[ \t]+$} $line]} { 205 192 # allow indented blank lines between blocks of code and such 206 193 ui_warn "Line $lineno has trailing whitespace before newline" … … 216 203 incr warnings 217 204 } elseif {($lineno == $topline_number)} { 218 205 ui_info "OK: Line $lineno has RCS tag (\$Id\$)" 219 set require_blank true220 set require_after "RCS tag"221 206 } 222 207 223 208 if {[string match "PortSystem*" $line]} { … … 231 216 incr errors 232 217 } 233 218 set seen_portsystem true 234 set require_blank true235 set require_after "PortSystem"236 219 } 237 220 if {[string match "PortGroup*" $line]} { 238 221 if {$seen_portgroup} { … … 245 228 incr errors 246 229 } 247 230 set seen_portgroup true 248 set require_blank true249 set require_after "PortGroup"250 231 } 251 232 252 233 # TODO: check for repeated variable definitions … … 258 239 } 259 240 if {$in_description && ([string range $line end end] != "\\")} { 260 241 set in_description false 261 #set require_blank true262 #set require_after "long_description"263 } elseif {$in_description} {264 set require_blank false265 242 } 266 243 267 244 if {[string match "variant*" $line]} {