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

More rigorous linting #722

Merged
merged 13 commits into from
May 28, 2013
Merged

Conversation

twpayne
Copy link
Contributor

@twpayne twpayne commented May 21, 2013

This PR activates the --jslint_error=all flag to gjslint and fixes all the problems it finds.

@fredj
Copy link
Member

fredj commented May 21, 2013

LGTM

@tschaub
Copy link
Member

tschaub commented May 21, 2013

Looks good. I use another linter that I think will start complaining about side effects in the tests, but I'll see about making them both happy.

@twpayne
Copy link
Contributor Author

twpayne commented May 27, 2013

I also use jslint in my editor which complains about using new for side effects, so I'll find a way to write the tests that satisfies both jslint and gjslint.

Note that this PR depends on #740.

@twpayne
Copy link
Contributor Author

twpayne commented May 28, 2013

I use another linter that I think will start complaining about side effects in the tests, but I'll see about making them both happy.

I've now fixed this and updated the PR. The fix was, instead of writing:

new X(); // jslint issues WARNING:Do not use 'new' for side effects.

I've used:

var x = new X();
x = x; // suppress gjslint warning about unused variable

This passes both gjslint and jslint. Only code in the tests is affected.

@elemoine
Copy link
Member

Very nice Tom! Thanks.

twpayne added a commit that referenced this pull request May 28, 2013
@twpayne twpayne merged commit 795ea69 into openlayers:master May 28, 2013
@twpayne twpayne deleted the unused-variable-check branch May 28, 2013 15:06
afabiani pushed a commit to geosolutions-it/openlayers that referenced this pull request May 22, 2017
Clear the bounds in Protocol.BBOX when a load fails (r=bartvde)
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.

4 participants