]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Some documentation.
authorepriestley <epriestley@phabricator.com>
Sat, 19 Feb 2011 19:36:08 +0000 (11:36 -0800)
committerepriestley <epriestley@phabricator.com>
Sat, 19 Feb 2011 19:36:08 +0000 (11:36 -0800)
Summary:

Test Plan:

Reviewers:

CC:

74 files changed:
.divinerconfig
scripts/arcanist.php
scripts/phutil_analyzer.php
src/__phutil_library_map__.php
src/configuration/ArcanistConfiguration.php
src/difference/ArcanistDiffUtils.php
src/differential/commitmessage/ArcanistDifferentialCommitMessage.php
src/differential/commitmessage/ArcanistDifferentialCommitMessageParserException.php
src/differential/revision/ArcanistDifferentialRevisionRef.php
src/docs/arcconfig.diviner
src/docs/building_new_configuration_classes.diviner [new file with mode: 0644]
src/docs/overview.diviner
src/docs/svn_hooks.diviner
src/exception/ArcanistChooseInvalidRevisionException.php
src/exception/ArcanistChooseNoRevisionsException.php
src/exception/usage/ArcanistUsageException.php
src/exception/usage/noeffect/ArcanistNoEffectException.php
src/exception/usage/noengine/ArcanistNoEngineException.php
src/exception/usage/userabort/ArcanistUserAbortException.php
src/lint/engine/base/ArcanistLintEngine.php
src/lint/engine/phutil/PhutilLintEngine.php
src/lint/engine/test/UnitTestableArcanistLintEngine.php
src/lint/linter/apachelicense/ArcanistApacheLicenseLinter.php
src/lint/linter/apachelicense/__tests__/ArcanistApacheLicenseLinterTestCase.php
src/lint/linter/base/ArcanistLinter.php
src/lint/linter/base/test/ArcanistLinterTestCase.php
src/lint/linter/filename/ArcanistFilenameLinter.php
src/lint/linter/generated/ArcanistGeneratedLinter.php
src/lint/linter/license/ArcanistLicenseLinter.php
src/lint/linter/pep8/ArcanistPEP8Linter.php
src/lint/linter/phutilmodule/ArcanistPhutilModuleLinter.php
src/lint/linter/text/ArcanistTextLinter.php
src/lint/linter/text/__tests__/ArcanistTextLinterTestCase.php
src/lint/linter/xhpast/ArcanistXHPASTLinter.php
src/lint/linter/xhpast/__tests__/ArcanistXHPASTLinterTestCase.php
src/lint/message/ArcanistLintMessage.php
src/lint/patcher/ArcanistLintPatcher.php
src/lint/renderer/ArcanistLintRenderer.php
src/lint/result/ArcanistLintResult.php
src/lint/severity/ArcanistLintSeverity.php
src/parser/bundle/ArcanistBundle.php
src/parser/diff/ArcanistDiffParser.php
src/parser/diff/__tests__/ArcanistDiffParserTestCase.php
src/parser/diff/change/ArcanistDiffChange.php
src/parser/diff/changetype/ArcanistDiffChangeType.php
src/parser/diff/hunk/ArcanistDiffHunk.php
src/parser/phutilmodule/PhutilModuleRequirements.php [moved from src/staticanalysis/parsers/phutilmodule/PhutilModuleRequirements.php with 98% similarity]
src/parser/phutilmodule/__init__.php [moved from src/staticanalysis/parsers/phutilmodule/__init__.php with 100% similarity]
src/repository/api/base/ArcanistRepositoryAPI.php
src/repository/api/git/ArcanistGitAPI.php
src/repository/api/subversion/ArcanistSubversionAPI.php
src/unit/engine/base/ArcanistBaseUnitTestEngine.php
src/unit/engine/phutil/PhutilUnitTestEngine.php
src/unit/engine/phutil/__tests__/PhutilUnitTestEngineTestCase.php
src/unit/engine/phutil/testcase/ArcanistPhutilTestCase.php
src/unit/engine/phutil/testcase/exception/ArcanistPhutilTestTerminatedException.php
src/unit/result/ArcanistUnitTestResult.php
src/workflow/amend/ArcanistAmendWorkflow.php
src/workflow/base/ArcanistBaseWorkflow.php
src/workflow/commit/ArcanistCommitWorkflow.php
src/workflow/cover/ArcanistCoverWorkflow.php
src/workflow/diff/ArcanistDiffWorkflow.php
src/workflow/export/ArcanistExportWorkflow.php
src/workflow/git-hook-pre-receive/ArcanistGitHookPreReceiveWorkflow.php
src/workflow/help/ArcanistHelpWorkflow.php
src/workflow/lint/ArcanistLintWorkflow.php
src/workflow/list/ArcanistListWorkflow.php
src/workflow/mark-committed/ArcanistMarkCommittedWorkflow.php
src/workflow/patch/ArcanistPatchWorkflow.php
src/workflow/shell-complete/ArcanistShellCompleteWorkflow.php
src/workflow/svn-hook-pre-commit/ArcanistSvnHookPreCommitWorkflow.php
src/workflow/unit/ArcanistUnitWorkflow.php
src/workflow/unit/__init__.php
src/workingcopyidentity/ArcanistWorkingCopyIdentity.php

