We should look at implementing the following linter rules as part of `ArcanistXHPASTLinter`:
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopShouldBeWhileLoopSniff.php | ForLoopShouldBeWhileLoopSniff]]: Detects `for`-loops that can be simplified as a `while`-loop.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/ForLoopWithTestFunctionCallSniff.php | ForLoopWithTestFunctionCallSniff]]: Detects `for`-loops that use a function call in the test expression.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/JumbledIncrementerSniff.php | JumbledIncrementerSniff]]: Detects incrementer jumbling in `for` loops.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnnecessaryFinalModifierSniff.php | UnnecessaryFinalModifierSniff]]: Detects unnecessary `final` modifiers inside of `final` classes.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UnusedFunctionParameterSniff.php | UnusedFunctionParameterSniff]]: Checks the for unused function parameters.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/CodeAnalysis/UselessOverridingMethodSniff.php | UselessOverridingMethodSniff]]: Detects unnecessary overridden methods that simply call their parent.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Commenting/DocCommentSniff.php | DocCommentSniff]]: Ensures doc blocks follow basic formatting.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/DisallowMultipleStatementsSniff.php | DisallowMultipleStatementsSniff]]: Ensures each statement is on a line by itself.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/MultipleStatementAlignmentSniff.php | MultipleStatementAlignmentSniff]]: Checks alignment of assignments.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Formatting/NoSpaceAfterCastSniff.php | NoSpaceAfterCastSniff]]: Ensures there is no space after cast tokens.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php | UpperCaseConstantNameSniff]]: Ensures that constant names are all uppercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/PHP/SAPIUsageSniff.php | SAPIUsageSniff]]: Ensures the `PHP_SAPI` constant is used instead of `php_sapi_name()`.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Generic/Sniffs/Strings/UnnecessaryStringConcatSniff.php | UnnecessaryStringConcatSniff]]: Checks that two strings are not concatenated together.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php | Squiz_Sniffs_PHP_CommentedOutCodeSniff]]: Warn about commented out code.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.php | Squiz_Sniffs_PHP_DisallowObEndFlushSniff]]: Checks the indenting used when an `ob_start()` call occurs.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowSizeFunctionsInLoopsSniff.php | Squiz_Sniffs_PHP_DisallowSizeFunctionsInLoopsSniff]]: Bans the use of size-based functions in loop conditions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DiscouragedFunctionsSniff.php | Squiz_Sniffs_PHP_DiscouragedFunctionsSniff]]: Discourages the use of debug functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php | Squiz_Sniffs_PHP_EvalSniff]]: The use of `eval()` is discouraged.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.php | Squiz_Sniffs_PHP_ForbiddenFunctionsSniff]]: Discourages the use of alias functions that are kept in PHP for compatibility with older versions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/GlobalKeywordSniff.php | Squiz_Sniffs_PHP_GlobalKeywordSniff]]: Stops the usage of the `global` keyword.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.php | Squiz_Sniffs_PHP_InnerFunctionsSniff]]: Ensures that functions within functions are never used.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/LowercasePHPFunctionsSniff.php | Squiz_Sniffs_PHP_LowercasePHPFunctionsSniff]]: Ensures all calls to inbuilt PHP functions are lowercase.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/NonExecutableCodeSniff.php | Squiz_Sniffs_PHP_NonExecutableCodeSniff]]: Warns about code that can never been executed.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Scope/MemberVarScopeSniff.php | Squiz_Sniffs_Scope_MemberVarScopeSniff]]: Verifies that class members have scope modifiers.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php | Squiz_Sniffs_Scope_MethodScopeSniff]]: Verifies that class methods have scope modifiers.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Scope/StaticThisUsageSniff.php | Squiz_Sniffs_Scope_StaticThisUsageSniff]]: Checks for usage of `$this` in static methods.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Strings/ConcatenationSpacingSniff.php | Squiz_Sniffs_Strings_ConcatenationSpacingSniff]]: Makes sure there are no spaces between the concatenation operator and the strings being concatenated.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Strings/DoubleQuoteUsageSniff.php | Squiz_Sniffs_Strings_DoubleQuoteUsageSniff]]: Makes sure that any use of double quotes are warranted.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/Strings/EchoedStringsSniff.php | Squiz_Sniffs_Strings_EchoedStringsSniff]]: Makes sure that any strings that are "echoed" are not enclosed in brackets like a function call.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/CastSpacingSniff.php | Squiz_Sniffs_WhiteSpace_CastSpacingSniff]]: Ensure cast statements don't contain whitespace.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ControlStructureSpacingSniff.php | Squiz_Sniffs_WhiteSpace_ControlStructureSpacingSniff]]: Checks that control structures have the correct spacing around brackets.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php | Squiz_Sniffs_WhiteSpace_FunctionClosingBraceSpaceSniff]]: Checks that there is one empty line before the closing brace of a function.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php | Squiz_Sniffs_WhiteSpace_FunctionOpeningBraceSpaceSniff]]: Checks that there is no empty line after the opening brace of a function.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/FunctionSpacingSniff.php | Squiz_Sniffs_WhiteSpace_FunctionSpacingSniff]]: Checks the separation between methods in a class or interface.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LanguageConstructSpacingSniff.php | Squiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniff]]: Ensures all language constructs (without brackets) contain a single space between themselves and their content.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/LogicalOperatorSpacingSniff.php | LogicalOperatorSpacingSniff]]: Verifies that operators have valid spacing surrounding them.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/MemberVarSpacingSniff.php | Squiz_Sniffs_WhiteSpace_MemberVarSpacingSniff]]: Verifies that class members are spaced correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php | Squiz_Sniffs_WhiteSpace_ObjectOperatorSpacingSniff]]: Ensure there is no whitespace before a semicolon.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/OperatorSpacingSniff.php | Squiz_Sniffs_WhiteSpace_Squiz_Sniffs_WhiteSpace_OperatorSpacingSniff]]: Verifies that operators have valid spacing surrounding them.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/PropertyLabelSpacingSnSquiz_Sniffs_WhiteSpace_LanguageConstructSpacingSniffiff.php | Squiz_Sniffs_WhiteSpace_PropertyLabelSpacingSniff]]: Ensures that the colon in a property or label definition has a single space after it and no space before it.: Ensures all language constructs (without brackets) contain a single space between themselves and their content.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeClosingBraceSniff.php | Squiz_Sniffs_WhiteSpace_ScopeClosingBraceSniff]]: Checks that the closing braces of scopes are aligned correctly.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/ScopeKeywordSpacingSniff.php | Squiz_Sniffs_WhiteSpace_ScopeKeywordSpacingSniff]]: Ensure there is a single space after scope keywords.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SemicolonSpacingSniff.php | Squiz_Sniffs_WhiteSpace_SemicolonSpacingSniff]]: Ensure there is no whitespace before a semicolon.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/WhiteSpace/SuperfluousWhitespaceSniff.php | Squiz_Sniffs_WhiteSpace_SuperfluousWhitespaceSniff]]: Checks that no whitespace proceeds the first content of the file, exists after the last content of the file, resides after content on any line, or are two empty lines in functions.