Commit Graph

2136 Commits

Author SHA1 Message Date
dhleong
0babb4b102 Cleanup 2016-11-03 11:21:15 -04:00
dhleong
0523ad02c0 Fix InsertNamespace indent matching
Aso updates the appropriate tests and adds docs to some
relevant methods whose behavior might be confusing
2016-11-02 08:08:30 -04:00
Homu
fc4e326ab6 Auto merge of #2423 - micbou:gitter, r=micbou
[READY] Add Gitter badge and encourage users to ask questions on Gitter

This may help reduce the number of issues opened for questions or misconfigurations. This is also an alternative to the Google group for users that can't access it because of country regulations.

<!-- 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/2423)
<!-- Reviewable:end -->
2016-11-02 05:28:35 +09:00
dhleong
26141253a5 Add some tests for InsertNamespace 2016-11-01 08:28:28 -04:00
dhleong
62a815275f Fix InsertNamespace
ReplaceChunk must have changed to require the buffer at some point
2016-10-31 17:00:45 -04:00
micbou
9605c1d50a
Add Gitter badge 2016-10-31 18:13:36 +01:00
Homu
c895f09375 Auto merge of #2396 - dpzmick:patch-1, r=micbou
Update README.md

# 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.**

[cont]: https://github.com/Valloric/YouCompleteMe/blob/master/CONTRIBUTING.md
[code]: https://github.com/Valloric/YouCompleteMe/blob/master/CODE_OF_CONDUCT.md

# Why this change is necessary and useful
ycmd has this support: https://github.com/Valloric/ycmd/pull/628

no tests needed, only a change to docs

<!-- 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/2396)
<!-- Reviewable:end -->
2016-10-28 15:47:24 +09:00
Homu
bf67f78e2d Auto merge of #2412 - micbou:appveyor-coverage, r=Valloric
[READY] Enable coverage on AppVeyor

I forgot to do that when adding coverage.

Also, the `cover` folder is created at the project root, not in the `python` folder.

<!-- 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/2412)
<!-- Reviewable:end -->
2016-10-28 13:06:48 +09:00
David Zmick
0acafe7fc7 Update README.md
https://github.com/Valloric/ycmd/pull/628
2016-10-27 20:14:49 -05:00
micbou
bc8040f10c
Ignore cover folder 2016-10-27 23:05:58 +02:00
micbou
066657fca2
Enable coverage on AppVeyor 2016-10-27 23:05:50 +02:00
Homu
6e52536f70 Auto merge of #2407 - micbou:remove-unloaded-buffer-parameter, r=vheon
[READY] Remove unloaded_buffer parameter

See PR https://github.com/Valloric/ycmd/pull/542.

<!-- 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/2407)
<!-- Reviewable:end -->
2016-10-28 01:44:10 +09:00
micbou
f6ffe1f1a6
Remove unloaded_buffer parameter 2016-10-27 01:48:33 +02:00
Homu
d55b5c09d6 Auto merge of #2394 - micbou:move-client-tests, r=Valloric
[READY] Move client tests to the main tests folder

This makes it possible to configure all tests at a package level by implementing the `setUpPackage` and `tearDownPackage` functions in `python/ycm/tests/__init__.py` file.

<!-- 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/2394)
<!-- Reviewable:end -->
2016-10-26 07:46:33 +09:00
Homu
03835a9afc Auto merge of #2405 - micbou:called-process-error, r=Valloric
[READY] Catch CalledProcessError exception in install script

See PR https://github.com/Valloric/ycmd/pull/630.

Closes https://github.com/Valloric/YouCompleteMe/pull/2351.

<!-- 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/2405)
<!-- Reviewable:end -->
2016-10-26 06:16:44 +09:00
Homu
79ddf746b4 Auto merge of #2406 - micbou:shutdown-request, r=Valloric
[READY] Remove unused code in shutdown request

This is what happens when you copy paste code.

