$ phpcs --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml config_sort/
FILE: C:\Users\SI-001\Downloads\config_sort\README.md
----------------------------------------------------------------------
FOUND 0 ERRORS AND 2 WARNINGS AFFECTING 2 LINES
----------------------------------------------------------------------
3 | WARNING | Line exceeds 80 characters; contains 82 characters
4 | WARNING | Line exceeds 80 characters; contains 81 characters
----------------------------------------------------------------------
FILE: C:\Users\SI-001\Downloads\config_sort\src\Plugin\ConfigFilter\SortFilter.php
---------------------------------------------------------------------------------------------
FOUND 3 ERRORS AFFECTING 3 LINES
---------------------------------------------------------------------------------------------
51 | ERROR | [x] TRUE, FALSE and NULL must be uppercase; expected "FALSE" but found "false"
63 | ERROR | [x] Expected 1 blank line after function; 0 found
64 | ERROR | [x] The closing brace for the class must have an empty line before it
---------------------------------------------------------------------------------------------
PHPCBF CAN FIX THE 3 MARKED SNIFF VIOLATIONS AUTOMATICALLY
---------------------------------------------------------------------------------------------
Time: 189ms; Memory: 8MB
Comment | File | Size | Author |
---|---|---|---|
#2 | drupal-coding-standard-issue-3296234-2.patch | 1.2 KB | Rakhi Soni |
Comments
Comment #2
Rakhi Soni CreditAttribution: Rakhi Soni at Smashing Infolabs Pvt. Ltd. for Smashing Infolabs Pvt. Ltd. commentedKindly review patch,,
Comment #4
jamsilver CreditAttribution: jamsilver commentedThank you! I've committed it to the 1.0.x branch.
FYI, I'm pretty sure the approach I use in this module is no good because I have since found that for some items of configuration the order of keys matters.
For example, exporting then importing a view with this module enabled will reorder all the fields and filters into alphabetical order of machine name. Which is no good.
So I'm still experimenting with ideas here! If you have any thoughts let me know! I'm currently working on another approach.