[READY] Fix YcmShowDetailedDiagnostic command on line without diagnostic
The `YcmShowDetailedDiagnostic` command raises a `NoneType` exception on a line with no diagnostic;
```
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "YouCompleteMe/autoload\..\python\ycm\youcompleteme.py", line 663, in ShowDetailedDiagnostic
if 'message' in detailed_diagnostic:
TypeError: argument of type 'NoneType' is not iterable
```
<!-- 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/3035)
<!-- Reviewable:end -->
Add CUDA support
# PR Prelude
Thank you for working on YCM! :)
**Please complete these steps and check these boxes (by putting an `x` inside
the brackets) _before_ filing your PR:**
- [x] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [x] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [ ] I have included tests for the changes in my PR. If not, I have included a
rationale for why I haven't.
- [x] **I understand my PR may be closed if it becomes obvious I didn't
actually perform all of these steps.**
# Why this change is necessary and useful
This PR follows Valloric/ycmd#1031. The specific changes are listed below:
- enable linting for cuda files
- disable syntastic for cuda files
- update docs
I have not included tests because there are no tests for the C++ counterparts.
[Please explain **in detail** why the changes in this PR are needed.]
[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
<!-- 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/3034)
<!-- Reviewable:end -->
Include the following changes:
- fix issues reported by the flake8-comprehension plugin
- fix regex used to complete include statement
- upgrade regex submodule
- cache flags by file and client data
- upgrade jdt.ls to snapshot 0.18.0
- prevent users from modifying extra conf data
- clang-tidy: performance checks
- api: only split lines on line feed characters (\n)
- remove unused enumerate()
- add tests simulating completer's shutdown timing out
- clang tidy support
- add CUDA support
Updating documentation for FreeBSd 11.x
# PR Prelude
Thank you for working on YCM! :)
**Please complete these steps and check these boxes (by putting an `x` inside
the brackets) _before_ filing your PR:**
- [ X] I have read and understood YCM's [CONTRIBUTING][cont] document.
- [X ] I have read and understood YCM's [CODE_OF_CONDUCT][code] document.
- [ X] I have included tests for the changes in my PR. If not, I have included a
rationale for why I haven't.
- [ X] **I understand my PR may be closed if it becomes obvious I didn't
actually perform all of these steps.**
# Why this change is necessary and useful
The instructions for FreeBSD were not up-to-date. This works for FreeBSD 11.x (the latest). As I've only changed the readme, no tests were run.
[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md
<!-- 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/3016)
<!-- Reviewable:end -->
[READY] Ask users to set the log level to debug when including the contents of the logfiles
When reporting an issue, users may include the contents of the logfiles with the default log level `info`, which is not really useful. Ask them to set the log level to `debug`.
<!-- 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/3012)
<!-- Reviewable:end -->
Include the following changes:
- cache include paths;
- increase Python 2 requirement to 2.7.1;
- force MSVC to treat source files as UTF-8 encoded;
- bundle and compile the regex module;
- use sysconfig instead of distutils.sysconfig in build script.
[READY] Fix smart matching example in documentation
The smart matching example is wrong: `o` can't match `ø` because `ø` is a letter on its own, not a `o` with a combining mark.
<!-- 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/3006)
<!-- Reviewable:end -->
Include the following changes:
- add Unicode support to the filter and sort algorithm;
- replace Boost.Python with pybind11;
- expand environment variables in extra conf options;
- make GoTo and GoToImprecise subcommands jump to declaration if cursor on
definition;
- reset prefix when setting the start column;
- send the full query to the language server completer when forced;
- improve caching behavior;
- add OrganizeImports command to Java completer;
- add Scheme identifier regex;
- update jdt.ls to 0.15.0;
- fix TypeScript diagnostics;
- optimize lines splitting for current file;
- improve TypeScript completion data;
- add GoTo and GoToDeclaration commands to TypeScript completer;
- add TSServer version to debug info;
- replace re module with regex;
- add smart diacritic matching;
- add FixIt command to TypeScript completer;
- add Format command to TypeScript completer;
- add OrganizeImports command to TypeScript completer;
- improve Java project detection heuristics;
- allow the user to manually specify a Java project path;
- improve TeX identifier regex;
- always return detailed completions in TypeScript completer;
- support FixIts in TypeScript completions;
- improve message when regex module installation fails;
- update Boost to 1.67.0;
- update godef;
- add Ctags filetype mapping for PuppetManifest.
[READY] Resend request when extra conf is loaded or ignored
When the client sends a request to the server, if an extra conf file is found that is not already white/blacklisted, the server stops processing the request and tells the client that an unknown extra conf file has been found. The client then asks the user if that file should be loaded or not. Depending on the
user's answer, the client sends a request to the server to load or ignore the extra conf file. Finally, the server loads the file or adds it to the blacklist. However, the initial request was not processed by the server and should be sent again.
Here's a demo illustrating the current situation:
![extra-conf-request-not-resent](https://user-images.githubusercontent.com/10026824/38840090-2d700936-41de-11e8-8b76-87c3eab960cc.gif)
As you can see, the file is not parsed after loading the extra conf file. With the proposed changes:
![extra-conf-request-resent](https://user-images.githubusercontent.com/10026824/38840137-67126670-41de-11e8-8707-88441ab35ac3.gif)
Fixes#2962.
<!-- 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/2988)
<!-- Reviewable:end -->
When the client sends a request to the server, if an extra conf file is found
that is not already white/blacklisted, the server stops processing the request
and tells the client that an unknown extra conf file has been found. The client
then asks the user if that file should be loaded or not. Depending on the
user's answer, the client sends a request to the server to load or ignore the
extra conf file. Finally, the server loads the file or adds it to the
blacklist. However, the initial request was not processed by the server and
should be sent again.
[READY] Do not return omnifunc suggestions if server crashed
We currently return unfiltered and unsorted suggestions from the omnifunc if the `filter_and_sort_candidates` request failed (generally because the server crashed). This behavior is confusing as it may let the user thinks that YCM is working (in a bad way) while in fact it doesn't. No suggestions should be returned 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/youcompleteme/2989)
<!-- Reviewable:end -->
[READY] Check if completion is allowed on character events
We should check if completion is allowed when a character is inserted or deleted like we do with the other events.
<!-- 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/2979)
<!-- Reviewable:end -->
[READY] Refactor server exception handling
Having to wrap all request calls with the `HandleServerException` function is inconvenient. Handle server exceptions directly in `BaseRequest`.
<!-- 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/2976)
<!-- Reviewable:end -->