jenkins-bot has submitted this change and it was merged. Change subject: Update MathSearch tests ......................................................................
Update MathSearch tests Uses the new npm test Adds composer test. ( I Will do a follow up with php code sniffer ) Add test for js for when users add js for this extension. Currently there is no js in this extension but just in case someone adds it this test will be waiting for it. Update qqq.json message. Required-by: https://gerrit.wikimedia.org/r/#/c/228277/ Change-Id: Ib530ea6ae0dfe3ee48cc544508ce7522007e3961 --- M .gitignore A .jscsrc A .jshintignore A .jshintrc A Gruntfile.js A composer.json M i18n/qqq.json A package.json 8 files changed, 77 insertions(+), 1 deletion(-) Approvals: Siebrand: Looks good to me, approved jenkins-bot: Verified diff --git a/.gitignore b/.gitignore index 60f70f7..b6d831b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ .settings .buildpath nbproject +node_modules/ diff --git a/.jscsrc b/.jscsrc new file mode 100644 index 0000000..9d22e3f --- /dev/null +++ b/.jscsrc @@ -0,0 +1,3 @@ +{ + "preset": "wikimedia" +} diff --git a/.jshintignore b/.jshintignore new file mode 100644 index 0000000..3c3629e --- /dev/null +++ b/.jshintignore @@ -0,0 +1 @@ +node_modules diff --git a/.jshintrc b/.jshintrc new file mode 100644 index 0000000..03a6c56 --- /dev/null +++ b/.jshintrc @@ -0,0 +1,16 @@ +{ + // Enforcing + "bitwise": true, + "eqeqeq": true, + "freeze": true, + "latedef": true, + "noarg": true, + "nonew": true, + "undef": true, + "unused": false, + "strict": false, + + // Environment + "browser": true, + "jquery": true +} diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..f138f96 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,32 @@ +/*jshint node:true */ +module.exports = function ( grunt ) { + var conf = grunt.file.readJSON( 'extension.json' ); + grunt.loadNpmTasks( 'grunt-contrib-jshint' ); + grunt.loadNpmTasks( 'grunt-jsonlint' ); + grunt.loadNpmTasks( 'grunt-banana-checker' ); + grunt.loadNpmTasks( 'grunt-jscs' ); + + grunt.initConfig( { + jshint: { + options: { + jshintrc: true + }, + all: [ + '*.js' + ] + }, + jscs: { + src: '<%= jshint.all %>' + }, + banana: conf.MessagesDirs, + jsonlint: { + all: [ + '**/*.json', + '!node_modules/**' + ] + } + } ); + + grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] ); + grunt.registerTask( 'default', 'test' ); +}; diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..3d55a97 --- /dev/null +++ b/composer.json @@ -0,0 +1,10 @@ +{ + "require-dev": { + "jakub-onderka/php-parallel-lint": "0.9.*" + }, + "scripts": { + "test": [ + "parallel-lint . --exclude vendor" + ] + } +} diff --git a/i18n/qqq.json b/i18n/qqq.json index c2045fd..8b33c9c 100644 --- a/i18n/qqq.json +++ b/i18n/qqq.json @@ -13,7 +13,7 @@ "formulainfo": "{{doc-special|FormulaInfo}}\nThe special page displays technical information about the formula, e.g. the variables it contains and information about rendering etc.", "mathdownload": "{{doc-special|MathDownload}}\nUsers and admins can download submissions to the wmc math search search challenge for archival.", "mathindex": "{{doc-special|MathIndex}}\nThe special page provides a user interface to the maintenance scripts to maintain the index for mathematical formulae.", - "mathupload": "Used as title on [[Special:MathUpload]]", + "mathupload": "{{doc-special|MathUpload|unlisted=1}}", "latextranslator": "{{doc-special|LaTeX to Mathematica Translator}}", "specialpages-group-mathsearch": "{{doc-special-group|that=are related to the extension MathSearch|like=[[Special:MathSearch]], [[Special:FormulaInfo]], [[Special:GetEquationsByQuery]], [[Special:XQueryGenerator]]}}\n\"Math Search\" is also the name of the MediaWiki extension which integrates the [http://search.mathweb.org/ MathWeb Search] engine.\n{{Identical|Math search}}", "displaytopics": "{{doc-special|FormulaInfo}}\nThe special page displays technical information about a search topic.", diff --git a/package.json b/package.json new file mode 100644 index 0000000..2717c89 --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "scripts": { + "test": "grunt test" + }, + "devDependencies": { + "grunt": "0.4.5", + "grunt-cli": "0.1.13", + "grunt-contrib-jshint": "0.11.3", + "grunt-banana-checker": "0.2.2", + "grunt-jscs": "2.1.0", + "grunt-jsonlint": "1.0.4" + } +} -- To view, visit https://gerrit.wikimedia.org/r/228273 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ib530ea6ae0dfe3ee48cc544508ce7522007e3961 Gerrit-PatchSet: 21 Gerrit-Project: mediawiki/extensions/MathSearch Gerrit-Branch: master Gerrit-Owner: Paladox <[email protected]> Gerrit-Reviewer: Dyiop <[email protected]> Gerrit-Reviewer: Hcohl <[email protected]> Gerrit-Reviewer: Jforrester <[email protected]> Gerrit-Reviewer: Legoktm <[email protected]> Gerrit-Reviewer: Paladox <[email protected]> Gerrit-Reviewer: Physikerwelt <[email protected]> Gerrit-Reviewer: Siebrand <[email protected]> Gerrit-Reviewer: Spage <[email protected]> Gerrit-Reviewer: Whyameri <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
