Problem/Motivation
On some occasions, running phpcbf with the "Drupal" and "Drupal-Practice" coding rulesets, "min.css" files will get formatted. Since these files are intended to be compressed and should never be optimized, we have to exclude them from the "Drupal" ruleset.
It seems that this is not always the case, but excluding them directly in the ruleset, will fix the issue.
Steps to reproduce
- Create a custom module
- Create a css/admin folder
- Create a "mymodule_paragraphs.paragraphs_ui.min.css" file inside the "mymodule/css/admin" folder
- Run "phpcbf --standard=Drupal,DrupalPractice web/modules/custom/mymodule"
Proposed resolution
Exclude all "min.css" files in the ruleset.
Issue fork coder-3269399
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3269399-exclude-min.css-files
changes, plain diff MR !12
Comments
Comment #3
grevil commentedI created a merge request, fixing the issue.
Comment #4
thomas.frobieterPatch looks fine to me!
Comment #5
anybodyShouldn't it better be
*.min.css? (with a dot)?Otherwise wouldn't admin.css be excluded? ;)
Comment #6
anybodyComment #7
anybodyInterestingly the code check on Drupal CI also checks minified css files, which also doesn't make much sense to me, see for example: https://www.drupal.org/pift-ci-job/2339610 - I didn't find an issue for that.
Comment #8
anybodyComment #9
grevil commentedThanks, @Anybody, didn't think of that!
I fixed it on Gitlab and https://github.com/pfrenssen/coder/pull/159.
Comment #11
klausiMerged, thanks!