scrooloose/syntastic — pull request #254 by tomokas (2012-05-20 21:53:56+00:00)
Title: Only highlight the first occurrence of a term.

This commit will ensure that only the first term is highlighted (for an error/warning which is lacking column information).

Take the following Python code sample:

some_author = Author.objects.get(...)
books = some_author.books.all()
# The variable 'books' isn't used.

As syntastic currently performs highlighting, both occurrences of the word 'books' will be highlighted -- whereas only the first occurence should be highlighted.

This solution isn't perfect, take the following sample:

some_author.books.some_method(books)

Here, the 'books' property will be highlighted, rather than the passed variable. However, in my opinion, this is better than highlighting both.

Of course, the real solution is to have column information for every error/warning that needs to highlight a term ;-).