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/Classes/SelfMemberReferenceSniff.php | SelfMemberReferenceSniff]]: Tests `self` member references.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/CommentedOutCodeSniff.php | CommentedOutCodeSniff]]: Warn about commented out code.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/DisallowObEndFlushSniff.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 | 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 | DiscouragedFunctionsSniff]]: Discourages the use of debug functions.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/EvalSniff.php | EvalSniff]]: The use of `eval()` is discouraged.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/ForbiddenFunctionsSniff.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 | Stops the usage of the `global` keyword.
- [[https://github.com/squizlabs/PHP_CodeSniffer/blob/master/CodeSniffer/Standards/Squiz/Sniffs/PHP/InnerFunctionsSniff.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 | 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 | NonExecutableCodeSniff]]: Warns about code that can never been executed.