mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-01 19:22:41 +01:00
(stable) Promote 2015 Week 47
This commit is contained in:
commit
62569678e3
221 changed files with 2128 additions and 713 deletions
14
.arclint
14
.arclint
|
@ -31,10 +31,6 @@
|
|||
"type": "phutil-library",
|
||||
"include": "(\\.php$)"
|
||||
},
|
||||
"phutil-xhpast": {
|
||||
"type": "phutil-xhpast",
|
||||
"include": "(\\.php$)"
|
||||
},
|
||||
"spelling": {
|
||||
"type": "spelling",
|
||||
"exclude": "(^resources/spelling/.*\\.json$)"
|
||||
|
@ -45,15 +41,7 @@
|
|||
"xhpast": {
|
||||
"type": "xhpast",
|
||||
"include": "(\\.php$)",
|
||||
"severity": {
|
||||
"16": "advice",
|
||||
"34": "error"
|
||||
},
|
||||
"xhpast.blacklisted.function": {
|
||||
"eval": "The eval() function should be avoided. It is potentially unsafe and makes debugging more difficult."
|
||||
},
|
||||
"xhpast.php-version": "5.2.3",
|
||||
"xhpast.php-version.windows": "5.3.0"
|
||||
"standard": "phutil.xhpast"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ trim_trailing_whitespace = true
|
|||
insert_final_newline = true
|
||||
max_line_length = 80
|
||||
|
||||
[src/lint/linter/__tests__/**.lint-test]
|
||||
[src/lint/linter/**/__tests__/**.lint-test]
|
||||
indent_style =
|
||||
end_of_line =
|
||||
max_line_length =
|
||||
|
|
|
@ -10,20 +10,29 @@ phutil_register_library_map(array(
|
|||
'__library_version__' => 2,
|
||||
'class' => array(
|
||||
'ArcanistAliasFunctionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistAliasFunctionXHPASTLinterRule.php',
|
||||
'ArcanistAliasFunctionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistAliasFunctionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistAliasWorkflow' => 'workflow/ArcanistAliasWorkflow.php',
|
||||
'ArcanistAmendWorkflow' => 'workflow/ArcanistAmendWorkflow.php',
|
||||
'ArcanistAnoidWorkflow' => 'workflow/ArcanistAnoidWorkflow.php',
|
||||
'ArcanistArrayCombineXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistArrayCombineXHPASTLinterRule.php',
|
||||
'ArcanistArrayCombineXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistArrayCombineXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistArrayIndexSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistArrayIndexSpacingXHPASTLinterRule.php',
|
||||
'ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistArraySeparatorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistArraySeparatorXHPASTLinterRule.php',
|
||||
'ArcanistArraySeparatorXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistArraySeparatorXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistArrayValueXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistArrayValueXHPASTLinterRule.php',
|
||||
'ArcanistArrayValueXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistArrayValueXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistBackoutWorkflow' => 'workflow/ArcanistBackoutWorkflow.php',
|
||||
'ArcanistBaseCommitParser' => 'parser/ArcanistBaseCommitParser.php',
|
||||
'ArcanistBaseCommitParserTestCase' => 'parser/__tests__/ArcanistBaseCommitParserTestCase.php',
|
||||
'ArcanistBaseXHPASTLinter' => 'lint/linter/ArcanistBaseXHPASTLinter.php',
|
||||
'ArcanistBinaryExpressionSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistBinaryExpressionSpacingXHPASTLinterRule.php',
|
||||
'ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistBlacklistedFunctionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistBlacklistedFunctionXHPASTLinterRule.php',
|
||||
'ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistBookmarkWorkflow' => 'workflow/ArcanistBookmarkWorkflow.php',
|
||||
'ArcanistBraceFormattingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistBraceFormattingXHPASTLinterRule.php',
|
||||
'ArcanistBraceFormattingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistBraceFormattingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistBranchWorkflow' => 'workflow/ArcanistBranchWorkflow.php',
|
||||
'ArcanistBritishTestCase' => 'configuration/__tests__/ArcanistBritishTestCase.php',
|
||||
'ArcanistBrowseWorkflow' => 'workflow/ArcanistBrowseWorkflow.php',
|
||||
|
@ -34,14 +43,20 @@ phutil_register_library_map(array(
|
|||
'ArcanistCSharpLinter' => 'lint/linter/ArcanistCSharpLinter.php',
|
||||
'ArcanistCallConduitWorkflow' => 'workflow/ArcanistCallConduitWorkflow.php',
|
||||
'ArcanistCallParenthesesXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistCallParenthesesXHPASTLinterRule.php',
|
||||
'ArcanistCallParenthesesXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistCallParenthesesXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistCallTimePassByReferenceXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistCallTimePassByReferenceXHPASTLinterRule.php',
|
||||
'ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistCapabilityNotSupportedException' => 'workflow/exception/ArcanistCapabilityNotSupportedException.php',
|
||||
'ArcanistCastSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistCastSpacingXHPASTLinterRule.php',
|
||||
'ArcanistCastSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistCastSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistCheckstyleXMLLintRenderer' => 'lint/renderer/ArcanistCheckstyleXMLLintRenderer.php',
|
||||
'ArcanistChmodLinter' => 'lint/linter/ArcanistChmodLinter.php',
|
||||
'ArcanistChmodLinterTestCase' => 'lint/linter/__tests__/ArcanistChmodLinterTestCase.php',
|
||||
'ArcanistClassExtendsObjectXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistClassExtendsObjectXHPASTLinterRule.php',
|
||||
'ArcanistClassExtendsObjectXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistClassExtendsObjectXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistClassFilenameMismatchXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistClassFilenameMismatchXHPASTLinterRule.php',
|
||||
'ArcanistClassNameLiteralXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistClassNameLiteralXHPASTLinterRule.php',
|
||||
'ArcanistClassNameLiteralXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistClassNameLiteralXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistCloseRevisionWorkflow' => 'workflow/ArcanistCloseRevisionWorkflow.php',
|
||||
'ArcanistCloseWorkflow' => 'workflow/ArcanistCloseWorkflow.php',
|
||||
'ArcanistClosureLinter' => 'lint/linter/ArcanistClosureLinter.php',
|
||||
|
@ -52,25 +67,33 @@ phutil_register_library_map(array(
|
|||
'ArcanistCommentRemoverTestCase' => 'parser/__tests__/ArcanistCommentRemoverTestCase.php',
|
||||
'ArcanistCommentSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistCommentSpacingXHPASTLinterRule.php',
|
||||
'ArcanistCommentStyleXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistCommentStyleXHPASTLinterRule.php',
|
||||
'ArcanistCommentStyleXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistCommentStyleXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistCommitWorkflow' => 'workflow/ArcanistCommitWorkflow.php',
|
||||
'ArcanistCompilerLintRenderer' => 'lint/renderer/ArcanistCompilerLintRenderer.php',
|
||||
'ArcanistComposerLinter' => 'lint/linter/ArcanistComposerLinter.php',
|
||||
'ArcanistComprehensiveLintEngine' => 'lint/engine/ArcanistComprehensiveLintEngine.php',
|
||||
'ArcanistConcatenationOperatorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistConcatenationOperatorXHPASTLinterRule.php',
|
||||
'ArcanistConcatenationOperatorXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistConcatenationOperatorXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistConfiguration' => 'configuration/ArcanistConfiguration.php',
|
||||
'ArcanistConfigurationDrivenLintEngine' => 'lint/engine/ArcanistConfigurationDrivenLintEngine.php',
|
||||
'ArcanistConfigurationDrivenUnitTestEngine' => 'unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php',
|
||||
'ArcanistConfigurationManager' => 'configuration/ArcanistConfigurationManager.php',
|
||||
'ArcanistConsoleLintRenderer' => 'lint/renderer/ArcanistConsoleLintRenderer.php',
|
||||
'ArcanistConstructorParenthesesXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistConstructorParenthesesXHPASTLinterRule.php',
|
||||
'ArcanistConstructorParenthesesXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistConstructorParenthesesXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistControlStatementSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistControlStatementSpacingXHPASTLinterRule.php',
|
||||
'ArcanistControlStatementSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistControlStatementSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistCoverWorkflow' => 'workflow/ArcanistCoverWorkflow.php',
|
||||
'ArcanistCppcheckLinter' => 'lint/linter/ArcanistCppcheckLinter.php',
|
||||
'ArcanistCppcheckLinterTestCase' => 'lint/linter/__tests__/ArcanistCppcheckLinterTestCase.php',
|
||||
'ArcanistCpplintLinter' => 'lint/linter/ArcanistCpplintLinter.php',
|
||||
'ArcanistCpplintLinterTestCase' => 'lint/linter/__tests__/ArcanistCpplintLinterTestCase.php',
|
||||
'ArcanistDeclarationParenthesesXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDeclarationParenthesesXHPASTLinterRule.php',
|
||||
'ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistDefaultParametersXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDefaultParametersXHPASTLinterRule.php',
|
||||
'ArcanistDefaultParametersXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDefaultParametersXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistDeprecationXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDeprecationXHPASTLinterRule.php',
|
||||
'ArcanistDeprecationXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDeprecationXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistDiffChange' => 'parser/diff/ArcanistDiffChange.php',
|
||||
'ArcanistDiffChangeType' => 'parser/diff/ArcanistDiffChangeType.php',
|
||||
'ArcanistDiffHunk' => 'parser/diff/ArcanistDiffHunk.php',
|
||||
|
@ -85,19 +108,27 @@ phutil_register_library_map(array(
|
|||
'ArcanistDifferentialRevisionHash' => 'differential/constants/ArcanistDifferentialRevisionHash.php',
|
||||
'ArcanistDifferentialRevisionStatus' => 'differential/constants/ArcanistDifferentialRevisionStatus.php',
|
||||
'ArcanistDoubleQuoteXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDoubleQuoteXHPASTLinterRule.php',
|
||||
'ArcanistDoubleQuoteXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDoubleQuoteXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistDownloadWorkflow' => 'workflow/ArcanistDownloadWorkflow.php',
|
||||
'ArcanistDuplicateKeysInArrayXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDuplicateKeysInArrayXHPASTLinterRule.php',
|
||||
'ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistDuplicateSwitchCaseXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDuplicateSwitchCaseXHPASTLinterRule.php',
|
||||
'ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistDynamicDefineXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistDynamicDefineXHPASTLinterRule.php',
|
||||
'ArcanistDynamicDefineXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistDynamicDefineXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistElseIfUsageXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistElseIfUsageXHPASTLinterRule.php',
|
||||
'ArcanistElseIfUsageXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistElseIfUsageXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistEmptyFileXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistEmptyFileXHPASTLinterRule.php',
|
||||
'ArcanistEmptyStatementXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistEmptyStatementXHPASTLinterRule.php',
|
||||
'ArcanistEmptyStatementXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistEmptyStatementXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistEventType' => 'events/constant/ArcanistEventType.php',
|
||||
'ArcanistExitExpressionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistExitExpressionXHPASTLinterRule.php',
|
||||
'ArcanistExitExpressionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistExitExpressionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistExportWorkflow' => 'workflow/ArcanistExportWorkflow.php',
|
||||
'ArcanistExternalLinter' => 'lint/linter/ArcanistExternalLinter.php',
|
||||
'ArcanistExternalLinterTestCase' => 'lint/linter/__tests__/ArcanistExternalLinterTestCase.php',
|
||||
'ArcanistExtractUseXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistExtractUseXHPASTLinterRule.php',
|
||||
'ArcanistExtractUseXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistExtractUseXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistFeatureWorkflow' => 'workflow/ArcanistFeatureWorkflow.php',
|
||||
'ArcanistFileDataRef' => 'upload/ArcanistFileDataRef.php',
|
||||
'ArcanistFileUploader' => 'upload/ArcanistFileUploader.php',
|
||||
|
@ -107,6 +138,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistFlake8Linter' => 'lint/linter/ArcanistFlake8Linter.php',
|
||||
'ArcanistFlake8LinterTestCase' => 'lint/linter/__tests__/ArcanistFlake8LinterTestCase.php',
|
||||
'ArcanistFormattedStringXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistFormattedStringXHPASTLinterRule.php',
|
||||
'ArcanistFormattedStringXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistFormattedStringXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistFutureLinter' => 'lint/linter/ArcanistFutureLinter.php',
|
||||
'ArcanistGeneratedLinter' => 'lint/linter/ArcanistGeneratedLinter.php',
|
||||
'ArcanistGeneratedLinterTestCase' => 'lint/linter/__tests__/ArcanistGeneratedLinterTestCase.php',
|
||||
|
@ -115,6 +147,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistGitLandEngine' => 'land/ArcanistGitLandEngine.php',
|
||||
'ArcanistGitUpstreamPath' => 'repository/api/ArcanistGitUpstreamPath.php',
|
||||
'ArcanistGlobalVariableXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistGlobalVariableXHPASTLinterRule.php',
|
||||
'ArcanistGlobalVariableXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistGlobalVariableXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistGoLintLinter' => 'lint/linter/ArcanistGoLintLinter.php',
|
||||
'ArcanistGoLintLinterTestCase' => 'lint/linter/__tests__/ArcanistGoLintLinterTestCase.php',
|
||||
'ArcanistGoTestResultParser' => 'unit/parser/ArcanistGoTestResultParser.php',
|
||||
|
@ -127,14 +160,22 @@ phutil_register_library_map(array(
|
|||
'ArcanistHgProxyServer' => 'hgdaemon/ArcanistHgProxyServer.php',
|
||||
'ArcanistHgServerChannel' => 'hgdaemon/ArcanistHgServerChannel.php',
|
||||
'ArcanistImplicitConstructorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistImplicitConstructorXHPASTLinterRule.php',
|
||||
'ArcanistImplicitConstructorXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistImplicitConstructorXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistImplicitFallthroughXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistImplicitFallthroughXHPASTLinterRule.php',
|
||||
'ArcanistImplicitFallthroughXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistImplicitFallthroughXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistImplicitVisibilityXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistImplicitVisibilityXHPASTLinterRule.php',
|
||||
'ArcanistImplicitVisibilityXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistImplicitVisibilityXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistInlineHTMLXHPASTLinterRule' => 'lint/linter/ArcanistInlineHTMLXHPASTLinterRule.php',
|
||||
'ArcanistInlineHTMLXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistInlineHTMLXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistInnerFunctionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistInnerFunctionXHPASTLinterRule.php',
|
||||
'ArcanistInnerFunctionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistInnerFunctionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistInstallCertificateWorkflow' => 'workflow/ArcanistInstallCertificateWorkflow.php',
|
||||
'ArcanistInstanceOfOperatorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistInstanceOfOperatorXHPASTLinterRule.php',
|
||||
'ArcanistInstanceofOperatorXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistInstanceofOperatorXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistInvalidDefaultParameterXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistInvalidDefaultParameterXHPASTLinterRule.php',
|
||||
'ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistInvalidModifiersXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistInvalidModifiersXHPASTLinterRule.php',
|
||||
'ArcanistInvalidModifiersXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistInvalidModifiersXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistJSHintLinter' => 'lint/linter/ArcanistJSHintLinter.php',
|
||||
'ArcanistJSHintLinterTestCase' => 'lint/linter/__tests__/ArcanistJSHintLinterTestCase.php',
|
||||
'ArcanistJSONLintLinter' => 'lint/linter/ArcanistJSONLintLinter.php',
|
||||
|
@ -145,10 +186,13 @@ phutil_register_library_map(array(
|
|||
'ArcanistJscsLinter' => 'lint/linter/ArcanistJscsLinter.php',
|
||||
'ArcanistJscsLinterTestCase' => 'lint/linter/__tests__/ArcanistJscsLinterTestCase.php',
|
||||
'ArcanistKeywordCasingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistKeywordCasingXHPASTLinterRule.php',
|
||||
'ArcanistKeywordCasingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistKeywordCasingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistLambdaFuncFunctionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistLambdaFuncFunctionXHPASTLinterRule.php',
|
||||
'ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistLandEngine' => 'land/ArcanistLandEngine.php',
|
||||
'ArcanistLandWorkflow' => 'workflow/ArcanistLandWorkflow.php',
|
||||
'ArcanistLanguageConstructParenthesesXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistLanguageConstructParenthesesXHPASTLinterRule.php',
|
||||
'ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistLesscLinter' => 'lint/linter/ArcanistLesscLinter.php',
|
||||
'ArcanistLesscLinterTestCase' => 'lint/linter/__tests__/ArcanistLesscLinterTestCase.php',
|
||||
'ArcanistLiberateWorkflow' => 'workflow/ArcanistLiberateWorkflow.php',
|
||||
|
@ -161,12 +205,17 @@ phutil_register_library_map(array(
|
|||
'ArcanistLintSeverity' => 'lint/ArcanistLintSeverity.php',
|
||||
'ArcanistLintWorkflow' => 'workflow/ArcanistLintWorkflow.php',
|
||||
'ArcanistLinter' => 'lint/linter/ArcanistLinter.php',
|
||||
'ArcanistLinterStandard' => 'lint/linter/standards/ArcanistLinterStandard.php',
|
||||
'ArcanistLinterStandardTestCase' => 'lint/linter/standards/__tests__/ArcanistLinterStandardTestCase.php',
|
||||
'ArcanistLinterTestCase' => 'lint/linter/__tests__/ArcanistLinterTestCase.php',
|
||||
'ArcanistLintersWorkflow' => 'workflow/ArcanistLintersWorkflow.php',
|
||||
'ArcanistListAssignmentXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistListAssignmentXHPASTLinterRule.php',
|
||||
'ArcanistListAssignmentXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistListAssignmentXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistListWorkflow' => 'workflow/ArcanistListWorkflow.php',
|
||||
'ArcanistLogicalOperatorsXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistLogicalOperatorsXHPASTLinterRule.php',
|
||||
'ArcanistLogicalOperatorsXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistLogicalOperatorsXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistLowercaseFunctionsXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistLowercaseFunctionsXHPASTLinterRule.php',
|
||||
'ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistMercurialAPI' => 'repository/api/ArcanistMercurialAPI.php',
|
||||
'ArcanistMercurialParser' => 'repository/parser/ArcanistMercurialParser.php',
|
||||
'ArcanistMercurialParserTestCase' => 'repository/parser/__tests__/ArcanistMercurialParserTestCase.php',
|
||||
|
@ -174,24 +223,39 @@ phutil_register_library_map(array(
|
|||
'ArcanistMergeConflictLinterTestCase' => 'lint/linter/__tests__/ArcanistMergeConflictLinterTestCase.php',
|
||||
'ArcanistMissingLinterException' => 'lint/linter/exception/ArcanistMissingLinterException.php',
|
||||
'ArcanistModifierOrderingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistModifierOrderingXHPASTLinterRule.php',
|
||||
'ArcanistModifierOrderingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistModifierOrderingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistNamingConventionsXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistNamingConventionsXHPASTLinterRule.php',
|
||||
'ArcanistNamingConventionsXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistNamingConventionsXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistNestedNamespacesXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistNestedNamespacesXHPASTLinterRule.php',
|
||||
'ArcanistNestedNamespacesXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistNestedNamespacesXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistNewlineAfterOpenTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistNewlineAfterOpenTagXHPASTLinterRule.php',
|
||||
'ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistNoEffectException' => 'exception/usage/ArcanistNoEffectException.php',
|
||||
'ArcanistNoEngineException' => 'exception/usage/ArcanistNoEngineException.php',
|
||||
'ArcanistNoLintLinter' => 'lint/linter/ArcanistNoLintLinter.php',
|
||||
'ArcanistNoLintLinterTestCase' => 'lint/linter/__tests__/ArcanistNoLintLinterTestCase.php',
|
||||
'ArcanistNoParentScopeXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistNoParentScopeXHPASTLinterRule.php',
|
||||
'ArcanistNoParentScopeXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistNoParentScopeXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistNoneLintRenderer' => 'lint/renderer/ArcanistNoneLintRenderer.php',
|
||||
'ArcanistObjectOperatorSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistObjectOperatorSpacingXHPASTLinterRule.php',
|
||||
'ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPEP8Linter' => 'lint/linter/ArcanistPEP8Linter.php',
|
||||
'ArcanistPEP8LinterTestCase' => 'lint/linter/__tests__/ArcanistPEP8LinterTestCase.php',
|
||||
'ArcanistPHPCloseTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPCloseTagXHPASTLinterRule.php',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPCompatibilityXHPASTLinterRule.php',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPHPCompatibilityXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPHPEchoTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPEchoTagXHPASTLinterRule.php',
|
||||
'ArcanistPHPEchoTagXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPHPEchoTagXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPHPOpenTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPOpenTagXHPASTLinterRule.php',
|
||||
'ArcanistPHPOpenTagXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPHPOpenTagXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPHPShortTagXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPHPShortTagXHPASTLinterRule.php',
|
||||
'ArcanistPHPShortTagXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPHPShortTagXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistParentMemberReferenceXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistParentMemberReferenceXHPASTLinterRule.php',
|
||||
'ArcanistParentMemberReferenceXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistParentMemberReferenceXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistParenthesesSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistParenthesesSpacingXHPASTLinterRule.php',
|
||||
'ArcanistParenthesesSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistParenthesesSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistParseStrUseXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistParseStrUseXHPASTLinterRule.php',
|
||||
'ArcanistParseStrUseXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistParseStrUseXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPasteWorkflow' => 'workflow/ArcanistPasteWorkflow.php',
|
||||
'ArcanistPatchWorkflow' => 'workflow/ArcanistPatchWorkflow.php',
|
||||
'ArcanistPhpLinter' => 'lint/linter/ArcanistPhpLinter.php',
|
||||
|
@ -201,22 +265,28 @@ phutil_register_library_map(array(
|
|||
'ArcanistPhpunitTestResultParser' => 'unit/parser/ArcanistPhpunitTestResultParser.php',
|
||||
'ArcanistPhrequentWorkflow' => 'workflow/ArcanistPhrequentWorkflow.php',
|
||||
'ArcanistPhutilLibraryLinter' => 'lint/linter/ArcanistPhutilLibraryLinter.php',
|
||||
'ArcanistPhutilXHPASTLinter' => 'lint/linter/ArcanistPhutilXHPASTLinter.php',
|
||||
'ArcanistPhutilXHPASTLinterTestCase' => 'lint/linter/__tests__/ArcanistPhutilXHPASTLinterTestCase.php',
|
||||
'ArcanistPhutilXHPASTLinterStandard' => 'lint/linter/standards/phutil/ArcanistPhutilXHPASTLinterStandard.php',
|
||||
'ArcanistPlusOperatorOnStringsXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPlusOperatorOnStringsXHPASTLinterRule.php',
|
||||
'ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPregQuoteMisuseXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistPregQuoteMisuseXHPASTLinterRule.php',
|
||||
'ArcanistPregQuoteMisuseXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistPregQuoteMisuseXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistPuppetLintLinter' => 'lint/linter/ArcanistPuppetLintLinter.php',
|
||||
'ArcanistPuppetLintLinterTestCase' => 'lint/linter/__tests__/ArcanistPuppetLintLinterTestCase.php',
|
||||
'ArcanistPyFlakesLinter' => 'lint/linter/ArcanistPyFlakesLinter.php',
|
||||
'ArcanistPyFlakesLinterTestCase' => 'lint/linter/__tests__/ArcanistPyFlakesLinterTestCase.php',
|
||||
'ArcanistPyLintLinter' => 'lint/linter/ArcanistPyLintLinter.php',
|
||||
'ArcanistPyLintLinterTestCase' => 'lint/linter/__tests__/ArcanistPyLintLinterTestCase.php',
|
||||
'ArcanistRaggedClassTreeEdgeXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistRaggedClassTreeEdgeXHPASTLinterRule.php',
|
||||
'ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistRepositoryAPI' => 'repository/api/ArcanistRepositoryAPI.php',
|
||||
'ArcanistRepositoryAPIMiscTestCase' => 'repository/api/__tests__/ArcanistRepositoryAPIMiscTestCase.php',
|
||||
'ArcanistRepositoryAPIStateTestCase' => 'repository/api/__tests__/ArcanistRepositoryAPIStateTestCase.php',
|
||||
'ArcanistReusedAsIteratorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistReusedAsIteratorXHPASTLinterRule.php',
|
||||
'ArcanistReusedAsIteratorXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistReusedAsIteratorXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistReusedIteratorReferenceXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistReusedIteratorReferenceXHPASTLinterRule.php',
|
||||
'ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistReusedIteratorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistReusedIteratorXHPASTLinterRule.php',
|
||||
'ArcanistReusedIteratorXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistReusedIteratorXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistRevertWorkflow' => 'workflow/ArcanistRevertWorkflow.php',
|
||||
'ArcanistRuboCopLinter' => 'lint/linter/ArcanistRuboCopLinter.php',
|
||||
'ArcanistRuboCopLinterTestCase' => 'lint/linter/__tests__/ArcanistRuboCopLinterTestCase.php',
|
||||
|
@ -224,35 +294,49 @@ phutil_register_library_map(array(
|
|||
'ArcanistRubyLinterTestCase' => 'lint/linter/__tests__/ArcanistRubyLinterTestCase.php',
|
||||
'ArcanistScriptAndRegexLinter' => 'lint/linter/ArcanistScriptAndRegexLinter.php',
|
||||
'ArcanistSelfMemberReferenceXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistSelfMemberReferenceXHPASTLinterRule.php',
|
||||
'ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistSemicolonSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistSemicolonSpacingXHPASTLinterRule.php',
|
||||
'ArcanistSemicolonSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistSemicolonSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistSetConfigWorkflow' => 'workflow/ArcanistSetConfigWorkflow.php',
|
||||
'ArcanistSettings' => 'configuration/ArcanistSettings.php',
|
||||
'ArcanistShellCompleteWorkflow' => 'workflow/ArcanistShellCompleteWorkflow.php',
|
||||
'ArcanistSingleLintEngine' => 'lint/engine/ArcanistSingleLintEngine.php',
|
||||
'ArcanistSlownessXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistSlownessXHPASTLinterRule.php',
|
||||
'ArcanistSlownessXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistSlownessXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistSpellingLinter' => 'lint/linter/ArcanistSpellingLinter.php',
|
||||
'ArcanistSpellingLinterTestCase' => 'lint/linter/__tests__/ArcanistSpellingLinterTestCase.php',
|
||||
'ArcanistStartWorkflow' => 'workflow/ArcanistStartWorkflow.php',
|
||||
'ArcanistStaticThisXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistStaticThisXHPASTLinterRule.php',
|
||||
'ArcanistStaticThisXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistStaticThisXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistStopWorkflow' => 'workflow/ArcanistStopWorkflow.php',
|
||||
'ArcanistSubversionAPI' => 'repository/api/ArcanistSubversionAPI.php',
|
||||
'ArcanistSummaryLintRenderer' => 'lint/renderer/ArcanistSummaryLintRenderer.php',
|
||||
'ArcanistSyntaxErrorXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistSyntaxErrorXHPASTLinterRule.php',
|
||||
'ArcanistTasksWorkflow' => 'workflow/ArcanistTasksWorkflow.php',
|
||||
'ArcanistTautologicalExpressionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistTautologicalExpressionXHPASTLinterRule.php',
|
||||
'ArcanistTautologicalExpressionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistTautologicalExpressionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistTestResultParser' => 'unit/parser/ArcanistTestResultParser.php',
|
||||
'ArcanistTestXHPASTLintSwitchHook' => 'lint/linter/__tests__/ArcanistTestXHPASTLintSwitchHook.php',
|
||||
'ArcanistTextLinter' => 'lint/linter/ArcanistTextLinter.php',
|
||||
'ArcanistTextLinterTestCase' => 'lint/linter/__tests__/ArcanistTextLinterTestCase.php',
|
||||
'ArcanistThisReassignmentXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistThisReassignmentXHPASTLinterRule.php',
|
||||
'ArcanistThisReassignmentXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistThisReassignmentXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistTimeWorkflow' => 'workflow/ArcanistTimeWorkflow.php',
|
||||
'ArcanistToStringExceptionXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistToStringExceptionXHPASTLinterRule.php',
|
||||
'ArcanistToStringExceptionXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistToStringExceptionXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistTodoCommentXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistTodoCommentXHPASTLinterRule.php',
|
||||
'ArcanistTodoCommentXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistTodoCommentXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistTodoWorkflow' => 'workflow/ArcanistTodoWorkflow.php',
|
||||
'ArcanistUSEnglishTranslation' => 'internationalization/ArcanistUSEnglishTranslation.php',
|
||||
'ArcanistUnableToParseXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnableToParseXHPASTLinterRule.php',
|
||||
'ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRule.php',
|
||||
'ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRule.php',
|
||||
'ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUndeclaredVariableXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUndeclaredVariableXHPASTLinterRule.php',
|
||||
'ArcanistUndeclaredVariableXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUndeclaredVariableXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUnexpectedReturnValueXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnexpectedReturnValueXHPASTLinterRule.php',
|
||||
'ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUnitConsoleRenderer' => 'unit/renderer/ArcanistUnitConsoleRenderer.php',
|
||||
'ArcanistUnitRenderer' => 'unit/renderer/ArcanistUnitRenderer.php',
|
||||
'ArcanistUnitTestEngine' => 'unit/engine/ArcanistUnitTestEngine.php',
|
||||
|
@ -261,13 +345,18 @@ phutil_register_library_map(array(
|
|||
'ArcanistUnitTestableLintEngine' => 'lint/engine/ArcanistUnitTestableLintEngine.php',
|
||||
'ArcanistUnitWorkflow' => 'workflow/ArcanistUnitWorkflow.php',
|
||||
'ArcanistUnnecessaryFinalModifierXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnnecessaryFinalModifierXHPASTLinterRule.php',
|
||||
'ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUnnecessarySemicolonXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnnecessarySemicolonXHPASTLinterRule.php',
|
||||
'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUnsafeDynamicStringXHPASTLinterRule.php',
|
||||
'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUpgradeWorkflow' => 'workflow/ArcanistUpgradeWorkflow.php',
|
||||
'ArcanistUploadWorkflow' => 'workflow/ArcanistUploadWorkflow.php',
|
||||
'ArcanistUsageException' => 'exception/ArcanistUsageException.php',
|
||||
'ArcanistUselessOverridingMethodXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistUselessOverridingMethodXHPASTLinterRule.php',
|
||||
'ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistUserAbortException' => 'exception/usage/ArcanistUserAbortException.php',
|
||||
'ArcanistVariableVariableXHPASTLinterRule' => 'lint/linter/xhpast/rules/ArcanistVariableVariableXHPASTLinterRule.php',
|
||||
'ArcanistVariableVariableXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistVariableVariableXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistVersionWorkflow' => 'workflow/ArcanistVersionWorkflow.php',
|
||||
'ArcanistWhichWorkflow' => 'workflow/ArcanistWhichWorkflow.php',
|
||||
'ArcanistWorkflow' => 'workflow/ArcanistWorkflow.php',
|
||||
|
@ -277,7 +366,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistXHPASTLintSwitchHook' => 'lint/linter/xhpast/ArcanistXHPASTLintSwitchHook.php',
|
||||
'ArcanistXHPASTLinter' => 'lint/linter/ArcanistXHPASTLinter.php',
|
||||
'ArcanistXHPASTLinterRule' => 'lint/linter/xhpast/ArcanistXHPASTLinterRule.php',
|
||||
'ArcanistXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/__tests__/ArcanistXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistXHPASTLinterRuleTestCase' => 'lint/linter/xhpast/rules/__tests__/ArcanistXHPASTLinterRuleTestCase.php',
|
||||
'ArcanistXHPASTLinterTestCase' => 'lint/linter/__tests__/ArcanistXHPASTLinterTestCase.php',
|
||||
'ArcanistXMLLinter' => 'lint/linter/ArcanistXMLLinter.php',
|
||||
'ArcanistXMLLinterTestCase' => 'lint/linter/__tests__/ArcanistXMLLinterTestCase.php',
|
||||
|
@ -299,20 +388,29 @@ phutil_register_library_map(array(
|
|||
'function' => array(),
|
||||
'xmap' => array(
|
||||
'ArcanistAliasFunctionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistAliasFunctionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistAliasWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistAmendWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistAnoidWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistArrayCombineXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistArrayCombineXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistArrayIndexSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistArraySeparatorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistArraySeparatorXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistArrayValueXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistArrayValueXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistBackoutWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistBaseCommitParser' => 'Phobject',
|
||||
'ArcanistBaseCommitParserTestCase' => 'PhutilTestCase',
|
||||
'ArcanistBaseXHPASTLinter' => 'ArcanistFutureLinter',
|
||||
'ArcanistBinaryExpressionSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistBlacklistedFunctionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistBookmarkWorkflow' => 'ArcanistFeatureWorkflow',
|
||||
'ArcanistBraceFormattingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistBraceFormattingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistBranchWorkflow' => 'ArcanistFeatureWorkflow',
|
||||
'ArcanistBritishTestCase' => 'PhutilTestCase',
|
||||
'ArcanistBrowseWorkflow' => 'ArcanistWorkflow',
|
||||
|
@ -323,14 +421,20 @@ phutil_register_library_map(array(
|
|||
'ArcanistCSharpLinter' => 'ArcanistLinter',
|
||||
'ArcanistCallConduitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCallParenthesesXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistCallParenthesesXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistCallTimePassByReferenceXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistCapabilityNotSupportedException' => 'Exception',
|
||||
'ArcanistCastSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistCastSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistCheckstyleXMLLintRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistChmodLinter' => 'ArcanistLinter',
|
||||
'ArcanistChmodLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistClassExtendsObjectXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistClassExtendsObjectXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistClassFilenameMismatchXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistClassNameLiteralXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistClassNameLiteralXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistCloseRevisionWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCloseWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistClosureLinter' => 'ArcanistExternalLinter',
|
||||
|
@ -341,25 +445,33 @@ phutil_register_library_map(array(
|
|||
'ArcanistCommentRemoverTestCase' => 'PhutilTestCase',
|
||||
'ArcanistCommentSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistCommentStyleXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistCommentStyleXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistCommitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCompilerLintRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistComposerLinter' => 'ArcanistLinter',
|
||||
'ArcanistComprehensiveLintEngine' => 'ArcanistLintEngine',
|
||||
'ArcanistConcatenationOperatorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistConcatenationOperatorXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistConfiguration' => 'Phobject',
|
||||
'ArcanistConfigurationDrivenLintEngine' => 'ArcanistLintEngine',
|
||||
'ArcanistConfigurationDrivenUnitTestEngine' => 'ArcanistUnitTestEngine',
|
||||
'ArcanistConfigurationManager' => 'Phobject',
|
||||
'ArcanistConsoleLintRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistConstructorParenthesesXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistConstructorParenthesesXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistControlStatementSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistControlStatementSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistCoverWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistCppcheckLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistCppcheckLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistCpplintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistCpplintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistDeclarationParenthesesXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistDefaultParametersXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDefaultParametersXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistDeprecationXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDeprecationXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistDiffChange' => 'Phobject',
|
||||
'ArcanistDiffChangeType' => 'Phobject',
|
||||
'ArcanistDiffHunk' => 'Phobject',
|
||||
|
@ -374,19 +486,27 @@ phutil_register_library_map(array(
|
|||
'ArcanistDifferentialRevisionHash' => 'Phobject',
|
||||
'ArcanistDifferentialRevisionStatus' => 'Phobject',
|
||||
'ArcanistDoubleQuoteXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDoubleQuoteXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistDownloadWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistDuplicateKeysInArrayXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistDuplicateSwitchCaseXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistDynamicDefineXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistDynamicDefineXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistElseIfUsageXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistElseIfUsageXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistEmptyFileXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistEmptyStatementXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistEmptyStatementXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistEventType' => 'PhutilEventType',
|
||||
'ArcanistExitExpressionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistExitExpressionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistExportWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistExternalLinter' => 'ArcanistFutureLinter',
|
||||
'ArcanistExternalLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistExtractUseXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistExtractUseXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistFeatureWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistFileDataRef' => 'Phobject',
|
||||
'ArcanistFileUploader' => 'Phobject',
|
||||
|
@ -396,6 +516,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistFlake8Linter' => 'ArcanistExternalLinter',
|
||||
'ArcanistFlake8LinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistFormattedStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistFormattedStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistFutureLinter' => 'ArcanistLinter',
|
||||
'ArcanistGeneratedLinter' => 'ArcanistLinter',
|
||||
'ArcanistGeneratedLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
|
@ -404,6 +525,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistGitLandEngine' => 'ArcanistLandEngine',
|
||||
'ArcanistGitUpstreamPath' => 'Phobject',
|
||||
'ArcanistGlobalVariableXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistGlobalVariableXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistGoLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistGoLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistGoTestResultParser' => 'ArcanistTestResultParser',
|
||||
|
@ -416,14 +538,22 @@ phutil_register_library_map(array(
|
|||
'ArcanistHgProxyServer' => 'Phobject',
|
||||
'ArcanistHgServerChannel' => 'PhutilProtocolChannel',
|
||||
'ArcanistImplicitConstructorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistImplicitConstructorXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistImplicitFallthroughXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistImplicitFallthroughXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistImplicitVisibilityXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistImplicitVisibilityXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistInlineHTMLXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistInlineHTMLXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistInnerFunctionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistInnerFunctionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistInstallCertificateWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistInstanceOfOperatorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistInstanceofOperatorXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistInvalidDefaultParameterXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistInvalidModifiersXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistInvalidModifiersXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistJSHintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistJSHintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistJSONLintLinter' => 'ArcanistExternalLinter',
|
||||
|
@ -434,10 +564,13 @@ phutil_register_library_map(array(
|
|||
'ArcanistJscsLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistJscsLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistKeywordCasingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistKeywordCasingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistLambdaFuncFunctionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistLandEngine' => 'Phobject',
|
||||
'ArcanistLandWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistLanguageConstructParenthesesXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistLesscLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistLesscLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistLiberateWorkflow' => 'ArcanistWorkflow',
|
||||
|
@ -450,12 +583,17 @@ phutil_register_library_map(array(
|
|||
'ArcanistLintSeverity' => 'Phobject',
|
||||
'ArcanistLintWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistLinter' => 'Phobject',
|
||||
'ArcanistLinterStandard' => 'Phobject',
|
||||
'ArcanistLinterStandardTestCase' => 'PhutilTestCase',
|
||||
'ArcanistLinterTestCase' => 'PhutilTestCase',
|
||||
'ArcanistLintersWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistListAssignmentXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistListAssignmentXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistListWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistLogicalOperatorsXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistLogicalOperatorsXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistLowercaseFunctionsXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistMercurialAPI' => 'ArcanistRepositoryAPI',
|
||||
'ArcanistMercurialParser' => 'Phobject',
|
||||
'ArcanistMercurialParserTestCase' => 'PhutilTestCase',
|
||||
|
@ -463,24 +601,39 @@ phutil_register_library_map(array(
|
|||
'ArcanistMergeConflictLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistMissingLinterException' => 'Exception',
|
||||
'ArcanistModifierOrderingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistModifierOrderingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistNamingConventionsXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistNamingConventionsXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistNestedNamespacesXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistNestedNamespacesXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistNewlineAfterOpenTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistNoEffectException' => 'ArcanistUsageException',
|
||||
'ArcanistNoEngineException' => 'ArcanistUsageException',
|
||||
'ArcanistNoLintLinter' => 'ArcanistLinter',
|
||||
'ArcanistNoLintLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistNoParentScopeXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistNoParentScopeXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistNoneLintRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistObjectOperatorSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPEP8Linter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPEP8LinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistPHPCloseTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPCompatibilityXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPHPEchoTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPEchoTagXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPHPOpenTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPOpenTagXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPHPShortTagXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPHPShortTagXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistParentMemberReferenceXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistParentMemberReferenceXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistParenthesesSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistParenthesesSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistParseStrUseXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistParseStrUseXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPasteWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPatchWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPhpLinter' => 'ArcanistExternalLinter',
|
||||
|
@ -490,22 +643,28 @@ phutil_register_library_map(array(
|
|||
'ArcanistPhpunitTestResultParser' => 'ArcanistTestResultParser',
|
||||
'ArcanistPhrequentWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistPhutilLibraryLinter' => 'ArcanistLinter',
|
||||
'ArcanistPhutilXHPASTLinter' => 'ArcanistBaseXHPASTLinter',
|
||||
'ArcanistPhutilXHPASTLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistPhutilXHPASTLinterStandard' => 'ArcanistLinterStandard',
|
||||
'ArcanistPlusOperatorOnStringsXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPregQuoteMisuseXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistPregQuoteMisuseXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistPuppetLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPuppetLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistPyFlakesLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPyFlakesLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistPyLintLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistPyLintLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistRaggedClassTreeEdgeXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistRepositoryAPI' => 'Phobject',
|
||||
'ArcanistRepositoryAPIMiscTestCase' => 'PhutilTestCase',
|
||||
'ArcanistRepositoryAPIStateTestCase' => 'PhutilTestCase',
|
||||
'ArcanistReusedAsIteratorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistReusedAsIteratorXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistReusedIteratorReferenceXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistReusedIteratorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistReusedIteratorXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistRevertWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistRuboCopLinter' => 'ArcanistExternalLinter',
|
||||
'ArcanistRuboCopLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
|
@ -513,35 +672,49 @@ phutil_register_library_map(array(
|
|||
'ArcanistRubyLinterTestCase' => 'ArcanistExternalLinterTestCase',
|
||||
'ArcanistScriptAndRegexLinter' => 'ArcanistLinter',
|
||||
'ArcanistSelfMemberReferenceXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistSelfMemberReferenceXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistSemicolonSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistSemicolonSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistSetConfigWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistSettings' => 'Phobject',
|
||||
'ArcanistShellCompleteWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistSingleLintEngine' => 'ArcanistLintEngine',
|
||||
'ArcanistSlownessXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistSlownessXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistSpellingLinter' => 'ArcanistLinter',
|
||||
'ArcanistSpellingLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistStartWorkflow' => 'ArcanistPhrequentWorkflow',
|
||||
'ArcanistStaticThisXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistStaticThisXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistStopWorkflow' => 'ArcanistPhrequentWorkflow',
|
||||
'ArcanistSubversionAPI' => 'ArcanistRepositoryAPI',
|
||||
'ArcanistSummaryLintRenderer' => 'ArcanistLintRenderer',
|
||||
'ArcanistSyntaxErrorXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistTasksWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistTautologicalExpressionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistTautologicalExpressionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistTestResultParser' => 'Phobject',
|
||||
'ArcanistTestXHPASTLintSwitchHook' => 'ArcanistXHPASTLintSwitchHook',
|
||||
'ArcanistTextLinter' => 'ArcanistLinter',
|
||||
'ArcanistTextLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistThisReassignmentXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistThisReassignmentXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistTimeWorkflow' => 'ArcanistPhrequentWorkflow',
|
||||
'ArcanistToStringExceptionXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistToStringExceptionXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistTodoCommentXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistTodoCommentXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistTodoWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUSEnglishTranslation' => 'PhutilTranslation',
|
||||
'ArcanistUnableToParseXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnaryPostfixExpressionSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnaryPrefixExpressionSpacingXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUndeclaredVariableXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUndeclaredVariableXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUnexpectedReturnValueXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnexpectedReturnValueXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUnitConsoleRenderer' => 'ArcanistUnitRenderer',
|
||||
'ArcanistUnitRenderer' => 'Phobject',
|
||||
'ArcanistUnitTestEngine' => 'Phobject',
|
||||
|
@ -550,13 +723,18 @@ phutil_register_library_map(array(
|
|||
'ArcanistUnitTestableLintEngine' => 'ArcanistLintEngine',
|
||||
'ArcanistUnitWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUnnecessaryFinalModifierXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnnecessaryFinalModifierXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUnnecessarySemicolonXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnsafeDynamicStringXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUnsafeDynamicStringXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUpgradeWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUploadWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistUsageException' => 'Exception',
|
||||
'ArcanistUselessOverridingMethodXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistUselessOverridingMethodXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistUserAbortException' => 'ArcanistUsageException',
|
||||
'ArcanistVariableVariableXHPASTLinterRule' => 'ArcanistXHPASTLinterRule',
|
||||
'ArcanistVariableVariableXHPASTLinterRuleTestCase' => 'ArcanistXHPASTLinterRuleTestCase',
|
||||
'ArcanistVersionWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistWhichWorkflow' => 'ArcanistWorkflow',
|
||||
'ArcanistWorkflow' => 'Phobject',
|
||||
|
@ -566,7 +744,7 @@ phutil_register_library_map(array(
|
|||
'ArcanistXHPASTLintSwitchHook' => 'Phobject',
|
||||
'ArcanistXHPASTLinter' => 'ArcanistBaseXHPASTLinter',
|
||||
'ArcanistXHPASTLinterRule' => 'Phobject',
|
||||
'ArcanistXHPASTLinterRuleTestCase' => 'PhutilTestCase',
|
||||
'ArcanistXHPASTLinterRuleTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistXHPASTLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
'ArcanistXMLLinter' => 'ArcanistLinter',
|
||||
'ArcanistXMLLinterTestCase' => 'ArcanistLinterTestCase',
|
||||
|
|
|
@ -262,6 +262,18 @@ final class ArcanistGitLandEngine
|
|||
$path->removeUpstream($local_branch);
|
||||
|
||||
if (!$path->getLength()) {
|
||||
// The local branch tracked upstream directly; however, it
|
||||
// may not be the only one to do so. If there's a local
|
||||
// branch of the same name that tracks the remote, try
|
||||
// switching to that.
|
||||
$local_branch = $this->getTargetOnto();
|
||||
list($err) = $api->execManualLocal(
|
||||
'rev-parse --verify %s',
|
||||
$local_branch);
|
||||
if (!$err) {
|
||||
$path = $api->getPathToUpstream($local_branch);
|
||||
}
|
||||
if (!$path->isConnectedToRemote()) {
|
||||
$this->writeInfo(
|
||||
pht('UPDATE'),
|
||||
pht(
|
||||
|
@ -270,6 +282,7 @@ final class ArcanistGitLandEngine
|
|||
$local_branch));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$local_branch = head($path->getLocalBranches());
|
||||
}
|
||||
|
|
|
@ -67,17 +67,28 @@ final class ArcanistCSSLintLinter extends ArcanistExternalLinter {
|
|||
|
||||
foreach ($files as $file) {
|
||||
foreach ($file->childNodes as $child) {
|
||||
$line = $child->getAttribute('line');
|
||||
$char = $child->getAttribute('char');
|
||||
$original_text = $child->getAttribute('evidence');
|
||||
|
||||
if ($line === '') {
|
||||
$line = null;
|
||||
}
|
||||
|
||||
if ($char === '') {
|
||||
$char = null;
|
||||
} else {
|
||||
$original_text = substr($original_text, $char - 1);
|
||||
}
|
||||
|
||||
$message = id(new ArcanistLintMessage())
|
||||
->setPath($path)
|
||||
->setLine($child->getAttribute('line'))
|
||||
->setChar($child->getAttribute('char'))
|
||||
->setLine($line)
|
||||
->setChar($char)
|
||||
->setCode($this->getLinterName())
|
||||
->setName($this->getLinterName())
|
||||
->setDescription($child->getAttribute('reason'))
|
||||
->setOriginalText(
|
||||
substr(
|
||||
$child->getAttribute('evidence'),
|
||||
$child->getAttribute('char') - 1));
|
||||
->setOriginalText($original_text);
|
||||
|
||||
switch ($child->getAttribute('severity')) {
|
||||
case 'error':
|
||||
|
|
|
@ -28,7 +28,7 @@ abstract class ArcanistLinter extends Phobject {
|
|||
private $customSeverityRules = array();
|
||||
|
||||
|
||||
/* -( Human Readable Information )---------------------------------------- */
|
||||
/* -( Human Readable Information )----------------------------------------- */
|
||||
|
||||
|
||||
/**
|
||||
|
@ -196,7 +196,6 @@ abstract class ArcanistLinter extends Phobject {
|
|||
return;
|
||||
}
|
||||
|
||||
|
||||
public function getLinterPriority() {
|
||||
return 1.0;
|
||||
}
|
||||
|
@ -209,6 +208,11 @@ abstract class ArcanistLinter extends Phobject {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function addCustomSeverityMap(array $map) {
|
||||
$this->customSeverityMap = $this->customSeverityMap + $map;
|
||||
return $this;
|
||||
}
|
||||
|
||||
final public function setCustomSeverityRules(array $rules) {
|
||||
$this->customSeverityRules = $rules;
|
||||
return $this;
|
||||
|
@ -386,7 +390,7 @@ abstract class ArcanistLinter extends Phobject {
|
|||
$line,
|
||||
$char,
|
||||
$code,
|
||||
$desc,
|
||||
$description,
|
||||
$original = null,
|
||||
$replacement = null) {
|
||||
|
||||
|
@ -397,7 +401,7 @@ abstract class ArcanistLinter extends Phobject {
|
|||
->setCode($this->getLintMessageFullCode($code))
|
||||
->setSeverity($this->getLintMessageSeverity($code))
|
||||
->setName($this->getLintMessageName($code))
|
||||
->setDescription($desc)
|
||||
->setDescription($description)
|
||||
->setOriginalText($original)
|
||||
->setReplacementText($replacement);
|
||||
|
||||
|
@ -411,7 +415,7 @@ abstract class ArcanistLinter extends Phobject {
|
|||
final public function raiseLintAtOffset(
|
||||
$offset,
|
||||
$code,
|
||||
$desc,
|
||||
$description,
|
||||
$original = null,
|
||||
$replacement = null) {
|
||||
|
||||
|
@ -428,7 +432,7 @@ abstract class ArcanistLinter extends Phobject {
|
|||
$line + 1,
|
||||
$char + 1,
|
||||
$code,
|
||||
$desc,
|
||||
$description,
|
||||
$original,
|
||||
$replacement);
|
||||
}
|
||||
|
@ -490,6 +494,10 @@ abstract class ArcanistLinter extends Phobject {
|
|||
'Provide a map of regular expressions to severity levels. All '.
|
||||
'matching codes have their severity adjusted.'),
|
||||
),
|
||||
'standard' => array(
|
||||
'type' => 'optional string | list<string>',
|
||||
'help' => pht('The coding standard(s) to apply.'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -548,6 +556,22 @@ abstract class ArcanistLinter extends Phobject {
|
|||
}
|
||||
$this->setCustomSeverityRules($value);
|
||||
return;
|
||||
|
||||
case 'standard':
|
||||
$standards = (array)$value;
|
||||
|
||||
foreach ($standards as $standard) {
|
||||
$standard = ArcanistLinterStandard::getStandard($value, $this);
|
||||
|
||||
foreach ($standard->getLinterConfiguration() as $k => $v) {
|
||||
$this->setLinterConfigurationValue($k, $v);
|
||||
}
|
||||
$this->addCustomSeverityMap($standard->getLinterSeverityMap());
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
|
||||
}
|
||||
|
||||
throw new Exception(pht('Incomplete implementation: %s!', $key));
|
||||
|
|
|
@ -1,336 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPhutilXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
||||
|
||||
const LINT_ARRAY_COMBINE = 2;
|
||||
const LINT_DEPRECATED_FUNCTION = 3;
|
||||
const LINT_UNSAFE_DYNAMIC_STRING = 4;
|
||||
const LINT_RAGGED_CLASSTREE_EDGE = 5;
|
||||
const LINT_EXTENDS_PHOBJECT = 6;
|
||||
|
||||
private $deprecatedFunctions = array();
|
||||
private $dynamicStringFunctions = array();
|
||||
private $dynamicStringClasses = array();
|
||||
|
||||
public function getInfoName() {
|
||||
return 'XHPAST/libphutil Lint';
|
||||
}
|
||||
|
||||
public function getInfoDescription() {
|
||||
return pht(
|
||||
'Use XHPAST to run libphutil-specific rules on a PHP library. This '.
|
||||
'linter is intended for use in Phabricator libraries and extensions.');
|
||||
}
|
||||
|
||||
public function getLintNameMap() {
|
||||
return array(
|
||||
self::LINT_ARRAY_COMBINE =>
|
||||
pht('%s Unreliable', 'array_combine()'),
|
||||
self::LINT_DEPRECATED_FUNCTION =>
|
||||
pht('Use of Deprecated Function'),
|
||||
self::LINT_UNSAFE_DYNAMIC_STRING =>
|
||||
pht('Unsafe Usage of Dynamic String'),
|
||||
self::LINT_RAGGED_CLASSTREE_EDGE =>
|
||||
pht('Class Not %s Or %s', 'abstract', 'final'),
|
||||
self::LINT_EXTENDS_PHOBJECT =>
|
||||
pht('Class Not Extending %s', 'Phobject'),
|
||||
);
|
||||
}
|
||||
|
||||
public function getLinterName() {
|
||||
return 'PHLXHP';
|
||||
}
|
||||
|
||||
public function getLinterConfigurationName() {
|
||||
return 'phutil-xhpast';
|
||||
}
|
||||
|
||||
public function getLintSeverityMap() {
|
||||
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
|
||||
$warning = ArcanistLintSeverity::SEVERITY_WARNING;
|
||||
|
||||
return array(
|
||||
self::LINT_ARRAY_COMBINE => $warning,
|
||||
self::LINT_DEPRECATED_FUNCTION => $warning,
|
||||
self::LINT_UNSAFE_DYNAMIC_STRING => $warning,
|
||||
self::LINT_RAGGED_CLASSTREE_EDGE => $warning,
|
||||
self::LINT_EXTENDS_PHOBJECT => $advice,
|
||||
);
|
||||
}
|
||||
|
||||
public function getLinterConfigurationOptions() {
|
||||
$options = array(
|
||||
'phutil-xhpast.deprecated.functions' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
'help' => pht(
|
||||
'Functions which should should be considered deprecated.'),
|
||||
),
|
||||
'phutil-xhpast.dynamic-string.functions' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
'help' => pht(
|
||||
'Functions which should should not be used because they represent '.
|
||||
'the unsafe usage of dynamic strings.'),
|
||||
),
|
||||
'phutil-xhpast.dynamic-string.classes' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
'help' => pht(
|
||||
'Classes which should should not be used because they represent the '.
|
||||
'unsafe usage of dynamic strings.'),
|
||||
),
|
||||
);
|
||||
|
||||
return $options + parent::getLinterConfigurationOptions();
|
||||
}
|
||||
|
||||
public function setLinterConfigurationValue($key, $value) {
|
||||
switch ($key) {
|
||||
case 'phutil-xhpast.deprecated.functions':
|
||||
$this->setDeprecatedFunctions($value);
|
||||
return;
|
||||
case 'phutil-xhpast.dynamic-string.functions':
|
||||
$this->setDynamicStringFunctions($value);
|
||||
return;
|
||||
case 'phutil-xhpast.dynamic-string.classes':
|
||||
$this->setDynamicStringClasses($value);
|
||||
return;
|
||||
default:
|
||||
parent::setLinterConfigurationValue($key, $value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public function getVersion() {
|
||||
// The version number should be incremented whenever a new rule is added.
|
||||
return '3';
|
||||
}
|
||||
|
||||
protected function resolveFuture($path, Future $future) {
|
||||
$tree = $this->getXHPASTLinter()->getXHPASTTreeForPath($path);
|
||||
if (!$tree) {
|
||||
return;
|
||||
}
|
||||
|
||||
$root = $tree->getRootNode();
|
||||
|
||||
$method_codes = array(
|
||||
'lintArrayCombine' => self::LINT_ARRAY_COMBINE,
|
||||
'lintUnsafeDynamicString' => self::LINT_UNSAFE_DYNAMIC_STRING,
|
||||
'lintDeprecatedFunctions' => self::LINT_DEPRECATED_FUNCTION,
|
||||
'lintRaggedClasstreeEdges' => self::LINT_RAGGED_CLASSTREE_EDGE,
|
||||
'lintClassExtendsPhobject' => self::LINT_EXTENDS_PHOBJECT,
|
||||
);
|
||||
|
||||
foreach ($method_codes as $method => $codes) {
|
||||
foreach ((array)$codes as $code) {
|
||||
if ($this->isCodeEnabled($code)) {
|
||||
call_user_func(array($this, $method), $root);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* -( Setters )------------------------------------------------------------ */
|
||||
|
||||
public function setDeprecatedFunctions(array $map) {
|
||||
$this->deprecatedFunctions = $map;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDynamicStringClasses(array $map) {
|
||||
$this->dynamicStringClasses = $map;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setDynamicStringFunctions(array $map) {
|
||||
$this->dynamicStringFunctions = $map;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/* -( Linter Rules )------------------------------------------------------- */
|
||||
|
||||
private function lintUnsafeDynamicString(XHPASTNode $root) {
|
||||
$safe = $this->dynamicStringFunctions + array(
|
||||
'pht' => 0,
|
||||
|
||||
'hsprintf' => 0,
|
||||
'jsprintf' => 0,
|
||||
|
||||
'hgsprintf' => 0,
|
||||
|
||||
'csprintf' => 0,
|
||||
'vcsprintf' => 0,
|
||||
'execx' => 0,
|
||||
'exec_manual' => 0,
|
||||
'phutil_passthru' => 0,
|
||||
|
||||
'qsprintf' => 1,
|
||||
'vqsprintf' => 1,
|
||||
'queryfx' => 1,
|
||||
'queryfx_all' => 1,
|
||||
'queryfx_one' => 1,
|
||||
);
|
||||
|
||||
$calls = $root->selectDescendantsOfType('n_FUNCTION_CALL');
|
||||
$this->lintUnsafeDynamicStringCall($calls, $safe);
|
||||
|
||||
$safe = $this->dynamicStringClasses + array(
|
||||
'ExecFuture' => 0,
|
||||
);
|
||||
|
||||
$news = $root->selectDescendantsOfType('n_NEW');
|
||||
$this->lintUnsafeDynamicStringCall($news, $safe);
|
||||
}
|
||||
|
||||
private function lintUnsafeDynamicStringCall(
|
||||
AASTNodeList $calls,
|
||||
array $safe) {
|
||||
|
||||
$safe = array_combine(
|
||||
array_map('strtolower', array_keys($safe)),
|
||||
$safe);
|
||||
|
||||
foreach ($calls as $call) {
|
||||
$name = $call->getChildByIndex(0)->getConcreteString();
|
||||
$param = idx($safe, strtolower($name));
|
||||
|
||||
if ($param === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$parameters = $call->getChildByIndex(1);
|
||||
if (count($parameters->getChildren()) <= $param) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$identifier = $parameters->getChildByIndex($param);
|
||||
if (!$identifier->isConstantString()) {
|
||||
$this->raiseLintAtNode(
|
||||
$call,
|
||||
self::LINT_UNSAFE_DYNAMIC_STRING,
|
||||
pht(
|
||||
"Parameter %d of %s should be a scalar string, ".
|
||||
"otherwise it's not safe.",
|
||||
$param + 1,
|
||||
$name.'()'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function lintArrayCombine(XHPASTNode $root) {
|
||||
$function_calls = $this->getFunctionCalls($root, array('array_combine'));
|
||||
|
||||
foreach ($function_calls as $call) {
|
||||
$name = $call->getChildByIndex(0)->getConcreteString();
|
||||
$parameter_list = $call->getChildOfType(1, 'n_CALL_PARAMETER_LIST');
|
||||
|
||||
if (count($parameter_list->getChildren()) !== 2) {
|
||||
// Wrong number of parameters, but raise that elsewhere if we want.
|
||||
continue;
|
||||
}
|
||||
|
||||
$first = $parameter_list->getChildByIndex(0);
|
||||
$second = $parameter_list->getChildByIndex(1);
|
||||
|
||||
if ($first->getConcreteString() == $second->getConcreteString()) {
|
||||
$this->raiseLintAtNode(
|
||||
$call,
|
||||
self::LINT_ARRAY_COMBINE,
|
||||
pht(
|
||||
'Prior to PHP 5.4, `%s` fails when given empty arrays. '.
|
||||
'Prefer to write `%s` as `%s`.',
|
||||
'array_combine()',
|
||||
'array_combine(x, x)',
|
||||
'array_fuse(x)'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function lintDeprecatedFunctions(XHPASTNode $root) {
|
||||
$map = $this->deprecatedFunctions;
|
||||
$function_calls = $this->getFunctionCalls($root, array_keys($map));
|
||||
|
||||
foreach ($function_calls as $call) {
|
||||
$name = $call
|
||||
->getChildByIndex(0)
|
||||
->getConcreteString();
|
||||
|
||||
$name = strtolower($name);
|
||||
if (empty($map[$name])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->raiseLintAtNode(
|
||||
$call,
|
||||
self::LINT_DEPRECATED_FUNCTION,
|
||||
$map[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
private function lintRaggedClasstreeEdges(XHPASTNode $root) {
|
||||
$parser = new PhutilDocblockParser();
|
||||
|
||||
$classes = $root->selectDescendantsOfType('n_CLASS_DECLARATION');
|
||||
foreach ($classes as $class) {
|
||||
$is_final = false;
|
||||
$is_abstract = false;
|
||||
$is_concrete_extensible = false;
|
||||
|
||||
$attributes = $class->getChildOfType(0, 'n_CLASS_ATTRIBUTES');
|
||||
foreach ($attributes->getChildren() as $child) {
|
||||
if ($child->getConcreteString() == 'final') {
|
||||
$is_final = true;
|
||||
}
|
||||
if ($child->getConcreteString() == 'abstract') {
|
||||
$is_abstract = true;
|
||||
}
|
||||
}
|
||||
|
||||
$docblock = $class->getDocblockToken();
|
||||
if ($docblock) {
|
||||
list($text, $specials) = $parser->parse($docblock->getValue());
|
||||
$is_concrete_extensible = idx($specials, 'concrete-extensible');
|
||||
}
|
||||
|
||||
if (!$is_final && !$is_abstract && !$is_concrete_extensible) {
|
||||
$this->raiseLintAtNode(
|
||||
$class->getChildOfType(1, 'n_CLASS_NAME'),
|
||||
self::LINT_RAGGED_CLASSTREE_EDGE,
|
||||
pht(
|
||||
"This class is neither '%s' nor '%s', and does not have ".
|
||||
"a docblock marking it '%s'.",
|
||||
'final',
|
||||
'abstract',
|
||||
'@concrete-extensible'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function lintClassExtendsPhobject(XHPASTNode $root) {
|
||||
$classes = $root->selectDescendantsOfType('n_CLASS_DECLARATION');
|
||||
|
||||
foreach ($classes as $class) {
|
||||
// TODO: This doesn't quite work for namespaced classes (see T8534).
|
||||
$name = $class->getChildOfType(1, 'n_CLASS_NAME');
|
||||
$extends = $class->getChildByIndex(2);
|
||||
|
||||
if ($name->getConcreteString() == 'Phobject') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($extends->getTypeName() == 'n_EMPTY') {
|
||||
$this->raiseLintAtNode(
|
||||
$class,
|
||||
self::LINT_EXTENDS_PHOBJECT,
|
||||
pht(
|
||||
'Classes should extend from %s or from some other class. '.
|
||||
'All classes (except for %s itself) should have a base class.',
|
||||
'Phobject',
|
||||
'Phobject'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -35,7 +35,7 @@ final class ArcanistRubyLinter extends ArcanistExternalLinter {
|
|||
list($stdout) = execx('%C --version', $this->getExecutableCommand());
|
||||
|
||||
$matches = array();
|
||||
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)p\d+/';
|
||||
$regex = '/^ruby (?P<version>\d+\.\d+\.\d+)+/';
|
||||
if (preg_match($regex, $stdout, $matches)) {
|
||||
return $matches['version'];
|
||||
} else {
|
||||
|
|
|
@ -78,12 +78,14 @@ final class ArcanistSpellingLinter extends ArcanistLinter {
|
|||
$this->exactWordRules = array_merge(
|
||||
$this->exactWordRules,
|
||||
array($misspelling => $correction));
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function addPartialWordRule($misspelling, $correction) {
|
||||
$this->partialWordRules = array_merge(
|
||||
$this->partialWordRules,
|
||||
array($misspelling => $correction));
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLintSeverityMap() {
|
||||
|
|
|
@ -11,7 +11,7 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
|||
private $lintSeverityMap;
|
||||
|
||||
public function __construct() {
|
||||
$this->rules = ArcanistXHPASTLinterRule::loadAllRules();
|
||||
$this->setRules(ArcanistXHPASTLinterRule::loadAllRules());
|
||||
}
|
||||
|
||||
public function __clone() {
|
||||
|
@ -23,6 +23,21 @@ final class ArcanistXHPASTLinter extends ArcanistBaseXHPASTLinter {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the XHPAST linter rules which are enforced by this linter.
|
||||
*
|
||||
* This is primarily useful for unit tests in which it is desirable to test
|
||||
* linter rules in isolation. By default, all linter rules will be enabled.
|
||||
*
|
||||
* @param list<ArcanistXHPASTLinterRule>
|
||||
* @return this
|
||||
*/
|
||||
public function setRules(array $rules) {
|
||||
assert_instances_of($rules, 'ArcanistXHPASTLinterRule');
|
||||
$this->rules = $rules;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getInfoName() {
|
||||
return pht('XHPAST Lint');
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ abstract class ArcanistLinterTestCase extends PhutilTestCase {
|
|||
*
|
||||
* @return ArcanistLinter
|
||||
*/
|
||||
final protected function getLinter() {
|
||||
protected function getLinter() {
|
||||
$matches = null;
|
||||
if (!preg_match('/^(\w+Linter)TestCase$/', get_class($this), $matches) ||
|
||||
!is_subclass_of($matches[1], 'ArcanistLinter')) {
|
||||
|
@ -26,13 +26,8 @@ abstract class ArcanistLinterTestCase extends PhutilTestCase {
|
|||
* Executes all tests from the specified subdirectory. If a linter is not
|
||||
* explicitly specified, it will be inferred from the name of the test class.
|
||||
*/
|
||||
public function executeTestsInDirectory(
|
||||
$root,
|
||||
ArcanistLinter $linter = null) {
|
||||
|
||||
if (!$linter) {
|
||||
protected function executeTestsInDirectory($root) {
|
||||
$linter = $this->getLinter();
|
||||
}
|
||||
|
||||
$files = id(new FileFinder($root))
|
||||
->withType('f')
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPhutilXHPASTLinterTestCase extends ArcanistLinterTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$linter = new ArcanistPhutilXHPASTLinter();
|
||||
$linter->setDeprecatedFunctions(array(
|
||||
'deprecated_function' => pht('This function is most likely deprecated.'),
|
||||
));
|
||||
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/phlxhp/', $linter);
|
||||
}
|
||||
|
||||
}
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
final class ArcanistSpellingLinterTestCase extends ArcanistLinterTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$linter = new ArcanistSpellingLinter();
|
||||
$linter->addPartialWordRule('supermn', 'superman');
|
||||
$linter->addExactWordRule('batmn', 'batman');
|
||||
protected function getLinter() {
|
||||
return parent::getLinter()
|
||||
->addPartialWordRule('supermn', 'superman')
|
||||
->addExactWordRule('batmn', 'batman');
|
||||
}
|
||||
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/spelling/',
|
||||
$linter);
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/spelling/');
|
||||
}
|
||||
|
||||
public function testFixLetterCase() {
|
||||
|
|
|
@ -16,5 +16,4 @@ void foo(char* str) {
|
|||
}
|
||||
~~~~~~~~~~
|
||||
error:10:
|
||||
error:15:
|
||||
error:16:
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
h1 {
|
||||
font-weight: bold;
|
||||
}
|
||||
~~~~~~~~~~
|
||||
warning::
|
||||
warning:4:1
|
|
@ -1,6 +0,0 @@
|
|||
<?php
|
||||
|
||||
deprecated_function();
|
||||
modern_function();
|
||||
~~~~~~~~~~
|
||||
warning:3:1
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
csprintf('x');
|
||||
csprintf($x);
|
||||
|
||||
qsprintf();
|
||||
qsprintf('x');
|
||||
qsprintf('x', 'y');
|
||||
qsprintf('x', $y);
|
||||
|
||||
~~~~~~~~~~
|
||||
warning:4:1
|
||||
warning:9:1
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
function f() {
|
||||
return "foobar";
|
||||
return 'foobar';
|
||||
}
|
||||
~~~~~~~~~~
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class Foo {};
|
||||
$x = null;;
|
||||
~~~~~~~~~~
|
||||
error:3:13 XHP19
|
||||
advice:3:19
|
||||
advice:4:11
|
||||
~~~~~~~~~~
|
||||
<?php
|
||||
|
||||
final class Foo {}
|
||||
$x = null;
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
exit(-1);
|
||||
exit -1;
|
||||
strtoupper(33 * exit - 6);
|
||||
echo '';
|
||||
print '';
|
||||
|
||||
$x = new stdClass();
|
||||
$y = clone $x;
|
||||
~~~~~~~~~~
|
||||
error:4:1
|
||||
warning:4:5
|
||||
warning:4:6
|
||||
error:5:17
|
||||
warning:5:21
|
|
@ -3,3 +3,5 @@
|
|||
abstract class A {}
|
||||
final class F {}
|
||||
~~~~~~~~~~
|
||||
disabled:3:1
|
||||
disabled:4:1
|
||||
|
|
|
@ -42,47 +42,3 @@
|
|||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.'';
|
||||
~~~~~~~~~~
|
||||
~~~~~~~~~~
|
||||
<?php
|
||||
|
||||
// This test is just verifying the parseability of files with a large number
|
||||
// (>500) of string concatenations. We emit n_CONCATENATION_LIST instead of
|
||||
// n_BINARY_EXPRESSION to avoid various call-depth traps in PHP, HPHP, and the
|
||||
// builtin JSON decoder.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.
|
||||
''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.''.'';
|
||||
|
|
121
src/lint/linter/standards/ArcanistLinterStandard.php
Normal file
121
src/lint/linter/standards/ArcanistLinterStandard.php
Normal file
|
@ -0,0 +1,121 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* A "linter standard" is a collection of linter rules with associated
|
||||
* severities and configuration.
|
||||
*
|
||||
* Basically, a linter standard allows a set of linter rules and configuration
|
||||
* to be easily reused across multiple repositories without duplicating the
|
||||
* contents of the `.arclint` file (and the associated maintenance costs in
|
||||
* keeping changes to this file synchronized).
|
||||
*/
|
||||
abstract class ArcanistLinterStandard extends Phobject {
|
||||
|
||||
/**
|
||||
* Returns a unique identifier for the linter standard.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getKey();
|
||||
|
||||
/**
|
||||
* Returns a human-readable name for the linter standard.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getName();
|
||||
|
||||
/**
|
||||
* Returns a human-readable description for the linter standard.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
abstract public function getDescription();
|
||||
|
||||
/**
|
||||
* Checks whether the linter standard supports a specified linter.
|
||||
*
|
||||
* @param ArcanistLinter The linter which is being configured.
|
||||
* @return bool True if the linter standard supports the specified
|
||||
* linter, otherwise false.
|
||||
*/
|
||||
abstract public function supportsLinter(ArcanistLinter $linter);
|
||||
|
||||
/**
|
||||
* Get linter configuration.
|
||||
*
|
||||
* Returns linter configuration which is passed to
|
||||
* @{method:ArcanistLinter::setLinterConfigurationValue}.
|
||||
*
|
||||
* @return map<string, wild>
|
||||
*/
|
||||
public function getLinterConfiguration() {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get linter severities.
|
||||
*
|
||||
* Returns linter severities which are passed to
|
||||
* @{method:ArcanistLinter::addCustomSeverityMap}.
|
||||
*
|
||||
* @return map
|
||||
*/
|
||||
public function getLinterSeverityMap() {
|
||||
return array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load a linter standard by key.
|
||||
*
|
||||
* @param string
|
||||
* @param ArcanistLinter
|
||||
* @return ArcanistLinterStandard
|
||||
*/
|
||||
final public static function getStandard($key, ArcanistLinter $linter) {
|
||||
$standards = self::loadAllStandardsForLinter($linter);
|
||||
|
||||
if (empty($standards[$key])) {
|
||||
throw new ArcanistUsageException(
|
||||
pht(
|
||||
'No such linter standard. Available standards are: %s.',
|
||||
implode(', ', array_keys($standards))));
|
||||
}
|
||||
|
||||
return $standards[$key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all linter standards.
|
||||
*
|
||||
* @return list<ArcanistLinterStandard>
|
||||
*/
|
||||
final public static function loadAllStandards() {
|
||||
return id(new PhutilClassMapQuery())
|
||||
->setAncestorClass(__CLASS__)
|
||||
->setUniqueMethod('getKey')
|
||||
->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
* Load all linter standards which support a specified linter.
|
||||
*
|
||||
* @param ArcanistLinter
|
||||
* @return list<ArcanistLinterStandard>
|
||||
*/
|
||||
final public static function loadAllStandardsForLinter(
|
||||
ArcanistLinter $linter) {
|
||||
|
||||
$all_standards = self::loadAllStandards();
|
||||
$standards = array();
|
||||
|
||||
foreach ($all_standards as $standard) {
|
||||
if ($standard->supportsLinter($linter)) {
|
||||
$standards[$standard->getKey()] = $standard;
|
||||
}
|
||||
}
|
||||
|
||||
return $standards;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistLinterStandardTestCase extends PhutilTestCase {
|
||||
|
||||
public function testLoadAllStandards() {
|
||||
ArcanistLinterStandard::loadAllStandards();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPhutilXHPASTLinterStandard
|
||||
extends ArcanistLinterStandard {
|
||||
|
||||
public function getKey() {
|
||||
return 'phutil.xhpast';
|
||||
}
|
||||
|
||||
public function getName() {
|
||||
return pht('Phutil XHPAST');
|
||||
}
|
||||
|
||||
public function getDescription() {
|
||||
return pht('PHP Coding Standards for Phutil libraries.');
|
||||
}
|
||||
|
||||
public function supportsLinter(ArcanistLinter $linter) {
|
||||
return $linter instanceof ArcanistXHPASTLinter;
|
||||
}
|
||||
|
||||
public function getLinterConfiguration() {
|
||||
return array(
|
||||
'xhpast.blacklisted.function' => array(
|
||||
'eval' => pht(
|
||||
'The `%s` function should be avoided. It is potentially unsafe '.
|
||||
'and makes debugging more difficult.',
|
||||
'eval'),
|
||||
),
|
||||
'xhpast.php-version' => '5.2.3',
|
||||
'xhpast.php-version.windows' => '5.3.0',
|
||||
'xhpast.dynamic-string.classes' => array(
|
||||
'ExecFuture' => 0,
|
||||
),
|
||||
'xhpast.dynamic-string.functions' => array(
|
||||
'pht' => 0,
|
||||
|
||||
'hsprintf' => 0,
|
||||
'jsprintf' => 0,
|
||||
|
||||
'hgsprintf' => 0,
|
||||
|
||||
'csprintf' => 0,
|
||||
'vcsprintf' => 0,
|
||||
'execx' => 0,
|
||||
'exec_manual' => 0,
|
||||
'phutil_passthru' => 0,
|
||||
|
||||
'qsprintf' => 1,
|
||||
'vqsprintf' => 1,
|
||||
'queryfx' => 1,
|
||||
'queryfx_all' => 1,
|
||||
'queryfx_one' => 1,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function getLinterSeverityMap() {
|
||||
$advice = ArcanistLintSeverity::SEVERITY_ADVICE;
|
||||
$error = ArcanistLintSeverity::SEVERITY_ERROR;
|
||||
|
||||
return array(
|
||||
ArcanistTodoCommentXHPASTLinterRule::ID => $advice,
|
||||
ArcanistCommentSpacingXHPASTLinterRule::ID => $error,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
|
@ -81,6 +81,64 @@ abstract class ArcanistXHPASTLinterRule extends Phobject {
|
|||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/* -( Proxied Methods )---------------------------------------------------- */
|
||||
|
||||
|
||||
final public function getActivePath() {
|
||||
return $this->linter->getActivePath();
|
||||
}
|
||||
|
||||
final public function getOtherLocation($offset, $path = null) {
|
||||
return $this->linter->getOtherLocation($offset, $path);
|
||||
}
|
||||
|
||||
final protected function raiseLintAtPath($desc) {
|
||||
return $this->linter->raiseLintAtPath($this->getLintID(), $desc);
|
||||
}
|
||||
|
||||
final public function raiseLintAtOffset(
|
||||
$offset,
|
||||
$description,
|
||||
$original = null,
|
||||
$replacement = null) {
|
||||
|
||||
$this->linter->raiseLintAtOffset(
|
||||
$offset,
|
||||
$this->getLintID(),
|
||||
$description,
|
||||
$original,
|
||||
$replacement);
|
||||
}
|
||||
|
||||
final protected function raiseLintAtToken(
|
||||
XHPASTToken $token,
|
||||
$description,
|
||||
$replace = null) {
|
||||
|
||||
return $this->linter->raiseLintAtToken(
|
||||
$token,
|
||||
$this->getLintID(),
|
||||
$description,
|
||||
$replace);
|
||||
}
|
||||
|
||||
final protected function raiseLintAtNode(
|
||||
XHPASTNode $node,
|
||||
$description,
|
||||
$replace = null) {
|
||||
|
||||
return $this->linter->raiseLintAtNode(
|
||||
$node,
|
||||
$this->getLintID(),
|
||||
$description,
|
||||
$replace);
|
||||
}
|
||||
|
||||
|
||||
/* -( Utility )------------------------------------------------------------ */
|
||||
|
||||
|
||||
/**
|
||||
* Statically evaluate a boolean value from an XHP tree.
|
||||
*
|
||||
|
@ -99,71 +157,11 @@ abstract class ArcanistXHPASTLinterRule extends Phobject {
|
|||
case '1':
|
||||
case 'true':
|
||||
return true;
|
||||
}
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
protected function getConcreteVariableString(XHPASTNode $var) {
|
||||
$concrete = $var->getConcreteString();
|
||||
// Strip off curly braces as in `$obj->{$property}`.
|
||||
$concrete = trim($concrete, '{}');
|
||||
return $concrete;
|
||||
}
|
||||
|
||||
// These methods are proxied to the @{class:ArcanistLinter}.
|
||||
|
||||
final public function getActivePath() {
|
||||
return $this->linter->getActivePath();
|
||||
}
|
||||
|
||||
final public function getOtherLocation($offset, $path = null) {
|
||||
return $this->linter->getOtherLocation($offset, $path);
|
||||
}
|
||||
|
||||
final protected function raiseLintAtNode(
|
||||
XHPASTNode $node,
|
||||
$desc,
|
||||
$replace = null) {
|
||||
|
||||
return $this->linter->raiseLintAtNode(
|
||||
$node,
|
||||
$this->getLintID(),
|
||||
$desc,
|
||||
$replace);
|
||||
}
|
||||
|
||||
final public function raiseLintAtOffset(
|
||||
$offset,
|
||||
$desc,
|
||||
$text = null,
|
||||
$replace = null) {
|
||||
|
||||
return $this->linter->raiseLintAtOffset(
|
||||
$offset,
|
||||
$this->getLintID(),
|
||||
$desc,
|
||||
$text,
|
||||
$replace);
|
||||
}
|
||||
|
||||
final protected function raiseLintAtPath($desc) {
|
||||
return $this->linter->raiseLintAtPath($this->getLintID(), $desc);
|
||||
}
|
||||
|
||||
final protected function raiseLintAtToken(
|
||||
XHPASTToken $token,
|
||||
$desc,
|
||||
$replace = null) {
|
||||
|
||||
return $this->linter->raiseLintAtToken(
|
||||
$token,
|
||||
$this->getLintID(),
|
||||
$desc,
|
||||
$replace);
|
||||
}
|
||||
|
||||
/* -( Utility )------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* Retrieve all anonymous closure(s).
|
||||
*
|
||||
|
@ -186,6 +184,21 @@ abstract class ArcanistXHPASTLinterRule extends Phobject {
|
|||
return AASTNodeList::newFromTreeAndNodes($root->getTree(), $nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO
|
||||
*
|
||||
* @param XHPASTNode
|
||||
* @return string
|
||||
*/
|
||||
protected function getConcreteVariableString(XHPASTNode $variable) {
|
||||
$concrete = $variable->getConcreteString();
|
||||
|
||||
// Strip off curly braces as in `$obj->{$property}`.
|
||||
$concrete = trim($concrete, '{}');
|
||||
|
||||
return $concrete;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all calls to some specified function(s).
|
||||
*
|
||||
|
@ -212,6 +225,11 @@ abstract class ArcanistXHPASTLinterRule extends Phobject {
|
|||
return AASTNodeList::newFromTreeAndNodes($root->getTree(), $nodes);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get PHP superglobals.
|
||||
*
|
||||
* @return list<string>
|
||||
*/
|
||||
public function getSuperGlobalNames() {
|
||||
return array(
|
||||
'$GLOBALS',
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistXHPASTLinterRuleTestCase extends PhutilTestCase {
|
||||
|
||||
public function testLoadAllRules() {
|
||||
ArcanistXHPASTLinterRule::loadAllRules();
|
||||
$this->assertTrue(true);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistArrayCombineXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 84;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('%s Unreliable', 'array_combine()');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_DISABLED;
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$function_calls = $this->getFunctionCalls($root, array('array_combine'));
|
||||
|
||||
foreach ($function_calls as $call) {
|
||||
$name = $call->getChildByIndex(0)->getConcreteString();
|
||||
$parameter_list = $call->getChildOfType(1, 'n_CALL_PARAMETER_LIST');
|
||||
|
||||
if (count($parameter_list->getChildren()) !== 2) {
|
||||
// Wrong number of parameters, but raise that elsewhere if we want.
|
||||
continue;
|
||||
}
|
||||
|
||||
$first = $parameter_list->getChildByIndex(0);
|
||||
$second = $parameter_list->getChildByIndex(1);
|
||||
|
||||
if ($first->getConcreteString() == $second->getConcreteString()) {
|
||||
$this->raiseLintAtNode(
|
||||
$call,
|
||||
pht(
|
||||
'Prior to PHP 5.4, `%s` fails when given empty arrays. '.
|
||||
'Prefer to write `%s` as `%s`.',
|
||||
'array_combine()',
|
||||
'array_combine(x, x)',
|
||||
'array_fuse(x)'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -61,10 +61,17 @@ final class ArcanistBraceFormattingXHPASTLinterRule
|
|||
}
|
||||
|
||||
$type = $parent->getTypeName();
|
||||
if ($type != 'n_STATEMENT_LIST' && $type != 'n_DECLARE') {
|
||||
switch ($type) {
|
||||
case 'n_DECLARE':
|
||||
case 'n_NAMESPACE':
|
||||
case 'n_STATEMENT_LIST':
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->raiseLintAtNode(
|
||||
$node,
|
||||
pht('Use braces to surround a statement block.'));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,40 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistClassExtendsObjectXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 88;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Class Not Extending %s', 'Phobject');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_DISABLED;
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$classes = $root->selectDescendantsOfType('n_CLASS_DECLARATION');
|
||||
|
||||
foreach ($classes as $class) {
|
||||
// TODO: This doesn't quite work for namespaced classes (see T8534).
|
||||
$name = $class->getChildOfType(1, 'n_CLASS_NAME');
|
||||
$extends = $class->getChildByIndex(2);
|
||||
|
||||
if ($name->getConcreteString() == 'Phobject') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($extends->getTypeName() == 'n_EMPTY') {
|
||||
$this->raiseLintAtNode(
|
||||
$class,
|
||||
pht(
|
||||
'Classes should extend from %s or from some other class. '.
|
||||
'All classes (except for %s itself) should have a base class.',
|
||||
'Phobject',
|
||||
'Phobject'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDeprecationXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 85;
|
||||
|
||||
private $deprecatedFunctions = array();
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Use of Deprecated Function');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_WARNING;
|
||||
}
|
||||
|
||||
public function getLinterConfigurationOptions() {
|
||||
return parent::getLinterConfigurationOptions() + array(
|
||||
'xhpast.deprecated.functions' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
'help' => pht(
|
||||
'Functions which should should be considered deprecated.'),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
public function setLinterConfigurationValue($key, $value) {
|
||||
switch ($key) {
|
||||
case 'xhpast.deprecated.functions':
|
||||
$this->deprecatedFunctions = $value;
|
||||
return;
|
||||
|
||||
default:
|
||||
return parent::getLinterConfigurationOptions();
|
||||
}
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$map = $this->deprecatedFunctions;
|
||||
$function_calls = $this->getFunctionCalls($root, array_keys($map));
|
||||
|
||||
foreach ($function_calls as $call) {
|
||||
$name = $call
|
||||
->getChildByIndex(0)
|
||||
->getConcreteString();
|
||||
|
||||
$name = strtolower($name);
|
||||
if (empty($map[$name])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->raiseLintAtNode($call, $map[$name]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistNestedNamespacesXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 90;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Nested `%s` Statements', 'namespace');
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$namespaces = $root->selectDescendantsOfType('n_NAMESPACE');
|
||||
|
||||
foreach ($namespaces as $namespace) {
|
||||
$nested_namespaces = $namespace->selectDescendantsOfType('n_NAMESPACE');
|
||||
|
||||
foreach ($nested_namespaces as $nested_namespace) {
|
||||
$this->raiseLintAtNode(
|
||||
$nested_namespace,
|
||||
pht(
|
||||
'`%s` declarations cannot be nested. '.
|
||||
'This construct will cause a PHP fatal error.',
|
||||
'namespace'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -295,9 +295,6 @@ final class ArcanistPHPCompatibilityXHPASTLinterRule
|
|||
// NOTE: This is only "use x;", in anonymous functions the node type is
|
||||
// n_LEXICAL_VARIABLE_LIST even though both tokens are T_USE.
|
||||
|
||||
// TODO: We parse n_USE in a slightly crazy way right now; that would be
|
||||
// a better selector once it's fixed.
|
||||
|
||||
$uses = $root->selectDescendantsOfType('n_USE_LIST');
|
||||
foreach ($uses as $use) {
|
||||
$this->raiseLintAtNode(
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistParentMemberReferenceXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 83;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Parent Member Reference');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_WARNING;
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$class_declarations = $root->selectDescendantsOfType('n_CLASS_DECLARATION');
|
||||
|
||||
foreach ($class_declarations as $class_declaration) {
|
||||
$extends_list = $class_declaration
|
||||
->getChildByIndex(2);
|
||||
$parent_class = null;
|
||||
|
||||
if ($extends_list->getTypeName() == 'n_EXTENDS_LIST') {
|
||||
$parent_class = $extends_list
|
||||
->getChildOfType(0, 'n_CLASS_NAME')
|
||||
->getConcreteString();
|
||||
}
|
||||
|
||||
if (!$parent_class) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$class_static_accesses = $class_declaration
|
||||
->selectDescendantsOfType('n_CLASS_STATIC_ACCESS');
|
||||
$closures = $this->getAnonymousClosures($class_declaration);
|
||||
|
||||
foreach ($class_static_accesses as $class_static_access) {
|
||||
$double_colons = $class_static_access
|
||||
->selectTokensOfType('T_PAAMAYIM_NEKUDOTAYIM');
|
||||
$class_ref = $class_static_access->getChildByIndex(0);
|
||||
|
||||
if ($class_ref->getTypeName() != 'n_CLASS_NAME') {
|
||||
continue;
|
||||
}
|
||||
$class_ref_name = $class_ref->getConcreteString();
|
||||
|
||||
if (strtolower($parent_class) == strtolower($class_ref_name)) {
|
||||
$in_closure = false;
|
||||
|
||||
foreach ($closures as $closure) {
|
||||
if ($class_ref->isDescendantOf($closure)) {
|
||||
$in_closure = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version_compare($this->version, '5.4.0', '>=') || !$in_closure) {
|
||||
$this->raiseLintAtNode(
|
||||
$class_ref,
|
||||
pht(
|
||||
'Use `%s` to call parent method.',
|
||||
'parent::'),
|
||||
'parent');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistRaggedClassTreeEdgeXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 87;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Class Not %s Or %s', 'abstract', 'final');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_DISABLED;
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$parser = new PhutilDocblockParser();
|
||||
|
||||
$classes = $root->selectDescendantsOfType('n_CLASS_DECLARATION');
|
||||
foreach ($classes as $class) {
|
||||
$is_final = false;
|
||||
$is_abstract = false;
|
||||
$is_concrete_extensible = false;
|
||||
|
||||
$attributes = $class->getChildOfType(0, 'n_CLASS_ATTRIBUTES');
|
||||
foreach ($attributes->getChildren() as $child) {
|
||||
if ($child->getConcreteString() == 'final') {
|
||||
$is_final = true;
|
||||
}
|
||||
if ($child->getConcreteString() == 'abstract') {
|
||||
$is_abstract = true;
|
||||
}
|
||||
}
|
||||
|
||||
$docblock = $class->getDocblockToken();
|
||||
if ($docblock) {
|
||||
list($text, $specials) = $parser->parse($docblock->getValue());
|
||||
$is_concrete_extensible = idx($specials, 'concrete-extensible');
|
||||
}
|
||||
|
||||
if (!$is_final && !$is_abstract && !$is_concrete_extensible) {
|
||||
$this->raiseLintAtNode(
|
||||
$class->getChildOfType(1, 'n_CLASS_NAME'),
|
||||
pht(
|
||||
"This class is neither '%s' nor '%s', and does not have ".
|
||||
"a docblock marking it '%s'.",
|
||||
'final',
|
||||
'abstract',
|
||||
'@concrete-extensible'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistThisReassignmentXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 91;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('`%s` Reassignment', '$this');
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$binary_expressions = $root->selectDescendantsOfType('n_BINARY_EXPRESSION');
|
||||
|
||||
foreach ($binary_expressions as $binary_expression) {
|
||||
$operator = $binary_expression->getChildOfType(1, 'n_OPERATOR');
|
||||
|
||||
if ($operator->getConcreteString() != '=') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$variable = $binary_expression->getChildByIndex(0);
|
||||
|
||||
if ($variable->getTypeName() != 'n_VARIABLE') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ($variable->getConcreteString() == '$this') {
|
||||
$this->raiseLintAtNode(
|
||||
$binary_expression,
|
||||
pht(
|
||||
'`%s` cannot be re-assigned. '.
|
||||
'This construct will cause a PHP fatal error.',
|
||||
'$this'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistUnexpectedReturnValueXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 92;
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Unexpected `%s` Value', 'return');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_WARNING;
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$methods = $root->selectDescendantsOfType('n_METHOD_DECLARATION');
|
||||
|
||||
foreach ($methods as $method) {
|
||||
$method_name = $method
|
||||
->getChildOfType(2, 'n_STRING')
|
||||
->getConcreteString();
|
||||
|
||||
switch (strtolower($method_name)) {
|
||||
case '__construct':
|
||||
case '__destruct':
|
||||
$returns = $method->selectDescendantsOfType('n_RETURN');
|
||||
|
||||
foreach ($returns as $return) {
|
||||
$return_value = $return->getChildByIndex(0);
|
||||
|
||||
if ($return_value->getTypeName() == 'n_EMPTY') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$this->raiseLintAtNode(
|
||||
$return,
|
||||
pht(
|
||||
'Unexpected `%s` value in `%s` method.',
|
||||
'return',
|
||||
$method_name));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistUnsafeDynamicStringXHPASTLinterRule
|
||||
extends ArcanistXHPASTLinterRule {
|
||||
|
||||
const ID = 86;
|
||||
|
||||
private $dynamicStringFunctions = array();
|
||||
private $dynamicStringClasses = array();
|
||||
|
||||
public function getLintName() {
|
||||
return pht('Unsafe Usage of Dynamic String');
|
||||
}
|
||||
|
||||
public function getLintSeverity() {
|
||||
return ArcanistLintSeverity::SEVERITY_ERROR;
|
||||
}
|
||||
|
||||
public function getLinterConfigurationOptions() {
|
||||
$options = array(
|
||||
'xhpast.dynamic-string.classes' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
'help' => pht(
|
||||
'Classes which should should not be used because they represent the '.
|
||||
'unsafe usage of dynamic strings.'),
|
||||
),
|
||||
'xhpast.dynamic-string.functions' => array(
|
||||
'type' => 'optional map<string, string>',
|
||||
'help' => pht(
|
||||
'Functions which should should not be used because they represent '.
|
||||
'the unsafe usage of dynamic strings.'),
|
||||
),
|
||||
);
|
||||
|
||||
return $options + parent::getLinterConfigurationOptions();
|
||||
}
|
||||
|
||||
public function setLinterConfigurationValue($key, $value) {
|
||||
switch ($key) {
|
||||
case 'xhpast.dynamic-string.classes':
|
||||
$this->dynamicStringClasses = $value;
|
||||
return;
|
||||
|
||||
case 'xhpast.dynamic-string.functions':
|
||||
$this->dynamicStringFunctions = $value;
|
||||
return;
|
||||
|
||||
default:
|
||||
parent::setLinterConfigurationValue($key, $value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
public function process(XHPASTNode $root) {
|
||||
$this->lintUnsafeDynamicStringClasses($root);
|
||||
$this->lintUnsafeDynamicStringFunctions($root);
|
||||
}
|
||||
|
||||
private function lintUnsafeDynamicStringClasses(XHPASTNode $root) {
|
||||
$news = $root->selectDescendantsOfType('n_NEW');
|
||||
$this->lintUnsafeDynamicStringCall($news, $this->dynamicStringClasses);
|
||||
}
|
||||
|
||||
private function lintUnsafeDynamicStringFunctions(XHPASTNode $root) {
|
||||
$calls = $root->selectDescendantsOfType('n_FUNCTION_CALL');
|
||||
$this->lintUnsafeDynamicStringCall($calls, $this->dynamicStringFunctions);
|
||||
}
|
||||
|
||||
private function lintUnsafeDynamicStringCall(
|
||||
AASTNodeList $calls,
|
||||
array $safe) {
|
||||
|
||||
$safe = array_combine(
|
||||
array_map('strtolower', array_keys($safe)),
|
||||
$safe);
|
||||
|
||||
foreach ($calls as $call) {
|
||||
$name = $call->getChildByIndex(0)->getConcreteString();
|
||||
$param = idx($safe, strtolower($name));
|
||||
|
||||
if ($param === null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$parameters = $call->getChildByIndex(1);
|
||||
if (count($parameters->getChildren()) <= $param) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$identifier = $parameters->getChildByIndex($param);
|
||||
if (!$identifier->isConstantString()) {
|
||||
$this->raiseLintAtNode(
|
||||
$call,
|
||||
pht(
|
||||
"Parameter %d of %s should be a scalar string, ".
|
||||
"otherwise it's not safe.",
|
||||
$param + 1,
|
||||
$name.'()'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistAliasFunctionXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/alias-functions/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistArrayCombineXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/array-combine/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistArrayIndexSpacingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/array-index-spacing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistArraySeparatorXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/array-separator/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistArrayValueXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/array-value/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistBinaryExpressionSpacingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/binary-expression-spacing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistBlacklistedFunctionXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/blacklisted-function/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistBraceFormattingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/brace-formatting/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistCallParenthesesXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/call-parentheses/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistCallTimePassByReferenceXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/call-time-pass-by-reference/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistCastSpacingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/cast-spacing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistClassExtendsObjectXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/class-extends-object/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistClassNameLiteralXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/class-name-literal/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistCommentStyleXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/comment-style/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistConcatenationOperatorXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/concatenation-operator/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistConstructorParenthesesXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/constructor-parentheses/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistControlStatementSpacingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/control-statement-spacing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDeclarationParenthesesXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/declaration-parentheses/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDefaultParametersXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/default-parameters/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDeprecationXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/deprecation/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDoubleQuoteXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/double-quote/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDuplicateKeysInArrayXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/duplicate-keys-in-array/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDuplicateSwitchCaseXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/duplicate-switch-case/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistDynamicDefineXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/dynamic-define/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistElseIfUsageXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/elseif-usage/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistEmptyStatementXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/empty-statement/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistExitExpressionXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/exit-expression/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistExtractUseXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/extract-use/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistFormattedStringXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/formatted-string/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistGlobalVariableXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/global-variable/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistImplicitConstructorXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/implicit-constructor/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistImplicitFallthroughXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/implicit-fallthrough/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistImplicitVisibilityXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/implicit-visibility/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistInlineHTMLXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/inline-html/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistInnerFunctionXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/inner-function/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistInstanceofOperatorXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/instanceof-operator/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistInvalidDefaultParameterXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/invalid-default-parameter/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistInvalidModifiersXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/invalid-modifiers/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistKeywordCasingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/keyword-casing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistLambdaFuncFunctionXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/__lambda_func-function/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistLanguageConstructParenthesesXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/language-construct-parentheses/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistListAssignmentXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/list-assignment/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistLogicalOperatorsXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/logical-operators/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistLowercaseFunctionsXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/lowercase-functions/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistModifierOrderingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/modifier-ordering/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistNamingConventionsXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/naming-conventions/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistNestedNamespacesXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/nested-namespaces/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistNewlineAfterOpenTagXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/newline-after-open-tag/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistNoParentScopeXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/no-parent-scope/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistObjectOperatorSpacingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/object-operator-spacing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPHPCompatibilityXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/php-compatibility/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPHPEchoTagXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/php-echo-tag/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPHPOpenTagXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/php-open-tag/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPHPShortTagXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/php-short-tag/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistParentMemberReferenceXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/parent-member-references/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistParenthesesSpacingXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/parentheses-spacing/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistParseStrUseXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/parse_str-use/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPlusOperatorOnStringsXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/plus-operator-on-strings/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistPregQuoteMisuseXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/preg_quote-misuse/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistRaggedClassTreeEdgeXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/ragged-classtree-edge/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistReusedAsIteratorXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(dirname(__FILE__).'/reused-as-iterator/');
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
final class ArcanistReusedIteratorReferenceXHPASTLinterRuleTestCase
|
||||
extends ArcanistXHPASTLinterRuleTestCase {
|
||||
|
||||
public function testLinter() {
|
||||
$this->executeTestsInDirectory(
|
||||
dirname(__FILE__).'/reused-iterator-reference/');
|
||||
}
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue