Skip to content
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] Do not sort header paths in filename completer #824

Merged
merged 1 commit into from
Aug 30, 2017

Conversation

micbou
Copy link
Collaborator

@micbou micbou commented Aug 29, 2017

There is no point in sorting header paths and removing duplicates by converting the list to a set in the filename completer since the paths are going through the FilterAndSortCandidates function even when the query is empty (thanks to PR #819).

Rewrite the filename completer tests to use the contains_inanyorder and empty matchers.


This change is Reviewable

Refactor filename completer tests.
@codecov-io
Copy link

codecov-io commented Aug 29, 2017

Codecov Report

Merging #824 into master will decrease coverage by 0.01%.
The diff coverage is 96.49%.

@@            Coverage Diff             @@
##           master     #824      +/-   ##
==========================================
- Coverage   94.84%   94.82%   -0.02%     
==========================================
  Files          79       79              
  Lines        5373     5374       +1     
  Branches      169      168       -1     
==========================================
  Hits         5096     5096              
  Misses        231      231              
- Partials       46       47       +1

@bstaletic
Copy link
Collaborator

:lgtm:


Reviewed 2 of 2 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@Valloric
Copy link
Member

So the user will still see sorted paths, right? If that's true, then :lgtm: .


Review status: all files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@bstaletic
Copy link
Collaborator

@Valloric This does keep paths sorted for the end user. I just tried this PR to confirm.

@zzbot r+


Review status: :shipit: all files reviewed at latest revision, all discussions resolved, all commit checks successful.


Comments from Reviewable

@zzbot
Copy link
Contributor

zzbot commented Aug 30, 2017

📌 Commit f959308 has been approved by bstaletic

zzbot added a commit that referenced this pull request Aug 30, 2017
[READY] Do not sort header paths in filename completer

There is no point in sorting header paths and removing duplicates by converting the list to a set in the filename completer since the paths are going through the `FilterAndSortCandidates` function even when the query is empty (thanks to PR #819).

Rewrite the filename completer tests to use the `contains_inanyorder` and `empty` matchers.

<!-- 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/824)
<!-- Reviewable:end -->
@zzbot
Copy link
Contributor

zzbot commented Aug 30, 2017

⌛ Testing commit f959308 with merge d91ed5e...

@zzbot
Copy link
Contributor

zzbot commented Aug 30, 2017

☀️ Test successful - status-travis
Approved by: bstaletic
Pushing d91ed5e to master...

@zzbot zzbot merged commit f959308 into ycm-core:master Aug 30, 2017
@micbou micbou deleted the no-header-paths-sorting branch September 5, 2017 12:03
zzbot added a commit to ycm-core/YouCompleteMe that referenced this pull request Sep 10, 2017
[READY] Update ycmd

This new version of ycmd includes the following changes:

 - PR ycm-core/ycmd#795: add option to make relative paths in flags from extra conf absolute;
 - PR ycm-core/ycmd#802: fix compilation on Haiku;
 - PR ycm-core/ycmd#804: add libclang detection on FreeBSD;
 - PR ycm-core/ycmd#808: write python used during build before installing completers;
 - PR ycm-core/ycmd#810: support unknown languages from tags;
 - PR ycm-core/ycmd#811: update Universal Ctags languages list;
 - PR ycm-core/ycmd#814: resolve symlinks in extra conf glob patterns;
 - PR ycm-core/ycmd#815: update JediHTTP;
 - PR ycm-core/ycmd#816: update Boost to 1.65.0;
 - PR ycm-core/ycmd#819: filter and sort candidates when query is empty;
 - PR ycm-core/ycmd#820: improve LLVM root path search for prebuilt binaries;
 - PR ycm-core/ycmd#822: inline critical utility functions;
 - PR ycm-core/ycmd#824: do not sort header paths in filename completer;
 - PR ycm-core/ycmd#825: implement partial sorting;
 - PR ycm-core/ycmd#830: add max_num_candidates option;
 - PR ycm-core/ycmd#831: fix multiline comments and strings issues;
 - PR ycm-core/ycmd#832: update Clang to 5.0.0.

The `g:ycm_max_num_candidates` and `g:ycm_max_num_identifier_candidates` options are added to the documentation.

The link to ycmd extra conf is updated.

Fixes #2562.

<!-- 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/2768)
<!-- Reviewable:end -->
zzbot added a commit to ycm-core/YouCompleteMe that referenced this pull request Sep 10, 2017
[READY] Update ycmd

This new version of ycmd includes the following changes:

 - PR ycm-core/ycmd#795: add option to make relative paths in flags from extra conf absolute;
 - PR ycm-core/ycmd#802: fix compilation on Haiku;
 - PR ycm-core/ycmd#804: add libclang detection on FreeBSD;
 - PR ycm-core/ycmd#808: write python used during build before installing completers;
 - PR ycm-core/ycmd#810: support unknown languages from tags;
 - PR ycm-core/ycmd#811: update Universal Ctags languages list;
 - PR ycm-core/ycmd#814: resolve symlinks in extra conf glob patterns;
 - PR ycm-core/ycmd#815: update JediHTTP;
 - PR ycm-core/ycmd#816: update Boost to 1.65.0;
 - PR ycm-core/ycmd#819: filter and sort candidates when query is empty;
 - PR ycm-core/ycmd#820: improve LLVM root path search for prebuilt binaries;
 - PR ycm-core/ycmd#822: inline critical utility functions;
 - PR ycm-core/ycmd#824: do not sort header paths in filename completer;
 - PR ycm-core/ycmd#825: implement partial sorting;
 - PR ycm-core/ycmd#830: add max_num_candidates option;
 - PR ycm-core/ycmd#831: fix multiline comments and strings issues;
 - PR ycm-core/ycmd#832: update Clang to 5.0.0.

The `g:ycm_max_num_candidates` and `g:ycm_max_num_identifier_candidates` options are added to the documentation.

The link to ycmd extra conf is updated.

Fixes #2562.

<!-- 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/2768)
<!-- Reviewable:end -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants