Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #883 - micbou:cs-completer-zero-column-diagnostic, r=pu…
…remourning [READY] Handle zero column diagnostic from OmniSharp The OmniSharp server sometimes incorrectly returns diagnostics with a column number of 0 while lines and columns are supposed to be 1-indexed. This causes the following error: ``` Traceback (most recent call last): File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\third_party\bottle\bottle.py", line 862, in _handle return route.call(**args) File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\third_party\bottle\bottle.py", line 1740, in wrapper rv = callback(*a, **ka) File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\ycmd\..\ycmd\watchdog_plugin.py", line 108, in wrapper return callback( *args, **kwargs ) File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\ycmd\..\ycmd\hmac_plugin.py", line 70, in wrapper body = callback( *args, **kwargs ) File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\ycmd\..\ycmd\handlers.py", line 70, in EventNotification event_handler )( request_data ) File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\ycmd\..\ycmd\completers\cs\cs_completer.py", line 214, in OnFileReadyToParse self._diagnostic_store = DiagnosticsToDiagStructure( diagnostics ) File "C:\Users\micbou\projects\YouCompleteMe\third_party\ycmd\ycmd\..\ycmd\completers\cs\cs_completer.py", line 611, in DiagnosticsToDiagStructure structure[ diagnostic.location_.filename_ ][ AttributeError: 'NoneType' object has no attribute 'filename_' ``` See ycm-core/YouCompleteMe#2846 (comment). We assume the column number is 1 in that case. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/883) <!-- Reviewable:end -->
- Loading branch information