From 9ae06b8dc7e639f48db28818541d8cb0792b3910 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Tue, 20 Dec 2022 09:25:40 +0800 Subject: [PATCH] MDL-76727 core: Allow phpcs configuration to be overridden locally This change reduces the priority of the shipped phpcs configuration to allow for local overrides. This is beneficial in several situations: - when users wish to apply stricter or additional standards - when the integration team wishes to trial new rules --- .gitignore | 2 +- .grunt/tasks/ignorefiles.js | 4 ++-- .phpcs.xml.dist => phpcs.xml.dist | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename .phpcs.xml.dist => phpcs.xml.dist (100%) diff --git a/.gitignore b/.gitignore index bbdfd1bddcb..93bd5d12cb5 100644 --- a/.gitignore +++ b/.gitignore @@ -51,5 +51,5 @@ moodle-plugin-ci.phar .eslintignore .stylelintignore /jsdoc -.phpcs.xml +phpcs.xml jsconfig.json diff --git a/.grunt/tasks/ignorefiles.js b/.grunt/tasks/ignorefiles.js index 0330cab36ea..7d34649d2e5 100644 --- a/.grunt/tasks/ignorefiles.js +++ b/.grunt/tasks/ignorefiles.js @@ -39,7 +39,7 @@ module.exports = grunt => { { rule: { _attrs: { - ref: './.phpcs.xml.dist', + ref: './phpcs.xml.dist', }, }, }, @@ -52,7 +52,7 @@ module.exports = grunt => { }); }); - grunt.file.write('.phpcs.xml', toXML(config, { + grunt.file.write('phpcs.xml', toXML(config, { header: true, indent: ' ', }) + "\n"); diff --git a/.phpcs.xml.dist b/phpcs.xml.dist similarity index 100% rename from .phpcs.xml.dist rename to phpcs.xml.dist