Review use of external sniffs

Aberta
#553 1 comentário 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
5/5
Tempo estimado
Mais de uma semana
Facilidade para iniciantes
20/100
Tipo de issue
Refatoração
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
php
Domínio
tooling

Direção de pesquisa

Comece pela lista externa de sniffs nesta issue e selecione um sniff de um dos rulesets Generic, PSR2, Squiz, VariableAnalysis ou WordPress. Revise sua relevância atual, comportamento, alternativas e problemas relatados ou observáveis em relação aos dois rulesets do VIPCS e às informações do projeto upstream. O trabalho estará concluído quando cada sniff tiver uma revisão documentada e issues separadas e específicas forem abertas quando houver necessidade de trabalho de acompanhamento.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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.

Linguagem predominante
PHP
Estrelas
261
Forks
44
Merge médio
3d 9h
PRs com merge (30d)
10

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Automattic/VIP-Coding-Standards

Todas as issues de Automattic/VIP-Coding-Standards

Issues semelhantes

Mais issues de PHP

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.