Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/390999 )

Change subject: Add PHP linter
......................................................................

Add PHP linter

Hapilly pass 'php -l' against all .php files.
Also prevent unwanted executable flag on files (minus-x).

Usage:
  composer install
  composer test

Bug: T180328
Depends-On: I817e6f8eca26bd4669818219faba86aaf5338100
Change-Id: I0b3f5a62dcc0ba4978cce8ad0cc46f9700843726
---
M .gitignore
M README.md
A composer.json
3 files changed, 33 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/dcat 
refs/changes/99/390999/1

diff --git a/.gitignore b/.gitignore
index 2ccbe46..47e36d5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 /node_modules/
+/vendor/
+/composer.lock
diff --git a/README.md b/README.md
index 6c7d169..9deab40 100644
--- a/README.md
+++ b/README.md
@@ -46,6 +46,20 @@
     file.
 *   To lint translations files: npm install && npm test.
 
+## Linting
+
+We use various utilities to lint this repository. You would first want to get
+the dependencies:
+```
+composer install
+npm install
+```
+Then run the tests:
+```
+composer test
+npm test
+```
+
 ## Config
 
 Below follows a key by key explanation of the config file.
diff --git a/composer.json b/composer.json
new file mode 100644
index 0000000..d6ff8c8
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,17 @@
+{
+       "require-dev": {
+               "jakub-onderka/php-parallel-lint": "0.9.2",
+               "mediawiki/mediawiki-codesniffer": "14.1.0",
+               "jakub-onderka/php-console-highlighter": "0.3.2",
+               "mediawiki/minus-x": "0.2.0"
+       },
+       "scripts": {
+               "fix": [
+                       "minus-x fix ."
+               ],
+               "test": [
+                       "parallel-lint . --exclude vendor --exclude 
node_modules",
+                       "minus-x check ."
+               ]
+       }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0b3f5a62dcc0ba4978cce8ad0cc46f9700843726
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/dcat
Gerrit-Branch: master
Gerrit-Owner: Hashar <has...@free.fr>

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

Reply via email to