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

Valloric / ycmd / 1395 / 1
94%
master: 94%

Build:
DEFAULT BRANCH: master
Ran 06 Feb 2016 12:33PM UTC
Files 41
Run time 1s
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

06 Feb 2016 11:47AM UTC coverage: 82.55% (+0.07%) from 82.481%
USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true

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

Source Files on job 1395.1 (USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1395
  • Travis Job 1395.1
  • d7bec982 on github
  • Prev Job for USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true on master (#1393.1)
  • Next Job for USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true on master (#1404.1)
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