-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[READY] Handle zero column diagnostic from OmniSharp #883
[READY] Handle zero column diagnostic from OmniSharp #883
Conversation
Reviewed 3 of 3 files at r1. Comments from Reviewable |
The OmniSharp server sometimes incorrectly returns diagnostics with the column number sets to 0. Assume the column number is 1 in that case.
ee341a0
to
5c8ff8f
Compare
Codecov Report
@@ Coverage Diff @@
## master #883 +/- ##
==========================================
- Coverage 94.97% 94.69% -0.29%
==========================================
Files 79 41 -38
Lines 5457 4016 -1441
Branches 172 0 -172
==========================================
- Hits 5183 3803 -1380
+ Misses 226 213 -13
+ Partials 48 0 -48 |
@zzbot r+ Reviewed 3 of 3 files at r1. Comments from Reviewable |
📌 Commit 5c8ff8f has been approved by |
…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 -->
☀️ Test successful - status-appveyor, status-travis |
[READY] Update ycmd Include the following changes: - PR ycm-core/ycmd#789: add support for Windows flags when --driver-mode=cl is given; - PR ycm-core/ycmd#848: hide C++ symbols by default; - PR ycm-core/ycmd#857: add Java support using jdt.ls; - PR ycm-core/ycmd#861: translate libclang error codes to exceptions; - PR ycm-core/ycmd#880: support downloading Clang binaries on ARM systems; - PR ycm-core/ycmd#883: handle zero column diagnostic from OmniSharp; - PR ycm-core/ycmd#884: specify Platform property when compiling OmniSharp; - PR ycm-core/ycmd#886: use current working directory in JavaScript completer; - PR ycm-core/ycmd#887: update Boost to 1.66.0; - PR ycm-core/ycmd#888: update JediHTTP; - PR ycm-core/ycmd#889: update Clang to 5.0.1; - PR ycm-core/ycmd#891: fix building with system libclang on Gentoo amd64; - PR ycm-core/ycmd#904: drop Python 2.6 and Python 3.3 support; - PR ycm-core/ycmd#905: calculate the start column when items are not resolved in the language server completer; - PR ycm-core/ycmd#912: download Clang binaries from HTTPS; - PR ycm-core/ycmd#914: do not try to symlink libclang on Windows. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2902) <!-- Reviewable:end -->
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:
See ycm-core/YouCompleteMe#2846 (comment). We assume the column number is 1 in that case.
This change is