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

Change subject: linter: Provide name of bogus image parameter
......................................................................


linter: Provide name of bogus image parameter

Bug: T148071
Change-Id: Id4ef0e72a8d8c0d76f4c86df5f48a324a5f56a9c
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/lintertest.js
2 files changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 246c909..abcd25a 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -251,6 +251,7 @@
                                        src: env.page.src,
                                        dsr: dsr,
                                        inTransclusion: inTransclusion,
+                                       params: { name: item.ak },
                                };
                                env.log('lint/bogus-image-options', lintObj);
                        }
diff --git a/tests/mocha/lintertest.js b/tests/mocha/lintertest.js
index 3b9a4c6..0ac0f4d 100644
--- a/tests/mocha/lintertest.js
+++ b/tests/mocha/lintertest.js
@@ -131,6 +131,8 @@
                                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]]");
+                               result[0].should.have.a.property("params");
+                               result[0].params.should.have.a.property("name", 
"foo");
                        });
                });
                it('should lint Bogus image options found in transclusions 
correctly', function() {
@@ -140,6 +142,8 @@
                                result[0].should.have.a.property("wiki", 
"enwiki");
                                result[0].dsr.should.include.members([ 0, 29, 
null, null ]);
                                result[0].should.have.a.property("src", 
"{{1x|[[file:a.jpg|foo|bar]]}}");
+                               result[0].should.have.a.property("params");
+                               result[0].params.should.have.a.property("name", 
"foo");
                        });
                });
        });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4ef0e72a8d8c0d76f4c86df5f48a324a5f56a9c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Legoktm <legoktm.wikipe...@gmail.com>
Gerrit-Reviewer: Arlolra <abrea...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to