equal
deleted
inserted
replaced
604 # The only supported special characters are * and ? plus / which also |
604 # The only supported special characters are * and ? plus / which also |
605 # matches \ on windows. Escaping of these caracters is supported. |
605 # matches \ on windows. Escaping of these caracters is supported. |
606 if el + '\n' == l: |
606 if el + '\n' == l: |
607 if os.altsep: |
607 if os.altsep: |
608 # matching on "/" is not needed for this line |
608 # matching on "/" is not needed for this line |
609 log("\nInfo, unnecessary glob: %s (glob)" % el) |
609 return '-glob' |
610 return True |
610 return True |
611 i, n = 0, len(el) |
611 i, n = 0, len(el) |
612 res = '' |
612 res = '' |
613 while i < n: |
613 while i < n: |
614 c = el[i] |
614 c = el[i] |
795 |
795 |
796 r = linematch(el, lout) |
796 r = linematch(el, lout) |
797 if isinstance(r, str): |
797 if isinstance(r, str): |
798 if r == '+glob': |
798 if r == '+glob': |
799 lout = el[:-1] + ' (glob)\n' |
799 lout = el[:-1] + ' (glob)\n' |
800 r = False |
800 r = False |
|
801 elif r == '-glob': |
|
802 log('\ninfo, unnecessary glob in %s (after line %d):' |
|
803 ' %s (glob)\n' % (test, pos, el[-1])) |
|
804 r = True # pass on unnecessary glob |
|
805 else: |
|
806 log('\ninfo, unknown linematch result: %r\n' % r) |
|
807 r = False |
801 if r: |
808 if r: |
802 postout.append(" " + el) |
809 postout.append(" " + el) |
803 else: |
810 else: |
804 if needescape(lout): |
811 if needescape(lout): |
805 lout = stringescape(lout.rstrip('\n')) + " (esc)\n" |
812 lout = stringescape(lout.rstrip('\n')) + " (esc)\n" |