jenkins-bot has submitted this change and it was merged.

Change subject: Use lower case words separated by hyphens for lint issue tags
......................................................................


Use lower case words separated by hyphens for lint issue tags

Change-Id: I7f22573c27b3ce7f92896b5a72bceaecb5f2358c
---
M lib/dom.linter.js
M lib/linter.js
M tests/mocha/lintertest.js
3 files changed, 11 insertions(+), 11 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/dom.linter.js b/lib/dom.linter.js
index 61a95f3..2921b9f 100644
--- a/lib/dom.linter.js
+++ b/lib/dom.linter.js
@@ -36,7 +36,7 @@
         if (dmw.parts) {
             var parts = dmw.parts;
             if (typeof parts[0] === 'string' || typeof parts[parts.length - 1] 
=== 'string') {
-                env.log("lint/Mixed-content", env.page.src, dsr);
+                env.log("lint/mixed-content", env.page.src, dsr);
             } else if (parts.length > 1) {
                 var targets = [],
                     t = null;
@@ -46,7 +46,7 @@
                     }
                 });
                 if (targets.length > 1) {
-                    env.log("lint/Multi-template", targets, dsr);
+                    env.log("lint/multi-template", targets, dsr);
                 }
             }
         }
@@ -68,7 +68,7 @@
     if (DU.hasNodeName(c, 'meta')) {
         var type = c.getAttribute('typeof');
         if (type === 'mw:Placeholder/StrippedTag') {
-            env.log('lint/strippedTag', env.page.src, dp.dsr);
+            env.log('lint/stripped-tag', env.page.src, dp.dsr);
         }
     }
 
@@ -177,7 +177,7 @@
     var re = /^(BIG|CENTER|FONT|STRIKE|TT)$/;
 
     if (re.test(c.nodeName)) {
-        env.log('lint/ObsoleteTag', env.page.src, dsr);
+        env.log('lint/obsolete-tag', env.page.src, dsr);
     }
 }
 
@@ -194,7 +194,7 @@
         optlist.forEach(function (item) {
             if (item.ck === "bogus") {
                 var dsr = DU.getDataParsoid(c).dsr;
-                env.log('lint/BogusImageOptions', env.page.src, dsr);
+                env.log('lint/bogus-image-options', env.page.src, dsr);
             }
         });
     }
diff --git a/lib/linter.js b/lib/linter.js
index 2e15240..fa8a669 100644
--- a/lib/linter.js
+++ b/lib/linter.js
@@ -62,7 +62,7 @@
             msg.dsr = dsr;
         }
 
-        if (logType === 'lint/fostered' || logType === 'lint/Multi-template') {
+        if (logType === 'lint/fostered' || logType === 'lint/multi-template' 
|| logType === 'lint/mixed-content' ) {
             msg.src = src;
         } else if (dsr) {
             msg.src = src.substring(dsr[0], dsr[1]);
diff --git a/tests/mocha/lintertest.js b/tests/mocha/lintertest.js
index 5c15951..a8633df 100644
--- a/tests/mocha/lintertest.js
+++ b/tests/mocha/lintertest.js
@@ -64,7 +64,7 @@
                it( 'should lint stripped tags correctly', function() {
                        return parseWT( 'foo</div>' ).then( function ( result ) 
{
                                result.should.have.length( 1 );
-                               result[0].should.have.a.property( "type", 
"strippedTag" );
+                               result[0].should.have.a.property( "type", 
"stripped-tag" );
                                result[0].should.have.a.property( "wiki", 
"enwiki" );
                                result[0].dsr.should.include.members( [ 3, 9, 
null, null ] );
                                result[0].should.have.a.property( "src", 
"</div>" );
@@ -73,7 +73,7 @@
                it( 'should lint obsolete tags correctly', function() {
                        return parseWT( '<big>foo</big>bar' ).then( function ( 
result ) {
                                result.should.have.length( 1 );
-                               result[0].should.have.a.property( "type", 
"ObsoleteTag" );
+                               result[0].should.have.a.property( "type", 
"obsolete-tag" );
                                result[0].should.have.a.property( "wiki", 
"enwiki" );
                                result[0].dsr.should.include.members( [ 0, 14, 
5, 6 ] );
                                result[0].should.have.a.property( "src", 
"<big>foo</big>" );
@@ -88,8 +88,8 @@
                                result[0].should.have.a.property( "src", "foo" 
);
                        });
                });
-               it('should lint ignored table attributes Correctly', 
function(done){
-                       return parseWT( '{|\n|- foo\n|bar\n|}' ).done( function 
( result ) {
+               it('should lint ignored table attributes Correctly', function(){
+                       return parseWT( '{|\n|- foo\n|bar\n|}' ).then( function 
( result ) {
                                result.should.have.length( 1 );
                                result[0].should.have.a.property("type", 
"ignored-table-attr");
                                result[0].should.have.a.property("wiki", 
"enwiki");
@@ -100,7 +100,7 @@
                it( 'should lint  Bogus image options correctly', function() {
                        return parseWT( '[[file:a.jpg|foo|bar]]' ).then( 
function ( result ) {
                                result.should.have.length( 1 );
-                               result[0].should.have.a.property( "type", 
"BogusImageOptions" );
+                               result[0].should.have.a.property( "type", 
"bogus-image-options" );
                                result[0].should.have.a.property( "wiki", 
"enwiki" );
                                result[0].dsr.should.include.members( [ 0, 22, 
null, null ] );
                                result[0].should.have.a.property( "src", 
"[[file:a.jpg|foo|bar]]" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7f22573c27b3ce7f92896b5a72bceaecb5f2358c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Hardikj <[email protected]>
Gerrit-Reviewer: Subramanya Sastry <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to