forked from friendica/friendica
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request friendica#14622 from Art4/introduce-phpmd
Introduce PHPMD
- Loading branch information
Showing
14 changed files
with
1,737 additions
and
643 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="Friendica Ruleset" | ||
xmlns="http://pmd.sf.net/ruleset/1.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 | ||
http://pmd.sf.net/ruleset_xml_schema.xsd" | ||
xsi:noNamespaceSchemaLocation=" | ||
http://pmd.sf.net/ruleset_xml_schema.xsd"> | ||
<description> | ||
PHPMD ruleset for friendica code. | ||
</description> | ||
|
||
<rule ref="rulesets/codesize.xml/ExcessiveClassComplexity"> | ||
<priority>3</priority> | ||
<properties> | ||
<property name="maximum" value="800" /> | ||
</properties> | ||
</rule> | ||
<rule ref="rulesets/codesize.xml/CyclomaticComplexity"> | ||
<priority>3</priority> | ||
<properties> | ||
<property name="reportLevel" value="100" /> | ||
</properties> | ||
</rule> | ||
|
||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
SPDX-FileCopyrightText: 2010-2024 the Friendica project | ||
|
||
SPDX-License-Identifier: CC0-1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project | ||
# | ||
# SPDX-License-Identifier: CC0-1.0 | ||
|
||
# The phpmd check is just triggered for PRs and pushes to non-stable branches of Friendica | ||
when: | ||
branch: | ||
exclude: [ stable ] | ||
event: [ pull_request, push ] | ||
|
||
steps: | ||
restore_cache: | ||
image: meltwater/drone-cache:dev | ||
settings: | ||
backend: "filesystem" | ||
restore: true | ||
cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" | ||
archive_format: "gzip" | ||
mount: | ||
- '.composer' | ||
volumes: | ||
- /tmp/drone-cache:/tmp/cache | ||
|
||
composer_install: | ||
image: friendicaci/php8.3:php8.3.3 | ||
commands: | ||
- mkdir addon # create empty addon folder to appease composer | ||
- export COMPOSER_HOME=.composer | ||
- ./bin/composer.phar install --prefer-dist | ||
|
||
rebuild_cache: | ||
image: meltwater/drone-cache:dev | ||
settings: | ||
backend: "filesystem" | ||
rebuild: true | ||
cache_key: "{{ .Repo.Name }}_php${PHP_MAJOR_VERSION}_{{ arch }}_{{ os }}" | ||
archive_format: "gzip" | ||
mount: | ||
- '.composer' | ||
volumes: | ||
- /tmp/drone-cache:/tmp/cache | ||
|
||
phpmd: | ||
image: friendicaci/php8.3:php8.3.3 | ||
commands: | ||
- ./bin/composer.phar run phpmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.