index 11a99d8c8fbe4f2a87e01f3f7c90bdfe91da1720..f36ed9c841eeb2273f6d321e0de6c6d75a58ab31 100644 (file)
@@ -3,7 +3,17 @@
   "src_base" : "https://github.com/facebook/arcanist/blob/master",
   "groups" : {
     "intro" : "Introduction",
-    "config" : "Setup & Configuration"
+    "config" : "Setup & Configuration",    
+    "workflow" : "Workflows",
+    "lint" : "Lint Integration",
+    "linter" : "Linters",
+    "unit" : "Unit Test Integration",
+    "unitrun" : "Unit Test Runners",
+    "diff" : "Diff and Changeset APIs",
+    "differential" : "Differential Integration",
+    "workingcopy" : "Working Copy APIs",
+    "module" : "Phutil Module System",
+    "testcase" : "Test Cases"
   }
 }
 
index b4de5327f8ac99005a6b2d75c7bd03fb13a19930..dfd7309e7d8abc1aecc34509bcb2354592ec4d0a 100755 (executable)
@@ -30,6 +30,8 @@ phutil_require_module('arcanist', 'configuration');
 phutil_require_module('arcanist', 'workingcopyidentity');
 phutil_require_module('arcanist', 'repository/api/base');
 
+ini_set('memory_limit', -1);
+
 $config_trace_mode = false;
 $force_conduit = null;
 $args = array_slice($argv, 1);
index 3e89ff3dd5a849518a287a0c025c041339d31200..c5dc4ea160f35652ce4dea4b24c7b515639e0c75 100755 (executable)
@@ -53,7 +53,7 @@ phutil_require_module('phutil', 'parser/xhpast/api/tree');
 
 phutil_require_module('arcanist', 'lint/linter/phutilmodule');
 phutil_require_module('arcanist', 'lint/message');
-phutil_require_module('arcanist', 'staticanalysis/parsers/phutilmodule');
+phutil_require_module('arcanist', 'parser/phutilmodule');
 
 
 $data = array();
