Remove unused vars

This commit is contained in:
Raul Ochoa
2015-03-16 00:16:36 +01:00
parent 4365c1dbc2
commit 336491b54c
6 changed files with 11 additions and 17 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
// // "single" : require single quotes
// // "double" : require double quotes
"undef" : true, // true: Require all non-global variables to be declared (prevents global leaks)
// "unused" : true, // true: Require all defined variables be used
"unused" : true, // true: Require all defined variables be used
// "strict" : true, // true: Requires all functions run in ES5 Strict Mode
// "maxparams" : false, // {int} Max number of formal params allowed per function
// "maxdepth" : false, // {int} Max depth of nested blocks (within functions)
+2 -3
View File
@@ -1,6 +1,5 @@
var _ = require('underscore'),
Varnish = require('node-varnish'),
varnish_queue = null;
var Varnish = require('node-varnish');
var varnish_queue = null;
function init(host, port, secret) {
varnish_queue = new Varnish.VarnishQueue(host, port, secret);
+1 -1
View File
@@ -127,7 +127,7 @@ var CartodbWindshaft = function(serverOptions) {
//console.log("Adding cache channel to route\n" + req.route.path + " not matching any in:\n" + mapCreateRoutes.join("\n"));
serverOptions.addCacheChannel(that, req, this);
},
function sendResponse(err, added) {
function sendResponse(err/*, added*/) {
if ( err ) console.log(err + err.stack);
ws_sendResponse.apply(that, thatArgs);
return null;
+1 -3
View File
@@ -141,7 +141,6 @@ TemplateMapsController.prototype.retrieve = function(req, res) {
this.app.doCORS(res);
var cdbuser = this.serverOptions.userByReq(req);
var template;
var tpl_id;
Step(
function checkPerms(){
@@ -203,7 +202,6 @@ TemplateMapsController.prototype.destroy = function(req, res) {
this.app.doCORS(res);
var cdbuser = this.serverOptions.userByReq(req);
var template;
var tpl_id;
Step(
function checkPerms(){
@@ -228,7 +226,7 @@ TemplateMapsController.prototype.destroy = function(req, res) {
}
self.templateMaps.delTemplate(cdbuser, tpl_id, this);
},
function prepareResponse(err, tpl_val){
function prepareResponse(err/*, tpl_val*/){
if ( err ) throw err;
return { status: 'ok' };
},
+4 -5
View File
@@ -1,8 +1,7 @@
var _ = require('underscore'),
dot = require('dot'),
fs = require('fs'),
path = require('path'),
Step = require('step');
var dot = require('dot');
var fs = require('fs');
var path = require('path');
var Step = require('step');
function HealthCheck(metadataBackend, tilelive) {
this.metadataBackend = metadataBackend;
+2 -4
View File
@@ -573,7 +573,7 @@ module.exports = function(redisPool) {
callback(new Error('Error parsing lzma as JSON: ' + err));
}
},
function(percent) { // progress
function(/*percent*/) { // progress
//console.log("LZMA decompression " + percent + "%");
}
);
@@ -603,7 +603,7 @@ module.exports = function(redisPool) {
return;
}
if ( tksplit.length > 1 ) {
var template_hash = tksplit.shift(); // unused
/*var template_hash = */tksplit.shift(); // unused
}
req.params.token = tksplit.shift();
//console.log("Request for token " + req.params.token + " with signature from " + req.params.signer);
@@ -616,8 +616,6 @@ module.exports = function(redisPool) {
// for cartodb, ensure interactivity is cartodb_id or user specified
req.params.interactivity = req.params.interactivity || 'cartodb_id';
var that = this;
if (req.profiler) req.profiler.done('req2params.setup');
Step(