<!-- 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/2406)
<!-- Reviewable:end -->
2016-10-26 06:15:34 +09:00
micbou
62ff65006f
Remove unused code in shutdown request 2016-10-25 17:59:17 +02:00
micbou
7b251dbd58
Catch CalledProcessError exception in install script
This exception is not relevant to the install failure. Catch it and exit
with the status code returned by the build script.
2016-10-25 16:44:41 +02:00
Homu
ffbe7b032f Auto merge of #2398 - micbou:secure-temp, r=Valloric
[READY] Create temporary files in a secure manner

Fixes #2395.

Depends on PR https://github.com/Valloric/ycmd/pull/629.

<!-- 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/2398)
<!-- Reviewable:end -->
2016-10-25 17:45:03 +09:00
micbou
c991f04905
Create temporary files in a secure manner
Fixes #2395.
2016-10-24 22:45:15 +02:00
Homu
f27787f263 Auto merge of #2377 - dhleong:dhleong/#2021-quiet_messages, r=micbou
Implement ycm_quiet_messages options (See #2021)

# PR Prelude

- [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

See issue #2021. This is a partial implementation based on the syntastic option referenced, supporting the `!` flag and filters of type `regex` and `level`. Also supports filetype specific filters using `ycm_<ft>_quiet_messages`, but I couldn't think of a great way to fall back to syntastic configs for this one.

In terms of usefulness: I've been playing with C# recently, which has a bunch of style warnings that I don't want to follow, and prefer to only have the gutter showing if there are actually errors, or warnings that I *do* want to follow.

<!-- 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/2377)
<!-- Reviewable:end -->
2016-10-24 10:46:06 +09:00
Homu
4da8868a50 Auto merge of #2391 - micbou:refactor-tests-current-directory, r=Valloric
[READY] Fix unicode issues when working with current directory on Python 2

This PR replaces each occurrence of `os.getcwd` by [the function helper `GetCurrentDirectory`](https://github.com/Valloric/ycmd/blob/master/ycmd/utils.py#L450) added in PR https://github.com/Valloric/ycmd/pull/622. This fixes three different issues covered by the new tests.

As in PR https://github.com/Valloric/ycmd/pull/622, I am only pushing the tests for now so that you can see the errors yourself. Note that these tests are only failing on Python 2 and the `CreateCompletionRequest_UnicodeWorkingDirectory` test only fails on Windows.

Fixes #2375.

<!-- 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/2391)
<!-- Reviewable:end -->
2016-10-24 07:11:54 +09:00
dhleong
7e12c127cf Wrap README.md to 80 chars 2016-10-23 12:29:29 -04:00
dhleong
04c48e48c4 Rebuild the vim doc 2016-10-23 10:50:58 -04:00
dhleong
13fda74cc1 Refactor _FilterDiagnostics to rely on _ApplyDiagnosticFilter
Also builds the predicates using compilers from diagnostic_filter
2016-10-23 10:29:54 -04:00
dhleong
e2852a8b2b Update to use appropriate test_utils package after rebase 2016-10-22 23:33:43 -04:00
dhleong
7978215bca Refactor filter to not be initialized every time
We eagerly compile all the filters up front, then gather the
compiled filters into a DiagnosticFilter lazily, caching the
result to avoid garbage lists.
2016-10-22 23:31:46 -04:00
dhleong
b8280c7b19 Rename diagnostic_filter_tests -> diagnostic_filter_test 2016-10-22 23:31:46 -04:00
dhleong
18a25d45b3 Style refactor and cleanup 2016-10-22 23:31:46 -04:00
dhleong
bb793826b6 Refactor filter spec to filter_diagnostics; update tests, README 2016-10-22 23:31:46 -04:00
dhleong
3869830a65 Rename method for clarity and tweak style 2016-10-22 23:31:46 -04:00
dhleong
68cf0220e5 Remove unnecessary print() 2016-10-22 23:31:46 -04:00
dhleong
4c53e5d006 Use future.utils iterkeys; fix some more style issues 2016-10-22 23:31:46 -04:00
dhleong
abc0dd5e31 Add some documentation for g:ycm_quiet_messages 2016-10-22 23:31:46 -04:00
dhleong
ca29f6abe8 Verify that an empty list overrides (disables) rules 2016-10-22 23:31:46 -04:00
dhleong
f15f9f2255 Fix style/lint issues 2016-10-22 23:31:46 -04:00
dhleong
d274dcd37a Fix test error 2016-10-22 23:31:46 -04:00
dhleong
73343bd98f Support filtering on level/kind 2016-10-22 23:31:46 -04:00
dhleong
f7fbbd16f7 Implement a preliminary quest_messages with regex support 2016-10-22 23:31:46 -04:00
micbou
993f0ef7b6
Move client tests to the main tests folder 2016-10-20 00:24:38 +02:00
micbou
234658f30b
Use helper function to get current directory
Fix tests.
2016-10-18 15:35:51 +02:00
micbou
3109c9d8a4
Add tests for current directory 2016-10-18 02:22:28 +02:00
Homu
ddf18cc6ec Auto merge of #2389 - micbou:coverage-test-utils, r=Valloric
[READY] Move test_utils.py file to tests folder

We don't want `test_utils.py` to appear in the coverage reports. Instead of blacklisting it in `.coveragerc`, we move it to the tests folder.

This will decrease coverage.

<!-- 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/2389)
<!-- Reviewable:end -->
2016-10-15 21:19:46 +09:00
micbou
fa10f33c2a
Move test_utils to tests folder
This remove the file from coverage.
2016-10-15 04:03:48 +02:00
Homu
5cf5f04dd7 Auto merge of #2386 - micbou:refactor-tests, r=Valloric
[READY] Refactor tests using a YouCompleteMe instance

