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
This commit is contained in:
Andrew Nicols 2022-12-20 09:25:40 +08:00
parent 24c009f222
commit bb7cce1e56
3 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -54,5 +54,5 @@ moodle-plugin-ci.phar
/admin/tool/componentlibrary/docs /admin/tool/componentlibrary/docs
/admin/tool/componentlibrary/hugo/site/data/my-index.json /admin/tool/componentlibrary/hugo/site/data/my-index.json
.hugo_build.lock .hugo_build.lock
.phpcs.xml phpcs.xml
jsconfig.json jsconfig.json

View File

@ -39,7 +39,7 @@ module.exports = grunt => {
{ {
rule: { rule: {
_attrs: { _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, header: true,
indent: ' ', indent: ' ',
}) + "\n"); }) + "\n");