Legoktm has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315738

Change subject: linter: Provide name of obsolete HTML element in question
......................................................................

linter: Provide name of obsolete HTML element in question

Individual lint checks can provide additional parameters to provide more
specific information about the error.

Bug: T148071
Change-Id: I48662442d4cb868cdc939cb4785d71e93e96b212
---
M lib/logger/linter.js
M lib/wt2html/pp/handlers/linter.js
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/38/315738/1

diff --git a/lib/logger/linter.js b/lib/logger/linter.js
index 844f346..4997d6d 100644
--- a/lib/logger/linter.js
+++ b/lib/logger/linter.js
@@ -67,6 +67,7 @@
                msg.page = this._env.page.name;
                msg.revision = this._env.page.meta.revision.revid;
                msg.wikiurl = 
url.resolve(this._env.conf.parsoid.mwApiMap.get(wiki).uri, '/');
+               msg.params = lintObj.params || {};
 
                if (logData.locationData) {
                        msg.location = logData.locationData.toString();
diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 0d9739e..40a2d29 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -218,7 +218,12 @@
        }
 
        if (re.test(c.nodeName)) {
-               var lintObj = { src: env.page.src, dsr: dsr, inTransclusion: 
inTransclusion };
+               var lintObj = {
+                       src: env.page.src,
+                       dsr: dsr,
+                       inTransclusion: inTransclusion,
+                       params: { name: c.nodeName.toLowerCase() }
+               };
                env.log('lint/obsolete-tag', lintObj);
        }
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/315738
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48662442d4cb868cdc939cb4785d71e93e96b212
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to