Problem/Motivation
Part of #2571965: [meta] Fix PHP coding standards in core.
Steps to reproduce
Proposed resolution
Make the changes by type of fix to make it easier for reviews. This also means that the child issues will likely not be enforcing the rule in phpcs.xml.dist.
Commented out code often exceeds the line length. For these, keep the code as is and and ignore lines around the code. See #2742881: Can inline comments end with semicolons and #2607574: Don't add dot with inline comments containing code with semicolon.
- In-line comments #3497105: Fix LineLength for inline comments
- When the above is fixed, the bulk of the violations are fixed. Now, create child issues to fix the violations by directory and enable the sniff for that directory.
Completed
- @todos #3497100: Fix LineLength for @todo comments
- Summary lines, @file, @var #3497113: Fix LineLength for summary, @file and @var
- @param, @return, @throws #3497103: Fix LineLength for tags in doc blocs
- Paragraphs in doc blocks #3497102: Fix LineLength for doc block paragraphs
This issue will enable the sniff and fix any remaining problems.
Find issues in each group by
- Add
<rule ref="Drupal.Files.LineLength"/>
to phpcs.xml.dist - Run
phpcs --standard=core/phpcs.xml.dist --report-width=250 --report=code > a.txt
- Grep the results as needed