Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Add coverage for all sniffs identified by testUntested()

Đang mở
#39 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
php
Lĩnh vực
testing

Hướng nghiên cứu

Bắt đầu trong LoadsysStandardTest::testUntested(), bỏ comment markTestIncomplete() và chạy vendor/bin/phpunit để xác định tên của các sniff còn lại. Đọc phần Testing của README, sau đó thêm các tệp mẫu vào tests/files/must/ và tests/files/must_not/ cho các sniff còn lại; công việc được hoàn tất khi toàn bộ danh sách ruleset đã được bao phủ và bộ kiểm thử chạy thành công.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug help-wanted

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.

Ngôn ngữ chính
PHP
Star
0
Fork
0
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của loadsys/loadsys_codesniffer

Tất cả issue của loadsys/loadsys_codesniffer

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.