UnboundLocalError
qdwang opened this issue · 2 comments
qdwang commented
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/blabla/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/queue.py", line 66, in loop
self.lint(view_id, timestamp)
File "/Users/blabla/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/queue.py", line 112, in lint
self.callback(view_id, timestamp)
File "/Users/blabla/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/sublimelinter.py", line 123, in lint
Linter.lint_view(view, filename, code, hit_time, callback)
File "/Users/blabla/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 917, in lint_view
linter.lint(hit_time)
File "/Users/blabla/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 1324, in lint
for match, line, col, error, warning, message, near in self.find_errors(output):
File "/Users/blabla/Library/Application Support/Sublime Text 3/Packages/SublimeLinter/lint/linter.py", line 1640, in find_errors
yield self.split_match(self.regex.match(line.rstrip()))
File "linter in /Users/blabla/Library/Application Support/Sublime Text 3/Installed Packages/SublimeLinter-contrib-rustc.sublime-package", line 130, in split_match
UnboundLocalError: local variable 'path' referenced before assignment
SublimeLinter: --------------------
joneshf commented
Same issue here.
Problem looks like you can fall through here: https://github.com/oschwald/SublimeLinter-contrib-rustc/blob/master/linter.py#L125-L128 without setting path
.
oschwald commented
Thanks. I missed this as I almost always use it with Cargo. I released a fix.