From 171149b2a268f4448ed96a5d641128548250130e 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 08f2ef7b164..17c654470d7 100644 --- a/.gitignore +++ b/.gitignore @@ -54,5 +54,5 @@ moodle-plugin-ci.phar /admin/tool/componentlibrary/docs /admin/tool/componentlibrary/hugo/site/data/my-index.json .hugo_build.lock -.phpcs.xml +phpcs.xml jsconfig.json diff --git a/.grunt/tasks/ignorefiles.js b/.grunt/tasks/ignorefiles.js index 153e03fee7f..feb2db43757 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