• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Valloric / ycmd / 1395
94%

Build:
DEFAULT BRANCH: master
Ran 06 Feb 2016 12:33PM UTC
Jobs 1
Files 41
Run time 2s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
1395

push

travis-ci

homu
Auto merge of #349 - micbou:filter-and-sort-candidates, r=vheon

[READY] Fix issue when first candidate contains keywords as its substring

### Problem

When the first candidate from the Omnifunc candidates list is the string `words` or contains the substring `word`, the following error is raised:
```python
TypeError: string/list indices must be integers, not str
```
Reason is that the condition `<key> in <dictionary>` can also return true if `<dictionary>` is a list or a string.

### Solution

Add tests covering these edge cases. Check if `candidates` and `candidate[ 0 ]` are dictionaries before looking at the existence of the `word` and `words` keys.

This PR fixes Valloric/YouCompleteMe#1953.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/349)
<!-- Reviewable:end -->

2583 of 3129 relevant lines covered (82.55%)

0.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1395.1 (USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true) 06 Feb 2016 12:33PM UTC 0
82.55
Travis Job 1395.1
Source Files on build 1395
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #1395
  • d7bec982 on github
  • Prev Build on master (#1393)
  • Next Build on master (#1404)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc