Skip to content

Commit f7c4d13

Browse files
author
Ruben Bridgewater
committed
Remove jshint comments and update istanbul comments
1 parent 625f14e commit f7c4d13

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function RedisClient (options, stream) {
5151
var cnx_options = {};
5252
var self = this;
5353
/* istanbul ignore next: travis does not work with stunnel atm. Therefore the tls tests are skipped on travis */
54-
for (var tls_option in options.tls) { // jshint ignore: line
54+
for (var tls_option in options.tls) {
5555
cnx_options[tls_option] = options.tls[tls_option];
5656
// Copy the tls options into the general options to make sure the address is set right
5757
if (tls_option === 'port' || tls_option === 'host' || tls_option === 'path' || tls_option === 'family') {
@@ -102,7 +102,7 @@ function RedisClient (options, stream) {
102102
if (options.socket_keepalive === undefined) {
103103
options.socket_keepalive = true;
104104
}
105-
for (var command in options.rename_commands) { // jshint ignore: line
105+
for (var command in options.rename_commands) {
106106
options.rename_commands[command.toLowerCase()] = options.rename_commands[command];
107107
}
108108
options.return_buffers = !!options.return_buffers;
@@ -438,7 +438,7 @@ RedisClient.prototype.on_ready = function () {
438438
}
439439
};
440440
debug('Sending pub/sub on_ready commands');
441-
for (var key in this.subscription_set) { // jshint ignore: line
441+
for (var key in this.subscription_set) {
442442
var command = key.slice(0, key.indexOf('_'));
443443
var args = self.subscription_set[key];
444444
self.internal_send_command(command, [args], callback);
@@ -934,6 +934,7 @@ RedisClient.prototype.internal_send_command = function (command, args, callback,
934934
}
935935
// Handle `CLIENT REPLY ON|OFF|SKIP`
936936
// This has to be checked after call_on_write
937+
/* istanbul ignore else: TODO: Remove this as soon as we test Redis 3.2 on travis */
937938
if (this.reply === 'ON') {
938939
this.command_queue.push(command_obj);
939940
} else {

lib/createClient.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ module.exports = function createClient (port_arg, host_arg, options) {
4444
}
4545
if (parsed.search !== '') {
4646
var elem;
47-
for (elem in parsed.query) { // jshint ignore: line
47+
for (elem in parsed.query) {
4848
// If options are passed twice, only the parsed options will be used
4949
if (elem in options) {
5050
if (options[elem] === parsed.query[elem]) {

lib/extendedApi.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ RedisClient.prototype.duplicate = function (options, callback) {
8989
}
9090
var existing_options = utils.clone(this.options);
9191
options = utils.clone(options);
92-
for (var elem in options) { // jshint ignore: line
92+
for (var elem in options) {
9393
existing_options[elem] = options[elem];
9494
}
9595
var client = new RedisClient(existing_options);

lib/individualCommands.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ function info_callback (self, callback) {
147147
}
148148
}
149149
obj.versions = [];
150-
/* istanbul ignore else: some redis servers do not send the version */
151150
if (obj.redis_version) {
152151
obj.redis_version.split('.').forEach(function (num) {
153152
obj.versions.push(+num);
@@ -337,7 +336,7 @@ RedisClient.prototype.hmset = RedisClient.prototype.HMSET = function hmset () {
337336
}
338337
} else if (typeof arguments[1] === 'object' && (arguments.length === 2 || arguments.length === 3 && (typeof arguments[2] === 'function' || typeof arguments[2] === 'undefined'))) {
339338
arr = [arguments[0]];
340-
for (var field in arguments[1]) { // jshint ignore: line
339+
for (var field in arguments[1]) {
341340
arr.push(field, arguments[1][field]);
342341
}
343342
callback = arguments[2];
@@ -376,7 +375,7 @@ Multi.prototype.hmset = Multi.prototype.HMSET = function hmset () {
376375
}
377376
} else if (typeof arguments[1] === 'object' && (arguments.length === 2 || arguments.length === 3 && (typeof arguments[2] === 'function' || typeof arguments[2] === 'undefined'))) {
378377
arr = [arguments[0]];
379-
for (var field in arguments[1]) { // jshint ignore: line
378+
for (var field in arguments[1]) {
380379
arr.push(field, arguments[1][field]);
381380
}
382381
callback = arguments[2];

lib/utils.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ function replyInOrder (self, callback, err, res, queue) {
9494
// If the queue is explicitly passed, use that, otherwise fall back to the offline queue first,
9595
// as there might be commands in both queues at the same time
9696
var command_obj;
97+
/* istanbul ignore if: TODO: Remove this as soon as we test Redis 3.2 on travis */
9798
if (queue) {
9899
command_obj = queue.peekBack();
99100
} else {

0 commit comments

Comments
 (0)