Add coverage for all sniffs identified by testUntested()
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start in LoadsysStandardTest::testUntested(), uncomment markTestIncomplete(), and run vendor/bin/phpunit to identify the remaining sniff names. Read the README's Testing section, then add sample files under tests/files/must/ and tests/files/must_not/ for the remaining sniffs; done means the full ruleset list is covered and the test suite passes.
Written by the indexing model from the issue text.
Description
The test suite now compares the full list of sniffs employed by a coding standard against those in the test sample file //~ annotations and throws an assertion failure if the sample files fail to "cover" all tests.
This acts as a crude kind of "coverage" metric of the sniffs defined in the ruleset, but right now we're only covering about 31 out of 120+ sniffs.
To resolve this, uncomment the markTestIncomplete() in LoadsysStandardTest::testUntested(). Then repeatedly run vendor/bin/phpunit and add new sample files for each remaining sniff name listed. Ideally, there should be two files for each sniff-- one confirming that incorrect style is caught by our ruleset, and another that correct behavior is not caught. The new files should be arranged in the tests/files/must/ and tests/files/must_not/ folders. Read the ## Testing section of the README for more naming details and goals.
- Dominant language
- PHP
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from loadsys/loadsys_codesniffer
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 35/100
loadsys/loadsys_codesniffer#51 · 1 comment ·
-
question
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
enhancement help-wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
enhancement help-wanted
Difficulty 1/5 Under an hour Newbie friendliness 45/100
-
enhancement help-wanted
Difficulty 4/5 3-5 days Newbie friendliness 35/100
All issues in loadsys/loadsys_codesniffer
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 3 days
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 1 day
-
[Sync EN] Fix session read handler docs: false reports a failure, not a missing session (#5902)Opensync-en
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
[Sync EN] Fix session read handler docs: false reports a failure, not a missing session (#5902)Opensync-en
Difficulty 2/5 1-2 days Newbie friendliness 84/100
Maintainers usually reply within 2 days
-
feature-request needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/aws-sdk-php#3365 ·
Maintainers usually reply within 1 day