Add unused and wildcard variables #79

Merged
merged 2 commits into from Oct 17, 2016

Projects

None yet

2 participants

@rkma
Contributor
rkma commented Sep 22, 2016 edited

Based on #66.

Added selectors to unused variables and the single underscore while keeping the comment selector.

It also matches unused variables ending in exclamation and question mark.

@keathley
Member

Thanks for this @rkma. The code looks great. But I feel like stylistically, highlighting unused variables as variable.other draws a lot more attention to the unused variable itself. For instance this is what my editor looks like with your PR:

screenshot 2016-10-16 13 46 21

And with the One Dark theme:

screenshot 2016-10-16 13 46 37

One of the reasons that the comment selector was originally used was because unused variables by their nature shouldn't draw your eye. Was there a specific reason that you needed this change?

@rkma
Contributor
rkma commented Oct 16, 2016

I thought it would give more context, but I didn't realize it would break depending on the theme, haha. I will change that and remove variable.other.

@keathley
Member

Sorry about the confusion. This looks great thanks 👍

@keathley keathley merged commit 03f0159 into elixir-lang:master Oct 17, 2016

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment