Automattic / Automattic/VIP-Coding-Standards
Review use of external sniffs
- Ngôn ngữ chính
- PHP
- Star
- 261
- Fork
- 44
- Merge trung bình
- 19 phút
- Pull request đã merge (30 ngày)
- 1
Mô tả
Both VIPCS rulesets currently use the following external sniffs:
```
Generic (5 sniffs)
------------------
Generic.NamingConventions.ConstructorName
Generic.PHP.DisallowShortOpenTag
Generic.PHP.NoSilencedErrors
Generic.PHP.Syntax
Generic.VersionControl.GitMergeConflict
PSR2 (1 sniff)
---------------
PSR2.Files.ClosingTag
Squiz (3 sniffs)
----------------
Squiz.PHP.CommentedOutCode
Squiz.PHP.Eval
Squiz.WhiteSpace.SuperfluousWhitespace
VariableAnalysis (1 sniff)
---------------------------
VariableAnalysis.CodeAnalysis.VariableAnalysis
WordPress (20 sniffs)
---------------------
WordPress.CodeAnalysis.AssignmentInCondition
WordPress.DB.DirectDatabaseQuery
WordPress.DB.PreparedSQL
WordPress.DB.SlowDBQuery
WordPress.DateTime.RestrictedFunctions
WordPress.PHP.DevelopmentFunctions
WordPress.PHP.DiscouragedPHPFunctions
WordPress.PHP.DontExtract
WordPress.PHP.IniSet
WordPress.PHP.StrictComparisons
WordPress.PHP.StrictInArray
WordPress.Security.EscapeOutput
WordPress.Security.NonceVerification
WordPress.Security.PluginMenuSlug
WordPress.Security.ValidatedSanitizedInput
WordPress.WP.AlternativeFunctions
WordPress.WP.CronInterval
WordPress.WP.EnqueuedResources
WordPress.WP.GlobalVariablesOverride
WordPress.WP.PostsPerPage
```
For each of these sniffs, a review should be done to verify the following:
* Is the sniff still relevant ?
* Does the sniff do what it should do ?
* Is this still the best sniff for the job or have other sniffs been published in the mean time which are better, i.e. should the current sniff inclusion be replaced with another sniff ?
* Are there known issues with the sniff, either reported here or upstream ? And if so, can we contribute to fixing these ?
* Are there unreported issues with the sniff based on a quick code review ? Things along the same lines as the VIPCS native sniffs are being reviewed for, like code style independence and correct handling of modern PHP code.
I'm opening this issue as a placeholder/reminder that this review needs to be done. When the time is right to address this, we may need to open individual issues for each sniff to allow for a more targeted discussion of each sniff.
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu với danh sách sniff bên ngoài trong issue này và chọn một sniff từ một trong các ruleset Generic, PSR2, Squiz, VariableAnalysis hoặc WordPress. Xem xét mức độ phù hợp hiện tại, hành vi, các phương án thay thế và những vấn đề đã được báo cáo hoặc có thể quan sát được của sniff đó dựa trên hai ruleset VIPCS và thông tin từ dự án upstream. Được xem là hoàn tất khi mỗi sniff đều có một bản đánh giá được ghi lại và các issue riêng biệt, có mục tiêu cụ thể, đã được mở khi cần thực hiện công việc tiếp theo.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- php
- Lĩnh vực
- tooling
- Loại issue
- Tái cấu trúc
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100