From d2b3cc515f7bc0e08a6f7b3efdafe0529572182a Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 27 Feb 2023 19:51:04 +0100 Subject: [PATCH 1/6] Adapt .editorconfig for PHPStorm --- .editorconfig | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.editorconfig b/.editorconfig index af67d04a3..66406ca44 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,9 +6,13 @@ root = true [*] charset = utf-8 end_of_line = lf -trim_trailing_whitespaces = true indent_style = tab -quote_type = single +trim_trailing_whitespace = true +insert_final_newline = true -[*.js] -quote_type = double \ No newline at end of file +[*.yml] +indent_style = space +indent_size = 2 + +[composer.json] +indent_size = tab From 191c84a281623565956ab840e3f71029bec29994 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 27 Feb 2023 20:01:16 +0100 Subject: [PATCH 2/6] adapt codecov config --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index ec27f44fe..7b6eecb66 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,7 +1,7 @@ codecov: branch: develop ci: - - drone.friendi.ca + - ci.friendi.ca coverage: precision: 2 From 3c7184513c46d660140e887e565a1a275db602a4 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 27 Feb 2023 20:11:07 +0100 Subject: [PATCH 3/6] Revert quote_type --- .editorconfig | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.editorconfig b/.editorconfig index 66406ca44..c4555b082 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,6 +9,11 @@ end_of_line = lf indent_style = tab trim_trailing_whitespace = true insert_final_newline = true +quote_type = single + +[*.js] +quote_type = double +ij_javascript_use_double_quotes = true [*.yml] indent_style = space From ae5fe47c03e51490eb027a00decc07b11c22aa8e Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 27 Feb 2023 20:34:46 +0100 Subject: [PATCH 4/6] Adapt .editorconfig - Add .json rule - Add .xml rule --- .editorconfig | 11 ++++++++++- composer.json | 10 ++++++++-- docblox.dist.xml | 18 +++++++++--------- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/.editorconfig b/.editorconfig index c4555b082..0cb6e3e97 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,6 +10,7 @@ indent_style = tab trim_trailing_whitespace = true insert_final_newline = true quote_type = single +max_line_length = off [*.js] quote_type = double @@ -19,5 +20,13 @@ ij_javascript_use_double_quotes = true indent_style = space indent_size = 2 +[*.xml] +indent_style = space +indent_size = 4 + +[*.json] +indent_style = space +indent_size = 2 + [composer.json] -indent_size = tab +indent_style = tab diff --git a/composer.json b/composer.json index c6746c123..e4e6aa6f0 100644 --- a/composer.json +++ b/composer.json @@ -132,7 +132,13 @@ "test": "phpunit", "lint": "find . -name \\*.php -not -path './vendor/*' -not -path './view/asset/*' -print0 | xargs -0 -n1 php -l", "cs:install": "@composer install --working-dir=bin/dev/php-cs-fixer", - "cs:check": ["@cs:install", "bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff"], - "cs:fix": ["@cs:install", "bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix"] + "cs:check": [ + "@cs:install", + "bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix --dry-run --diff" + ], + "cs:fix": [ + "@cs:install", + "bin/dev/php-cs-fixer/vendor/bin/php-cs-fixer fix" + ] } } diff --git a/docblox.dist.xml b/docblox.dist.xml index a2ea8e2cb..aff0af91a 100644 --- a/docblox.dist.xml +++ b/docblox.dist.xml @@ -1,13 +1,13 @@ - - data/output - - - data/output - - - . - + + data/output + + + data/output + + + . + From 089850e8f6f22c785bcd4a5e211b7c6576be2629 Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 27 Feb 2023 20:53:19 +0100 Subject: [PATCH 5/6] Add a PHPStorm code style XML --- mods/README.md | 10 +++++++--- mods/phpstorm-code-style.xml | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 3 deletions(-) create mode 100644 mods/phpstorm-code-style.xml diff --git a/mods/README.md b/mods/README.md index fe7a7fed5..43389eb2c 100644 --- a/mods/README.md +++ b/mods/README.md @@ -4,12 +4,12 @@ Friendica mods files ## `bookmarklet-share2friendica` Browser bookmarklet to share any page with your Friendica account. -Please see `bookmarklet-share2friendica/README.md` for detailed instruction. +Please see `bookmarklet-share2friendica/README.md` for detailed instruction. ## `fpostit` Node-agnostic Friendica bookmarklet by Devlon Duthie. -Unmaintained and unsupported. +Unmaintained and unsupported. ## `home.css` and `home.html` @@ -30,7 +30,11 @@ Please check software documentation to know how modify these examples to make th ## `sample-systemd.timer` and `sample-systemd.service` Sample systemd unit files to start worker.php periodically. - + Please place them in the correct location for your system, typically this is `/etc/systemd/system/friendicaworker.timer` and `/etc/systemd/system/friendicaworker.service`. Please report problems and improvements to `!helpers@forum.friendi.ca` and `@utzer@social.yl.ms` or open an issue in [the Github Friendica page](https://github.com/friendica/friendica/issues). This is for usage of systemd instead of cron to start the worker periodically, the solution is a work-in-progress and can surely be improved. + +## `phpstorm-code-style.xml` + +PHP Storm Code Style settings, used for this codebase diff --git a/mods/phpstorm-code-style.xml b/mods/phpstorm-code-style.xml new file mode 100644 index 000000000..0fb86cfb0 --- /dev/null +++ b/mods/phpstorm-code-style.xml @@ -0,0 +1,34 @@ + + + + + + + + \ No newline at end of file From ea550f6b02675f49964d7614e2eee2be4919656a Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 27 Feb 2023 20:57:19 +0100 Subject: [PATCH 6/6] ident_size 2 is better for XML readability :) --- .editorconfig | 2 +- docblox.dist.xml | 19 +++++++++---------- ruleset.xml | 24 ++++++++++++------------ 3 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.editorconfig b/.editorconfig index 0cb6e3e97..610409143 100644 --- a/.editorconfig +++ b/.editorconfig @@ -22,7 +22,7 @@ indent_size = 2 [*.xml] indent_style = space -indent_size = 4 +indent_size = 2 [*.json] indent_style = space diff --git a/docblox.dist.xml b/docblox.dist.xml index aff0af91a..d702bc888 100644 --- a/docblox.dist.xml +++ b/docblox.dist.xml @@ -1,13 +1,12 @@ - - data/output - - - data/output - - - . - + + data/output + + + data/output + + + . + - diff --git a/ruleset.xml b/ruleset.xml index a71b7062f..037b0e7b3 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,15 +1,15 @@ - Friendica Coding Standards: PSR2 with tabs instead of spaces - - - - - - - - - - - + Friendica Coding Standards: PSR2 with tabs instead of spaces + + + + + + + + + + +