@@ -114,7 +114,7 @@ foreach (Futures($futures) as $file => $future) {
         }
         $requirements->addSourceDependency($name, $value);
       } else if ($call_name == 'phutil_require_module') {
-        analyze_require_module($call, $requirements);
+        analyze_phutil_require_module($call, $requirements);
       }
     }
   } else {
@@ -146,7 +146,7 @@ foreach (Futures($futures) as $file => $future) {
 
       $call_name = $name->getConcreteString();
       if ($call_name == 'phutil_require_module') {
-        analyze_require_module($call, $requirements);
+        analyze_phutil_require_module($call, $requirements);
       } else if ($call_name == 'call_user_func' ||
                  $call_name == 'call_user_func_array') {
         $params = $call->getChildByIndex(1)->getChildren();
@@ -307,7 +307,12 @@ if (!$has_init && $has_files) {
 
 echo json_encode($requirements->toDictionary());
 
-function analyze_require_module(
+/**
+ * Parses meaning from calls to phutil_require_module() in __init__.php files.
+ *
+ * @group module
+ */
+function analyze_phutil_require_module(
   XHPASTNode $call,
   PhutilModuleRequirements $requirements) {
 
index d0d784a48bb278aafe0d37f151dfa8a663285695..f9fe69079c567b66b4f95259b951a9b7d5bd8ded 100644 (file)
@@ -68,7 +68,7 @@ phutil_register_library_map(array(
     'ArcanistXHPASTLinter' => 'lint/linter/xhpast',
     'ArcanistXHPASTLinterTestCase' => 'lint/linter/xhpast/__tests__',
     'PhutilLintEngine' => 'lint/engine/phutil',
-    'PhutilModuleRequirements' => 'staticanalysis/parsers/phutilmodule',
+    'PhutilModuleRequirements' => 'parser/phutilmodule',
     'PhutilUnitTestEngine' => 'unit/engine/phutil',
     'PhutilUnitTestEngineTestCase' => 'unit/engine/phutil/__tests__',
     'UnitTestableArcanistLintEngine' => 'lint/engine/test',
index 1f5c23893c811e8242abcd4a1b2d254d084e0c91..64cb22cc425de95054574de2eeb80e1e88d48921 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Runtime workflow configuration. In Arcanist, commands you type like
+ * "arc diff" or "arc lint" are called "workflows". This class allows you to add
+ * new workflows (and extend existing workflows) by subclassing it and then
+ * pointing to your subclass in your project configuration.
+ *
+ * For instructions on how to extend this class and customize Arcanist in your
+ * project, see @{article:Building New Configuration Classes}.
+ *
+ * When specified as the **arcanist_configuration** class in your project's
+ * ##.arcconfig##, your subclass will be instantiated (instead of this class)
+ * and be able to handle all the method calls. In particular, you can:
+ *
+ *    - create, replace, or disable workflows by overriding buildWorkflow()
+ *      and buildAllWorkflows();
+ *    - add additional steps before or after workflows run by overriding
+ *      willRunWorkflow() or didRunWorkflow(); and
+ *    - add new flags to existing workflows by overriding
+ *      getCustomArgumentsForCommand().
+ *
+ * @group config
+ */
 class ArcanistConfiguration {
 
   public function buildWorkflow($command) {
index 9ff4f040a6f21799268d3a740341aef4420bba98..e1534cfba98c8495be7bd5a2184689afcffc3a42 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Dumping ground for diff- and diff-algorithm-related miscellany.
+ *
+ * @group diff
+ */
 final class ArcanistDiffUtils {
 
   public static function renderDifferences(
index 728397ca10cdaaff97e4c39f0d3bf016cd7cb5d1..3b0328eff69c5bc4eaa93869e61e42da196b3aa4 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Represents a parsed commit message.
+ *
+ * @group differential
+ */
 class ArcanistDifferentialCommitMessage {
 
   private $rawCorpus;
index 3712299599c5b5ff7bbfefdc479145b8ab9de5b3..41ea5cd2ba91531e6665c561fe8f4713321403ec 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when a commit message isn't parseable.
+ *
+ * @group differential
+ */
 class ArcanistDifferentialCommitMessageParserException extends Exception {
 
 }
index da866c241961fdaf57bf309a31d479bd91ebc34c..8e6c19ff5d9d1d80676026c0863dd7f387491b1d 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Reference to a Differential revision.
+ *
+ * @group differential
+ */
 class ArcanistDifferentialRevisionRef {
 
   protected $id;
index c7085e4c3f217f9e214befdfc76827a6f08fde03..0ae197e24c8afeaa83d48f1fab8faf488ac5147e 100644 (file)
@@ -1,8 +1,7 @@
 @title Setting Up .arcconfig
 @group config
 
-This document describes how to configure Arcanist projects with ##.arcconfig##
-files.
+Explains how to configure Arcanist projects with ##.arcconfig## files.
 
 = .arcconfig Basics =
 
diff --git a/src/docs/building_new_configuration_classes.diviner b/src/docs/building_new_configuration_classes.diviner
new file mode 100644 (file)
index 0000000..6fb3161
--- /dev/null
@@ -0,0 +1,83 @@
+@title Building New Configuration Classes
+@group config
+
+Explains how to build new classes to control how Arcanist behaves.
+
+= Overview =
+
+Arcanist has some basic configuration options available in the ##.arcconfig##
+file (see @{article:Setting Up .arcconfig}), but it can't handle everything. If
+you want to customize Arcanist at a deeper level, you need to build new classes.
+For instance:
+
+  - if you want to configure linters, or add new linters, you need to create a
+    new class which extends @{class:ArcanistLintEngine}.
+  - if you want to integrate with a unit testing framework, you need to create a
+    new class which extends @{class:ArcanistBaseUnitTestEngine}.
+  - if you you want to change how workflows behave, or add new workflows, you
+    need to create a new class which extends @{class:ArcanistConfiguration}.
+
+Arcanist works through a sort of dependency-injection approach. For example,
+Arcanist does not run lint rules by default, but you can set **lint_engine**
+in your ##.arcconfig## to the name of a class which extends
+@{class:ArcanistLintEngine}. When running from inside your project, Arcanist
+will load this class and call methods on it in order to run lint. To make this
+work, you need to do three things:
+
+  - actually write the class;
+  - add the library where the class exists to your ##.arcconfig##;
+  - add the class name to your ##.arcconfig## as the **lint_engine**, 
+    **unit_engine**, or **arcanist_configuration**.
+    
+= Write the Class =
+
+(TODO)
+
+= Load the Class =
+
+To make the class loadable, you need to put the path to it in your
+##.arcconfig##, under **phutil_libraries**:
+
+  {
+    // ...
+    "phutil_libraries" : {
+      // ...
+      "my-library" : "/path/to/my/library",
+      // ...
+    }
+    // ...
+  }
+  
+You can either specify an absolute path, or a path relative to the project root.
+When you run ##arc --trace##, you should see a message to the effect that it has
+loaded your library.
+
+For debugging or testing, you can also run Arcanist with the
+##--load-phutil-library## flag:
+
+  arc --load-phutil-library=/path/to/library <command>
+  
+You can specify this flag more than once to load several libraries. Note that
+if you use this flag, Arcanist will ignore any libraries listed in
+##.arcconfig##.
+
+= Use the Class =
+
+This step is easy: just edit ##.arcconfig## to specify your class name as
+the appropriate configuration value.
+
+  {
+    // ...
+    "lint_engine" : "MyCustomArcanistLintEngine",
+    // ...
+  }
+
+Now, when you run Arcanist in your project, it will invoke your class when
+appropriate.
+
+For lint and unit tests, you can also use the ##--engine## flag override the
+default engine:
+
+  arc lint --engine MyCustomArcanistLintEngine
+
+This is mostly useful for debugging and testing.
index 0bc22578a80ab817571af502d082679eeb2ce489..f785ad97c58640209b8afa168fb95fd2f9b18a66 100644 (file)
@@ -1,10 +1,10 @@
 @title Arcanist Overview
 @group intro
 
-This document provides an overview of Arcanist, a code workflow tool. Arcanist
-(commonly, "arc") is the command-line frontend to Differential.
+Overview of Arcanist, a code workflow tool.
 
-A detailed command reference is available by running ##arc help##.
+Arcanist (commonly, "arc") is the command-line frontend to Differential. A
+detailed command reference is available by running ##arc help##.
 
 = Overview =
 
index 3605299fd4b0c33435111d8d42eb1d87f79840a0..27c4d9081a223f998970c311b9f81aa813f4fff0 100644 (file)
@@ -1,6 +1,8 @@
 @title Installing Arcanist SVN Hooks
 @group config
 
+Describes how to set up Arcanist as an SVN pre-commit hook.
+
 = Installing Arcanist SVN Hooks =
 
 You can install Arcanist as an SVN pre-commit hook, to reject commits which
index 85664e25032c0ef1c497860429994feb5acd2e02..f49558d3bf73e4f1f995c9a042dc7ad8c5c8dafe 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when the user chooses an invalid revision when prompted by a workflow.
+ *
+ * @group workflow
+ */
 class ArcanistChooseInvalidRevisionException extends Exception {
 
 }
index 9584257255cdd646f11fd228833355517b570962..cc8d1a739b9570e149cc6bdd2c1bd29ffade9703 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when there are no valid revisions to choose from, in a workflow which
+ * prompts the user to choose a revision.
+ *
+ * @group workflow
+ */
 class ArcanistChooseNoRevisionsException extends Exception {
 
 }
index b2054dbed023d720c652393fde1c51a86c17adec..1948c69bbcacf2d91200e956569983e01a86660c 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when there is a problem with how a user is invoking a command, rather
+ * than a technical problem.
+ *
+ * @group workflow
+ */
 class ArcanistUsageException extends Exception {
 
 }
index 4324fb35504f868e7f9cf926affd110c84954bca..fed8371e728416f7618640c7d9b3d97d0787c4f8 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when lint or unit tests have no effect, i.e. no paths are affected
+ * by any linter or no unit tests provide coverage.
+ *
+ * @group workflow
+ */
 class ArcanistNoEffectException extends ArcanistUsageException {
 }
index 416963ce6654c38dbe89de534edbc53311b44ebe..5a118af95a02132041db46c795f4b61f3cb41b26 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when no engine is configured for linting or running unit tests.
+ *
+ * @group workflow
+ */
 class ArcanistNoEngineException extends ArcanistUsageException {
 }
index a22ccd08908fca4fd724b2eedcfcb6ae3e6c718b..43b6c05fcdc99550296661068c2b4775ac626fad 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Thrown when the user chooses not to continue when warned that they're about
+ * to do something dangerous.
+ *
+ * @group workflow
+ */
 class ArcanistUserAbortException extends ArcanistUsageException {
   public function __construct() {
     parent::__construct('User aborted the workflow.');
index 2f4071b31fe3de70bdc6de2902b4bb99f895bdc8..7d51b6036cb84528caf8b058094b1e1475381d0a 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Manages lint execution.
+ *
+ * @group lint
+ */
 abstract class ArcanistLintEngine {
 
   protected $workingCopy;
index d393c8c900a11b7f9d171c3e04762152f7087202..d923c16608c6798543633e18a6b1537017bfae5e 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Lint engine which enforces libphutil rules.
+ *
+ * @group linter
+ */
 class PhutilLintEngine extends ArcanistLintEngine {
 
   public function buildLinters() {
index 84246d8bf6dc11f198f3e70d1a122b9409e479b2..cbb71becf5b49fe85035205a4f8a2cfd16be462f 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Lint engine for use in constructing test cases. See
+ * @{class:ArcanistLinterTestCase}.
+ *
+ * @group testcase
+ */
 final class UnitTestableArcanistLintEngine extends ArcanistLintEngine {
 
   protected $linters = array();
index 3029b3b48ec46cb4830f07c78b9b7764656b01ef..f150572aa61aae571ee12fa2cabe4f5033bd5532 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Adds the Apache license to source files.
+ *
+ * @group linter
+ */
 class ArcanistApacheLicenseLinter extends ArcanistLicenseLinter {
   public function getLinterName() {
     return 'APACHELICENSE';
index 96643aeaa9dad5ac0c2d03ee2ab117f4e65cad0a..9015e2e28c86964b646cd6257b979f26423f1395 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Test cases for @{class:ArcanistApacheLicenseLinter}.
+ *
+ * @group testcase
+ */
 class ArcanistApacheLicenseLinterTestCase extends ArcanistLinterTestCase {
 
   public function testApacheLicenseLint() {
index 4474418b70dc0f0753d38ca0fe2c5c3f972a439a..b704c41da9f31e2ac5b8364698956da1246a5d91 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Implements lint rules, like syntax checks for a specific language.
+ *
+ * @group linter
+ */
 abstract class ArcanistLinter {
 
   protected $paths  = array();
index 8b02bdf1ceac4f9e08262d4b5ab4d73e9a92e4e9..0a4bff4a7d49b291f9d4e7efdb0b988f117f25e1 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Facilitiates implementation of test cases for @{class:ArcanistLinter}s.
+ *
+ * @group testcase
+ */
 abstract class ArcanistLinterTestCase extends ArcanistPhutilTestCase {
 
   public function executeTestsInDirectory($root, $linter, $working_copy) {
index bd5659c602a554843bbbc6293f1d9fa574eb2570..f5630c03957520753077cff4c94f5f3cdd665768 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Stifles creativity in choosing imaginative file names.
+ *
+ * @group linter
+ */
 class ArcanistFilenameLinter extends ArcanistLinter {
 
   const LINT_BAD_FILENAME = 1;
index 151163024e864302e5549be9ea4fac192914a668..db7390911fa44e55d0798f8d5284f25b3059a436 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
 /**
- * This linter just stops the lint process when a file is marked as generated
- * code.
+ * Stops other linters from running on generated code.
+ *
+ * @group linter
  */
 class ArcanistGeneratedLinter extends ArcanistLinter {
 
index 35ea12cabd46398e3265e5bf37225f4c58234bdd..819cb731706b6bacce126ef6919141d1f7768249 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Adds a license or copyright header to source files.
+ *
+ * @group linter
+ */
 abstract class ArcanistLicenseLinter extends ArcanistLinter {
   const LINT_NO_LICENSE_HEADER = 1;
 
index 3af1773f870ad19febbf84a59b0ca9e1f51bfcb2..2f6b341558cee8e3ac82759cec5e88947721f6ad 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Uses "pep8.py" to enforce PEP8 rules for Python.
+ *
+ * @group linter
+ */
 class ArcanistPEP8Linter extends ArcanistLinter {
 
   public function willLintPaths(array $paths) {
index 4f6b37a43e7cafde5e7f2b84825c2c7bf77b448b..62f469e02ccd0343241e1e2f9a4b3c3e739ecae7 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Applies rules for modules in Phutil libraries.
+ *
+ * @group linter
+ */
 class ArcanistPhutilModuleLinter extends ArcanistLinter {
 
   const LINT_UNDECLARED_CLASS       = 1;
index 23c24c77badbece5149b0d833350bdb417c130c1..8a54550eba0ef0a8ba95b3c0fdc763887be48777 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Enforces basic text file rules.
+ *
+ * @group linter
+ */
 class ArcanistTextLinter extends ArcanistLinter {
 
   const LINT_DOS_NEWLINE            = 1;
index caff6243cc051ad3c717d5e9c6957429c281c894..a271bcc05ee24b86c14de703896ad052b965ffd1 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Test cases for @{class:ArcanistTextLinter}.
+ *
+ * @group testcase
+ */
 class ArcanistTextLinterTestCase extends ArcanistLinterTestCase {
 
   public function testTextLint() {
index fe23fffaa43e4f022d45ff1ef5cf27db94da49df..d642c3cfaf40acb12467c11fc2ac15bbfa279453 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Uses XHPAST to apply lint rules to PHP or PHP+XHP.
+ *
+ * @group linter
+ */
 class ArcanistXHPASTLinter extends ArcanistLinter {
 
   private $trees = array();
index ccc71831299da728633f4793a782ecb23eb4e6ab..fa0e41ee8bd890d4fa81a97bede6cf64cc38b6a1 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Tests for @{class:ArcanistXHPASTLinter}.
+ *
+ * @group testcase
+ */
 class ArcanistXHPASTLinterTestCase extends ArcanistLinterTestCase {
 
   public function testXHPASTLint() {
index 6a8e1495a57c0e3e589722e899d925e5bc6abe5e..5320a20226e92939b8fbc3ca574e5be000446edb 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Message emitted by a linter, like an error or warning.
+ *
+ * @group lint
+ */
 class ArcanistLintMessage {
 
   protected $path;
index e8289845efd63c86b58d811504bd41a125ef40da..eefb8ad6937d74c991dbb56ef91529e72f784d3c 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Applies lint patches to the working copy.
+ *
+ * @group lint
+ */
 final class ArcanistLintPatcher {
 
   private $dirtyUntil     = 0;
index 12510377ab3b4afcacfd4d69ca98024610d0cb4e..0fca7044d5fb0ff9b692e262a2987613f98ba368 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Shows lint messages to the user.
+ *
+ * @group lint
+ */
 class ArcanistLintRenderer {
 
   private $summaryMode;
index d33dee4222c6d22c6d6a2ef067041b204f0c8052..69fdad8bc9b93917e731fd30d8546bd9d8a902ce 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * A group of @{class:ArcanistLintMessage}s that apply to a file.
+ *
+ * @group lint
+ */
 final class ArcanistLintResult {
 
   protected $path;
index 96ad53988ec589adaa28945de18f3dbba55d583a..62b1159188a04bc2cc220f159fa3fefa8e750463 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Describes the severity of an @{class:ArcanistLintMessage}.
+ *
+ * @group lint
+ */
 class ArcanistLintSeverity {
 
   const SEVERITY_ADVICE       = 'advice';
index 94f6c72274a2341e52efb723d7f2c2a63c312f79..8be13f4a1db1f67222a01921e85b494447561e0e 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Converts changesets between different formats.
+ *
+ * @group diff
+ */
 class ArcanistBundle {
 
   private $changes;
index fec00d3ef9f1d8bc9db4c905e88dc905649fdfc5..9e7a33a8ef22409d7469b44e6713ace6844d8f6e 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Parses diffs from a working copy.
+ *
+ * @group diff
+ */
 class ArcanistDiffParser {
 
   protected $api;
index e67774e8d1bed0c8644203cde065cf00f3af7403..b69ba362dd8cf5860fce74643dfded5015221d17 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Test cases for @{class:ArcanistDiffParser}.
+ *
+ * @group testcase
+ */
 class ArcanistDiffParserTestCase extends ArcanistPhutilTestCase {
 
   public function testParser() {
index d45402d7f84b9906f373b89d6db9e1cabd800ff5..ff7ced1decc8d3c723ac233be0ac734564ffa9c5 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Represents a change to an individual path.
+ *
+ * @group diff
+ */
 class ArcanistDiffChange {
 
   protected $metadata = array();
index 3eceddbf3e5ba56b71577e01797ae6e0253571cf..be68a5b648ba4aa9c2858dbde31974feb13dbf8b 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Defines constants for file types and operations in changesets.
+ *
+ * @group diff
+ */
 class ArcanistDiffChangeType {
   const TYPE_ADD        = 1;
   const TYPE_CHANGE     = 2;
index 031f34fd12984fdd62cfc37aee13350e207da883..4b8af2115d663ea888c332889d009e18990a7f38 100644 (file)
@@ -17,8 +17,9 @@
  */
 
 /**
- * A hunk is a contiguous set of added and removed lines in a diff. This is
- * the parsed representation thereof.
+ * Represents a contiguous set of added and removed lines in a diff.
+ *
+ * @group diff
  */
 class ArcanistDiffHunk {
 
similarity index 98%
rename from src/staticanalysis/parsers/phutilmodule/PhutilModuleRequirements.php
rename to src/parser/phutilmodule/PhutilModuleRequirements.php
index 0b5f37b97dd253046d0296ce1535c1cd3bf95fb8..f6bbcbb7b8a99acafcc68b0379491d7890a20059 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Lists dependencies and requirements for a module.
+ *
+ * @group module
+ */
 class PhutilModuleRequirements {
 
   protected $builtins = array(
index d58a8bad9e78cbbc13cdd40c71704dcaf083ccca..549c03de953d395df99aaf92e2348c11d29e634e 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Interfaces with the VCS in the working copy.
+ *
+ * @group workingcopy
+ */
 abstract class ArcanistRepositoryAPI {
 
   const FLAG_MODIFIED     = 1;
index 9eff1f51eafc749d0fffebdf8dbe6eab26c5997a..8d9206710d1d70a8afda491d57e363746231e387 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Interfaces with Git working copies.
+ *
+ * @group workingcopy
+ */
 class ArcanistGitAPI extends ArcanistRepositoryAPI {
 
   private $status;
index b3f80b15167a3ebeea28e7874df85fb141bd5e31..38193dac2d9168a13db17a947539fb1b17d25042 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Interfaces with Subversion working copies.
+ *
+ * @group workingcopy
+ */
 class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
 
   protected $svnStatus;
index cfc1b6f7865784be859e50d54a97e0b99ec08644..a8f5b41ddc21e9151d1777d120c5137276959464 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Manages unit test execution.
+ *
+ * @group unit
+ */
 abstract class ArcanistBaseUnitTestEngine {
 
   private $workingCopy;
index 41c9ca8d71b1be2b72be88aeb9c63c0a91d9a775..5c7118f076b685786bd8e5f66fcefaf571668441 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Very basic unit test engine which runs libphutil tests.
+ *
+ * @group unitrun
+ */
 class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
 
   public function run() {
index db3af08ca464711be35fec77c468c8a0339c8027..5c3689a9c02b8bf2aeabd60380d433322fa21868 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Very meta test for @{class:PhutilUnitTestEngine}.
+ *
+ * @group testcase
+ */
 class PhutilUnitTestEngineTestCase extends ArcanistPhutilTestCase {
 
   public function testPass() {
index 5ac268d3f59aeeb3fc1940ff6d1a82cca91ec757..6b2024f6f1dc867e9f7f53a153396d2478a4ab7a 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Base test case for the very simple libphutil test framework.
+ *
+ * @group unitrun
+ */
 abstract class ArcanistPhutilTestCase {
 
   private $runningTest;
index 2d267f43c127740e8abbcb09e667c52343591983..1c80ea4c06c15d821a8437ee479c50f7b9c07163 100644 (file)
@@ -16,4 +16,9 @@
  * limitations under the License.
  */
 
+/**
+ * Thrown to prematurely end test execution.
+ *
+ * @group unitrun
+ */
 class ArcanistPhutilTestTerminatedException extends Exception {}
index e3b9dcec027b9d05ee3c8d8d060b7cfb9340cb7f..001ad5849564cc83ec8ae89c01a31f24c91896e5 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Represents the outcome of running a unit test.
+ *
+ * @group unit
+ */
 class ArcanistUnitTestResult {
 
   const RESULT_PASS         = 'pass';
index 4c14013f38c41167e79f91e7a92dd3d82fad2afe..a8a49d44e8c03718d2bdfc9f2cfc7f551f9873d2 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Updates git commit messages after a revision is "Accepted".
+ *
+ * @group workflow
+ */
 class ArcanistAmendWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 410040ffeb26e45da77ff6a58384da119ede7fc1..8772422bb9e4605b134fd59940f981ca52f1d42d 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Implements a runnable command, like "arc diff" or "arc help".
+ *
+ * @group workflow
+ */
 class ArcanistBaseWorkflow {
 
   private $conduit;
index 7631df72f18e10e9e46aa0d51fa4d055b4fa6d7c..b5584bab4044f121f1bd8d2937dc2c00bbaa90ec 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Executes "svn commit" once a revision has been "Accepted".
+ *
+ * @group workflow
+ */
 class ArcanistCommitWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 5a4beedceca147746d04ce9d33950fc123fdf044..2774ce3bf2c3c4d9cb82d0d5802f993306376fc6 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Covers your professional reputation by blaming changes to locate reviewers.
+ *
+ * @group workflow
+ */
 class ArcanistCoverWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 1dfc9610fb29fb586977de519efc4c8017971b18..1b4bb42b5fd1b7fb2cb3aee26dc8358bc11e697b 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Sends changes from your working copy to Differential for code review.
+ *
+ * @group workflow
+ */
 class ArcanistDiffWorkflow extends ArcanistBaseWorkflow {
 
   private $hasWarnedExternals = false;
index b409a8604673d692d9fd96b6329e104ac0513d5e..eef575af1fae5e572c07974e7332da171c84bdbc 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Exports changes from Differential or the working copy to a file.
+ *
+ * @group workflow
+ */
 final class ArcanistExportWorkflow extends ArcanistBaseWorkflow {
 
   const SOURCE_LOCAL      = 'local';
index 72c2601adfd5ba1ae059ec3fa99549b90779b333..af648e76efaccdcb60179e2d8233f114ae9a4205 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Installable as a git pre-receive hook.
+ *
+ * @group workflow
+ */
 class ArcanistGitHookPreReceiveWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 7ebb9ac363f101489406b1a6afb0765b93f49fba..5d5d7760683a1d98c69b939beaa2ef82ab69bb4a 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Seduces the reader with majestic prose.
+ *
+ * @group workflow
+ */
 class ArcanistHelpWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index ceb96b95666e38619e98312ebcbcaae8fdd2a4a6..a6cc812afa978465d345e316b4bbcb65a46646fc 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Runs lint rules on changes.
+ *
+ * @group workflow
+ */
 class ArcanistLintWorkflow extends ArcanistBaseWorkflow {
 
   const RESULT_OKAY       = 0;
index 327cb45d2a3d9dae43fa2590107d11ceacad18b6..19312b24d95665fcaf58a1e7089ba431064f147f 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Lists open revisions in Differential.
+ *
+ * @group workflow
+ */
 class ArcanistListWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 6aa64a537ea777a9815575fa92420f1e454ae547..483de58e4dd91b60a58526daabb7e01ca78d0eb5 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Explicitly marks Differential revisions as "Committed".
+ *
+ * @group workflow
+ */
 class ArcanistMarkCommittedWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index e203df60895f92b13020ed0c1fa6ebee887293b5..241684d56970d16afb89f16faa47436eac91750a 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Applies changes from Differential or a file to the working copy.
+ *
+ * @group workflow
+ */
 final class ArcanistPatchWorkflow extends ArcanistBaseWorkflow {
 
   const SOURCE_BUNDLE     = 'bundle';
index b2973752d7b16c3b7ee89b1aa356112f2c1b940e..238e2dd7811f3953e52e59caa7166d4e5acccfae 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Powers shell-completion scripts.
+ *
+ * @group workflow
+ */
 class ArcanistShellCompleteWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 398920f654ab0fcf96bbed92c9352705521f5da0..6862092879f592a3f644d41823b9a0eb3ab0d5f4 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Installable as an SVN "pre-commit" hook.
+ *
+ * @group workflow
+ */
 class ArcanistSvnHookPreCommitWorkflow extends ArcanistBaseWorkflow {
 
   public function getCommandHelp() {
index 71488138939a0b5d1d7f4c51f0457477214270d4..307bc0ea0c88cb0de2f7248b84180ca7cecc63b9 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Runs unit tests which cover your changes.
+ *
+ * @group workflow
+ */
 class ArcanistUnitWorkflow extends ArcanistBaseWorkflow {
 
   const RESULT_OKAY     = 0;
index b408e2aee801238a19aa6232e36b314323c3df53..3b79182747c67b656b676743db54493d1d7e533c 100644 (file)
@@ -7,6 +7,7 @@
 
 
 phutil_require_module('arcanist', 'exception/usage/noengine');
+phutil_require_module('arcanist', 'repository/api/base');
 phutil_require_module('arcanist', 'unit/result');
 phutil_require_module('arcanist', 'workflow/base');
 
index fbde4ff699f38593f35047e883f5920810f61d7a..76992e9c054a06d6dda444de12de707594a5848e 100644 (file)
  * limitations under the License.
  */
 
+/**
+ * Interfaces with basic information about the working copy.
+ *
+ * @group workingcopy
+ */
 class ArcanistWorkingCopyIdentity {
 
   protected $projectConfig;