This PR adds a decorator function, similar to the `IsolatedYcmd` and `SharedYcmd` decorators from ycmd, that passes a YouCompleteMe object to tests. Its options can be customized with the parameter of the decorator. I need this to write new tests.

There is one thing annoying with this change is that Vim does not highlight a decorator function with no character between the parentheses so `@YouCompleteMeInstance()` will not be highlighted. I've contacted the maintainer of the Python syntax file about this bug. Anyway, that's not a good reason to not make this change.

<!-- 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/2386)
<!-- Reviewable:end -->
2016-10-15 10:30:12 +09:00
micbou
8d015c95cc
Refactor tests using a YouCompleteMe instance 2016-10-14 02:18:51 +02:00
Homu
5465bb0892 Auto merge of #2385 - micbou:coverage, r=vheon
[READY] Add coverage support

There should not have anything to configure on codecov website.

I updated the `run_tests` script to behave exactly like the one in ycmd repository: when passing tests as arguments, you need to specify the path from the root project, not the `python` folder. For instance:
```
./run_tests.py --skip-build -- python/ycm/tests/event_notification_test.py
```
instead of
```
./run_tests.py --skip-build -- ycm/tests/event_notification_test.py
```
This way, you can now complete the path to the test.

<!-- 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/2385)
<!-- Reviewable:end -->
2016-10-14 04:06:41 +09:00
micbou
9d6a17b140
Add coverage support
Use codecov for coverage reports. Add badge to README.
2016-10-12 23:03:37 +02:00
Homu
0a13855419 Auto merge of #2382 - micbou:postcomplete-test, r=puremourning
[READY] Rename postcomplete tests file to be consistent with other tests name

I couldn't resist.

<!-- 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/2382)
<!-- Reviewable:end -->
2016-10-13 02:02:56 +09:00
micbou
cbe53c1f3e
Rename postcomplete tests file
Rename postcomplete_tests.py file to be consistent with other tests
name. Update its copyright date.
2016-10-12 05:13:06 +02:00