]> git.mxchange.org Git - friendica.git/commitdiff
Split phpstan.neon files for addon checks
authorArt4 <art4@wlabs.de>
Tue, 25 Feb 2025 14:29:57 +0000 (14:29 +0000)
committerArt4 <art4@wlabs.de>
Tue, 25 Feb 2025 14:29:57 +0000 (14:29 +0000)
.phpstan-addons.neon [new file with mode: 0644]
.phpstan.neon
composer.json

diff --git a/.phpstan-addons.neon b/.phpstan-addons.neon
new file mode 100644 (file)
index 0000000..801db2a
--- /dev/null
@@ -0,0 +1,52 @@
+# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project
+#
+# SPDX-License-Identifier: CC0-1.0
+
+parameters:
+    level: 2
+
+    paths:
+        - addon/
+
+    excludePaths:
+        analyse:
+            - addon/*/lang/*
+            - addon/*/vendor/*
+            - addon/convert/UnitConvertor.php
+            - addon/pumpio/oauth/*
+
+    scanDirectories:
+        - mod
+        - src
+        - static
+        - vendor
+        - view
+
+    dynamicConstantNames:
+        - DB_UPDATE_VERSION
+
+    ignoreErrors:
+
+        -
+            # Ignore missing SMTP class in PHPMailer 5.2.21
+            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
+            message: '(^.+ an unknown class SMTP\.$)'
+            path: addon/mailstream/phpmailer
+
+        -
+            # Ignore missing SMTP class in PHPMailer 5.2.21
+            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
+            message: '(^Property .+ has unknown class SMTP as its type\.$)'
+            path: addon/mailstream/phpmailer
+
+        -
+            # Ignore missing SMTP class in PHPMailer 5.2.21
+            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
+            message: '(^Method .+ has invalid return type SMTP\.$)'
+            path: addon/mailstream/phpmailer
+
+        -
+            # Ignore missing SMTP class in PHPMailer 5.2.21
+            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
+            message: '(^Instantiated class SMTP not found\.$)'
+            path: addon/mailstream/phpmailer
index bf01c3cc07d5b948582da533e8df2a16d9fe4368..fb731728b872d145d2ce276b0c8852992d63f6cd 100644 (file)
@@ -6,7 +6,6 @@ parameters:
     level: 3
 
     paths:
-        # - addon/
         - bin/auth_ejabberd.php
         - bin/console.php
         - bin/daemon.php
@@ -15,13 +14,6 @@ parameters:
         - index.php
         - src/
 
-    excludePaths:
-        analyse:
-            - addon/*/lang/*
-            - addon/*/vendor/*
-            - addon/convert/UnitConvertor.php
-            - addon/pumpio/oauth/*
-
     scanDirectories:
         - mod
         - static
@@ -46,27 +38,3 @@ parameters:
             # Ignore missing IMAP\Connection class in PHP <= 8.0
             message: '(^Parameter .+ has invalid type IMAP\\Connection\.$)'
             path: src
-
-        # -
-            # Ignore missing SMTP class in PHPMailer 5.2.21
-            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
-            # message: '(^.+ an unknown class SMTP\.$)'
-            # path: addon/mailstream/phpmailer
-
-        # -
-            # Ignore missing SMTP class in PHPMailer 5.2.21
-            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
-            # message: '(^Property .+ has unknown class SMTP as its type\.$)'
-            # path: addon/mailstream/phpmailer
-
-        # -
-            # Ignore missing SMTP class in PHPMailer 5.2.21
-            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
-            # message: '(^Method .+ has invalid return type SMTP\.$)'
-            # path: addon/mailstream/phpmailer
-
-        # -
-            # Ignore missing SMTP class in PHPMailer 5.2.21
-            # see https://github.com/PHPMailer/PHPMailer/blob/v5.2.21/class.smtp.php
-            # message: '(^Instantiated class SMTP not found\.$)'
-            # path: addon/mailstream/phpmailer
index a2c9eea3c9d8bb7914aaa8b0c4621c17df30d846..5e5344eeab3bbe26fea169461473f94bbb9408ca 100644 (file)
                "test:unit": "phpunit -c tests/phpunit.xml --testsuite unit",
                "phpmd": "phpmd src/ text .phpmd-ruleset.xml --color --cache",
                "phpstan": "phpstan analyze --memory-limit 1024M --configuration .phpstan.neon",
+               "phpstan-addons": "phpstan analyze --memory-limit 1024M --configuration .phpstan-addons.neon",
                "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l",
                "docker:translate": "docker run --rm -v $PWD:/data -w /data friendicaci/transifex bin/run_xgettext.sh",
                "lang:recreate": "bin/run_xgettext.sh",