• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PHPCSStandards / PHP_CodeSniffer / 11826508344
78%
master: 79%

Build:
Build:
LAST BUILD BRANCH: dependabot/github_actions/3.x/action-runners-06f19cc200
DEFAULT BRANCH: master
Ran 13 Nov 2024 09:59PM UTC
Jobs 0
Files 0
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
11826508344

push

github

jrfnl
Common::getSniffCode(): be more lenient about sniffs not following naming conventions

Sniff classes _should_ always follow the directory layout and naming conventions for sniffs as per the [Tutorial](https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Coding-Standard-Tutorial).

However, before the change made in 524, when given a sniff class name for a sniff not following the naming conventions, the `Common::getSniffCode()` method would return a "sniff code" anyway. And even though the sniff code would be unconventional and not really valid, it would still _work_.

Since 524 this is no longer the case.

Given the above, the change from 524 breaks custom rulesets which use `<rule>` includes for individual sniff files not complying with the naming conventions. Breaking changes can only be made in majors, so this commit reverts the problematic part of the change from 524.

Includes additional tests safeguarding the (broken) behaviour which needs to be maintained until the next major.

Fixes 675
Source Files on build 11826508344
Detailed source file information is not available for this build.
  • Back to Repo
  • Github Actions Build #11826508344
  • 8d5d7d0e on github
  • Prev Build on 4.0 (#11825573520)
  • Next Build on 4.0 (#11826554247)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc