Meta: Add sniffs for coding standards within this repo
Is your feature request related to a problem?
There appear to be some coding standards requirements for this library which are not enforced via automated coding standards checks, for example trailing newlines, line length in XML files for documentation, etc. Nothing major but enough to make it an annoyance when you open a PR and maintainer has to manually point out the issues.
See the coding standards feedback on #2574 for examples of this.
Describe the solution you'd like
This library should include sniffs that developers can run locally as part of composer run-tests and which run on GitHub Actions which detect any coding standards violations for test files, XML files, etc.
Additional context
A .editorconfig file would be a good addition too.
This library should include sniffs that developers can run locally as part of composer run-tests and which run on GitHub Actions which detect any coding standards violations for test files, XML files, etc.
Except that is impossible for the things I pointed out to you.
- For punctuation in
.incfiles - we cannot run coding standards over the test case files as they may trip over code which is explicitly testing something. - Believe me, we've tried to find an XML checking tool to check the line-length, but there is none. @dingo-d already did a lot of amazing work in writing an XSD file for the docs, which we use to validate the docs files in CI against the XSD and there is an open request in PHPCSDevTools to also have a XML CS check (consistent indentation, no trailing whitespace etc), but even that check would not be able to check the line length.
The only thing which is actionable would be to review and, if needed, improve the CONTRIBUTING docs, which makes this issue closely related to #2462.