Ignore:
Timestamp:
Feb 3, 2008, 7:17:05 PM (10 years ago)
Author:
ryandesign@…
Message:

Make trailing whitespace check more elegant, and thus also fix the erroneous warning printed when an otherwise empty line ends with trailing spaces; this corrects the fix originally made in r28568; see #14165.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/src/port1.0/portlint.tcl

    r33680 r33705  
    201201        set require_blank false
    202202
    203         if {[string match "* " $line] || [string match "*\t" $line] &&
    204             [string trim $line] != "" } {
     203        if {[regexp {\S[ \t]+$} $line]} {
    205204            # allow indented blank lines between blocks of code and such
    206205            ui_warn "Line $lineno has trailing whitespace before newline"
Note: See TracChangeset for help on using the changeset viewer.