Closed (fixed)
Project:
Coder
Version:
8.3.x-dev
Component:
Coder Sniffer
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Jul 2025 at 08:36 UTC
Updated:
28 Oct 2025 at 13:29 UTC
Jump to comment: Most recent
Comments
Comment #2
jonathan1055 commentedI can work on a MR and add test coverage if this is an agreed way forward.
Comment #3
mandclu commentedI have a project that started throw 15 phpcs errors of the exact type mentioned in the IS and also one other, all in .yml files. I can't personally see what useful feedback we would get from running a php check against .yml files.
Comment #5
jonathan1055 commentedCoder is being used to check some useful things in .yml files such as #2841649: Add sniff for _access: 'TRUE' in Drupal 8 routing.yml and probably others. I think most php codesniffer rules will not trigger in .yml files, but some might, for example the one in this issue. Could you link to your pipeline job, or show the file(s) and sniff(s) that are incorrectly flagged. Then they could be excluded here too.
Comment #6
jonathan1055 commentedI have created https://github.com/pfrenssen/coder/pull/268
I can add test coverage if this is required.
Comment #7
klausiThanks, approach makes sense. Left one minor comment on the PR https://github.com/pfrenssen/coder/pull/268
Comment #8
jonathan1055 commentedThanks, I have addressed the feedback in the PR. Also added a new test file
good/good.ymland tested without the change (to prove coverage) then with the change.https://github.com/pfrenssen/coder/pull/268/commits
[ignore the change to extentions at the top of the ruleset.yml. I later realised that the recommended way to run as per the README is to specify these in an
extentions=parameter. If you don't do this, it defaults to just .php and .inc]Ready for review.
Comment #9
klausiMerged, thanks!
Comment #12
klausitagging.