Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Docs: add missing XML documentation for sniffs #148

Open
@jrfnl

Description

Sniffs in PHP_CodeSniffer should preferably be accompanied by documentation. There are currently still a number of sniffs which don't have documentation.

Sniff documentation is provided via XML files in the standard's Docs directory and is available to end-users via the command-line and/or can be compiled into an HTML or Markdown file.

To see an example of some of some available documentation, run:

phpcs --standard=PSR12 --generator=Text

Getting started

The CONTRIBUTING doc contains information on writing sniff documentation and guidelines which should be followed.

Action list

Blocked

To Do

  • Generic.VersionControl.GitMergeConflict
  • PSR12.Classes.AnonClassDeclaration (There is a first draft available created by @dingo-d, which can be iterated on [Documentation] PSR12 - Anonymous Class Declaration #167 )
  • PSR12.Files.FileHeader (There is a first draft available created by @dingo-d, which can be iterated on [Documentation] PSR12 - File Header #231 )
  • PSR12.Traits.UseDeclaration (There is a first draft available created by @dingo-d, which can be iterated on [Documentation] PSR12 - Use Declaration #239 )
  • Squiz.Commenting.ClassComment
  • Squiz.Commenting.ClosingDeclarationComment
  • Squiz.Commenting.EmptyCatchComment
  • Squiz.Commenting.FileComment
  • Squiz.Commenting.FunctionComment
  • Squiz.Commenting.InlineComment
  • Squiz.Commenting.LongConditionClosingComment
  • Squiz.Commenting.PostStatementComment
  • Squiz.Commenting.VariableComment
  • Squiz.ControlStructures.ControlSignature
  • Squiz.ControlStructures.ElseIfDeclaration
  • Squiz.ControlStructures.InlineIfDeclaration
  • Squiz.ControlStructures.SwitchDeclaration
  • Squiz.Files.FileExtension
  • Squiz.Formatting.OperatorBracket
  • Squiz.Functions.FunctionDeclarationArgumentSpacing
  • Squiz.Functions.FunctionDuplicateArgument
  • Squiz.Functions.FunctionDeclaration
  • Squiz.Functions.GlobalFunction
  • Squiz.Functions.MultiLineFunctionDeclaration
  • Squiz.NamingConventions.ValidFunctionName
  • Squiz.NamingConventions.ValidVariableName
  • Squiz.Objects.ObjectInstantiation
  • Squiz.Operators.ComparisonOperatorUsage
  • Squiz.Operators.IncrementDecrementUsage
  • Squiz.Operators.ValidLogicalOperators
  • Squiz.PHP.CommentedOutCode
  • Squiz.PHP.DisallowBooleanStatement
  • Squiz.PHP.DisallowComparisonAssignment
  • Squiz.PHP.DisallowInlineIf
  • Squiz.PHP.DisallowMultipleAssignments
  • Squiz.PHP.DisallowSizeFunctionsInLoops
  • Squiz.PHP.DiscouragedFunctions
  • Squiz.PHP.EmbeddedPhp
  • Squiz.PHP.Eval
  • Squiz.PHP.GlobalKeyword
  • Squiz.PHP.InnerFunctions
  • Squiz.PHP.LowercasePHPFunctions
  • Squiz.PHP.NonExecutableCode
  • Squiz.Scope.MemberVarScope
  • Squiz.Scope.MethodScope
  • Squiz.Strings.ConcatenationSpacing
  • Squiz.Strings.DoubleQuoteUsage

Note: a number of sniffs will be removed in v 4.0. Those have been deliberately excluded from the above action list.

Claimed/Work in Progress

Done

Want to contribute ?

Leave a comment below to claim a sniff you'll be working on.

PRs related to this task should preferably only contain the docs for one sniff each.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /