From 36faf6960da95d20701a18669dffb86c9d8fc6b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Gro=C3=9Fe?= Date: Tue, 21 Jan 2020 22:02:40 +0100 Subject: [PATCH] Split out temporary code style excludes Splitting them out allows for plugins to use _test/phpcs.xml as the basis for their own linting without having an overly permissive coding standard. Also, this makes it more obvious and painful that these are just intended as temporary exceptions and should be actually fixed. The rule `Generic.ControlStructures.InlineControlStructure.NotAllowed` has its comment adjust to make it clear that this is an intended deviation from the PSR-2/PSR-12 coding standard. The rule `PSR1.Classes.ClassDeclaration.MissingNamespace` has to remain in the DokuWiki coding standard as the plugin base classes can currently not reasonably be in namespaces. --- .github/workflows/phpCS.yml | 2 +- _test/phpcs.xml | 100 +------------------------- _test/phpcs_MigrationAdjustments.xml | 103 +++++++++++++++++++++++++++ 3 files changed, 106 insertions(+), 99 deletions(-) create mode 100644 _test/phpcs_MigrationAdjustments.xml diff --git a/.github/workflows/phpCS.yml b/.github/workflows/phpCS.yml index bf1d6b259..fd46c4682 100644 --- a/.github/workflows/phpCS.yml +++ b/.github/workflows/phpCS.yml @@ -19,4 +19,4 @@ jobs: run: wget https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar - name: run PHP codesniffer - run: php phpcs.phar -v --standard=_test/phpcs.xml + run: php phpcs.phar -v --standard=_test/phpcs_MigrationAdjustments.xml diff --git a/_test/phpcs.xml b/_test/phpcs.xml index 6e78784c8..8f0d4dd24 100644 --- a/_test/phpcs.xml +++ b/_test/phpcs.xml @@ -34,88 +34,13 @@ */inc/cli.php */inc/parser/* - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -152,25 +77,4 @@ */inc/Extension/PluginInterface.php */inc/Extension/PluginTrait.php - - - - */index.php - */inc/parserutils.php - */inc/mail.php - */inc/init.php - */inc/farm.php - */inc/fulltext.php - */inc/pluginutils.php - */inc/indexer.php - */inc/Mailer.class.php - */doku.php - */install.php - */inc/utf8.php - */feed.php - */inc/load.php - */bin/*.php - */lib/exe/*.php - - diff --git a/_test/phpcs_MigrationAdjustments.xml b/_test/phpcs_MigrationAdjustments.xml new file mode 100644 index 000000000..d9d11832b --- /dev/null +++ b/_test/phpcs_MigrationAdjustments.xml @@ -0,0 +1,103 @@ + + + These are exceptions to the Coding Standard used for DokuWiki that are intended to be removed over time. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + */index.php + */inc/parserutils.php + */inc/mail.php + */inc/init.php + */inc/farm.php + */inc/fulltext.php + */inc/pluginutils.php + */inc/indexer.php + */inc/Mailer.class.php + */doku.php + */install.php + */inc/utf8.php + */feed.php + */inc/load.php + */bin/*.php + */lib/exe/*.php + + +