From 97123f05a19a1cbec41ef4b7b72adf0c3f681113 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 14 Jul 2010 12:28:09 +0200 Subject: make fix - check for occurrence of FIXME in all lib/*.js files. - clear out obsolete ones - add fix target as dependency of all one. --- Makefile | 9 ++++++--- lib/logger.js | 1 - lib/offline-support.js | 10 +++++----- lib/rhbzpage.js | 8 ++++---- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 416448f..7a420e4 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ WEBDIR=/home/matej/Dokumenty/website -all: install +all: fix install install: local-install websync @@ -11,8 +11,11 @@ local-install: bugzilla-triage.xpi bugzilla-triage.xpi: package.json lib/*.js docs/* cfx xpi ;\ - unzip -o bugzilla-triage.xpi install.rdf ;\ + unzip -qqo bugzilla-triage.xpi install.rdf ;\ sed -i -e \ 's!3.5!3.6!' \ install.rdf ;\ - zip -9rmT bugzilla-triage.xpi install.rdf ;\ + zip -9rmqT bugzilla-triage.xpi install.rdf ;\ + +fix: + grep FIXME lib/*.js || /bin/true diff --git a/lib/logger.js b/lib/logger.js index ecd7e27..df01d37 100644 --- a/lib/logger.js +++ b/lib/logger.js @@ -31,7 +31,6 @@ Logger.prototype.addLogRecord = function(that) { comment = comment.trim(); rec.comment = comment; console.log("rec.comment = " + rec.comment); - // FIXME We break on the following line. Not sure what's going on! var dateStr = utilMod.getISODate(rec.date); console.log("rec.date = " + rec.date + ", dateStr = " + dateStr); var urlStr = urlMod.URL(rec.url).host; diff --git a/lib/offline-support.js b/lib/offline-support.js index e823069..e0b1c3b 100644 --- a/lib/offline-support.js +++ b/lib/offline-support.js @@ -7,7 +7,7 @@ /* Offline supporting functions */ /** * - * @todo FIXME this probably makes a closure and a memory leak name='changeform' + * @todo TODO this probably makes a closure and a memory leak name='changeform' * investigate * https://developer.mozilla.org/en/How_to_Turn_Off_Form_Autocompletion * @@ -71,7 +71,7 @@ RHBugzillaPage.prototype.serializeForm = function(form) { serialForm.dataOut = Array.filter(form.elements,function(el) { return !el.disabled && el.name && - // FIXME shouldn't I just add && el.value here? + // TODO shouldn't I just add && el.value here? (el.checked || /select|textarea/i.test(el.nodeName) || /text|hidden|password|search/i.test(el.type)); }).map(serializeControl).join("&"); @@ -102,7 +102,7 @@ RHBugzillaPage.prototype.serializeForm = function(form) { */ /*function onlineCallback() { function deserializeAndSend(formData) { - // FIXME notImplemented + // TODO notImplemented // is it enough to just // run XMLHttpRequest? Probably yes, this is just a form // and this is just a HTTP request @@ -116,12 +116,12 @@ RHBugzillaPage.prototype.serializeForm = function(form) { // this seems to be also interesting // https://developer.mozilla.org/en/Code_snippets/Post_data_to_window console.error("Sending bugs not implemented yet!"); - return ""; // FIXME check other HTTP headers to be set + return ""; // TODO check other HTTP headers to be set var bugID = formData.bugNo; var req = new XMLHttpRequest(); req.open("POST", formData.action, true); - // FIXME co očekávám za odpověď? req.overrideMimeType("text/xml"); + // TODO co očekávám za odpověď? req.overrideMimeType("text/xml"); // * Accept-Encoding // * Accept-Language // * Accept (MIME types) diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js index 38650d4..1a846f8 100644 --- a/lib/rhbzpage.js +++ b/lib/rhbzpage.js @@ -228,7 +228,7 @@ RHBugzillaPage.prototype.ProfessionalProducts = [ * */ RHBugzillaPage.prototype.pasteBacktraceInComments = function() { - // FIXME This paragraph looks suspicous ... what is it? + // TODO This paragraph looks suspicous ... what is it? // Does it belong to this function? var notedLabel = this.doc.querySelector("label[for='newcc']"); while (notedLabel.firstChild) { @@ -659,7 +659,7 @@ RHBugzillaPage.prototype.parseAttachmentLine = function(inElem) { } // getting name of the attachment - // FIXME probably could use url.URL object + // TODO probably could use url.URL object var attName = inElem.getElementsByTagName("b")[0].textContent.trim(); var aHrefsArr = inElem.getElementsByTagName("a"); @@ -836,7 +836,7 @@ RHBugzillaPage.prototype.addClosingUpstream = function() { var externalBugID = 0; var wholeURL = ""; - // FIXME Hopefully unfinished and even less tested + // TODO Hopefully unfinished and even less tested // Fix missing ID on the external_id SELECT this.doc.getElementsByName("external_id")[0].setAttribute("id", "external_id"); @@ -867,7 +867,7 @@ RHBugzillaPage.prototype.addClosingUpstream = function() { // the previous commit? } - // FIXME THis is not good, we don't have a feedback for other commands, + // TODO THis is not good, we don't have a feedback for other commands, // not to be run, if this fails. // It is not good to close bug as UPSTREAM, if there is no reference -- cgit