You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
unit_testing_syntax_compatibility reports column as line+column (location[0] + location[1]) #297
location is (line, column) (0-based, as returned by sublime_api.incompatible_syntax_patterns). The line is converted correctly (location[0] + 1), but the column is computed as location[0] + location[1], i.e. line plus column, so the reported column grows with the line number and points to the wrong place. It should be location[1] + 1. Because the output is matched by result_file_regex, jumping to the error from the output panel also lands in the wrong place.
Repro (UnitTesting 1.11.1, Sublime Text 4200)
Packages/ZZ/bad.sublime-syntax (patterns start at 0-based column 12-14 on lines 9, 11, 13):
Line 9 (0-based): - match: '(?<!a)b(?>c+)d'
Line 11 (0-based): - match: '\Gxyz'
Line 13 (0-based): - match: '(a)\1(?<n>q)\k<n>'
sublime_api.incompatible_syntax_patterns(...) returns [((9, 12), (0, 0), 'Negative look behind is not supported'), ((11, 12), (0, 0), '\G is unsupported'), ((13, 12), (0, 3), 'Back references are unsupported')], but the command's output is:
Packages/ZZ/bad.sublime-syntax:10:21: Negative look behind is not supported
Packages/ZZ/bad.sublime-syntax:12:23: \G is unsupported
Packages/ZZ/bad.sublime-syntax:14:25: Back references are unsupported
Columns 21, 23, 25 are 9+12, 11+12, 13+12; the real column is 12 (13 in 1-based).
Activity
Fix reported line:column in unit_testing_syntax_compatibility (Sublim…