Add lint check in travis-ci
authornupplaPhil <admin+github@philipp.info>
Sun, 9 Feb 2020 23:55:17 +0000 (00:55 +0100)
committernupplaPhil <admin+github@philipp.info>
Sun, 9 Feb 2020 23:55:17 +0000 (00:55 +0100)
.travis.yml
composer.json
composer.lock
tests/src/Console/ConfigConsoleTest.php

index e306787..c3d0092 100644 (file)
@@ -24,6 +24,8 @@ before_script:
  - phpenv config-add .travis/redis.ini
  - phpenv config-add .travis/memcached.ini
 
-script: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
+script:
+ - vendor/bin/parallel-lint --exclude vendor/ --exclude view/asset/ .
+ - vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml
 
 after_success: bash <(curl -s https://codecov.io/bash)
index 915c2b0..ae32d90 100644 (file)
                "phpunit/php-token-stream": "^1.4.2",
                "mikey179/vfsstream": "^1.6",
                "mockery/mockery": "^1.2",
-               "johnkary/phpunit-speedtrap": "1.1"
+               "johnkary/phpunit-speedtrap": "1.1",
+               "jakub-onderka/php-parallel-lint": "^1.0"
        },
        "scripts": {
                "test": "phpunit"
index 870b06b..8834f3f 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "1c842fcbaa6de13e4c4f843a4596d7c0",
+    "content-hash": "e1a839b13f7ba5892c8730d0da3ddf1c",
     "packages": [
         {
             "name": "asika/simple-console",
                     "jsonld.php"
                 ]
             },
+            "notification-url": "https://packagist.org/downloads/",
             "license": [
                 "BSD-3-Clause"
             ],
             "description": "A JSON-LD Processor and API implementation in PHP.",
             "homepage": "https://git.friendi.ca/friendica/php-json-ld",
             "keywords": [
-                "JSON",
                 "JSON-LD",
                 "Linked Data",
                 "RDF",
                 "Semantic Web",
+                "json",
                 "jsonld"
             ],
             "time": "2018-10-08T20:41:00+00:00"
             ],
             "time": "2016-01-20T08:20:44+00:00"
         },
+        {
+            "name": "jakub-onderka/php-parallel-lint",
+            "version": "v1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git",
+                "reference": "04fbd3f5fb1c83f08724aa58a23db90bd9086ee8"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/04fbd3f5fb1c83f08724aa58a23db90bd9086ee8",
+                "reference": "04fbd3f5fb1c83f08724aa58a23db90bd9086ee8",
+                "shasum": ""
+            },
+            "require": {
+                "php": ">=5.3.3"
+            },
+            "require-dev": {
+                "jakub-onderka/php-console-highlighter": "~0.3",
+                "nette/tester": "~1.3",
+                "squizlabs/php_codesniffer": "~2.7"
+            },
+            "suggest": {
+                "jakub-onderka/php-console-highlighter": "Highlight syntax in code snippet"
+            },
+            "bin": [
+                "parallel-lint"
+            ],
+            "type": "library",
+            "autoload": {
+                "classmap": [
+                    "./"
+                ]
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "BSD-2-Clause"
+            ],
+            "authors": [
+                {
+                    "name": "Jakub Onderka",
+                    "email": "ahoj@jakubonderka.cz"
+                }
+            ],
+            "description": "This tool check syntax of PHP files about 20x faster than serial check.",
+            "homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint",
+            "time": "2018-02-24T15:31:20+00:00"
+        },
         {
             "name": "johnkary/phpunit-speedtrap",
             "version": "v1.1.0",
                 }
             ],
             "description": "Provides the functionality to compare PHP values for equality",
-            "homepage": "http://www.github.com/sebastianbergmann/comparator",
+            "homepage": "https://github.com/sebastianbergmann/comparator",
             "keywords": [
                 "comparator",
                 "compare",
                 }
             ],
             "description": "Provides functionality to handle HHVM/PHP environments",
-            "homepage": "http://www.github.com/sebastianbergmann/environment",
+            "homepage": "https://github.com/sebastianbergmann/environment",
             "keywords": [
                 "Xdebug",
                 "environment",
                 }
             ],
             "description": "Provides the functionality to export PHP variables for visualization",
-            "homepage": "http://www.github.com/sebastianbergmann/exporter",
+            "homepage": "https://github.com/sebastianbergmann/exporter",
             "keywords": [
                 "export",
                 "exporter"
                 }
             ],
             "description": "Snapshotting of global state",
-            "homepage": "http://www.github.com/sebastianbergmann/global-state",
+            "homepage": "https://github.com/sebastianbergmann/global-state",
             "keywords": [
                 "global state"
             ],
                 }
             ],
             "description": "Provides functionality to recursively process PHP variables",
-            "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+            "homepage": "https://github.com/sebastianbergmann/recursion-context",
             "time": "2016-11-19T07:33:16+00:00"
         },
         {
index 05ed3f3..cfdbf60 100644 (file)
@@ -33,6 +33,8 @@ class ConfigConsoleTest extends ConsoleTest
         * @var App\Mode|MockInterface $appMode
         */
        private $appMode;
+       /** @var IConfig|\Mockery\LegacyMockInterface|MockInterface */
+       private $configMock;
 
        protected function setUp()
        {