Home

Arcanist Technical Documentation

Updated
Wed, Feb 25, 1:01 AM

Technical documentation for developing Arcanist.

Free Radicals

ArcanistAliasWorkflowClassManages aliases for commands with options.ArcanistAmendWorkflowClassSynchronizes commit messages from Differential.ArcanistAnoidWorkflowClassArcanistBackoutWorkflowClassRuns git revert and assigns a high priority task to original author.ArcanistBaseCommitParserClassArcanistBaseCommitParserTestCaseClassArcanistBaseUnitTestEngineClassNOTE: Do not extend from this class, extend from @{class:ArcanistUnitTestEngine} instead.ArcanistBaseWorkflowClassNOTE: Do not extend from this class, extend from @{class:ArcanistWorkflow} instead.ArcanistBaseXHPASTLinterClassArcanistBookmarkWorkflowClassAlias for `arc feature`.ArcanistBranchWorkflowClassAlias for `arc feature`.ArcanistBritishTestCaseClassArcanistBrowseWorkflowClassBrowse files or objects in the Phabricator web interface.ArcanistBundleClassConverts changesets between different formats.ArcanistBundleTestCaseClassArcanistCallConduitWorkflowClassProvides command-line access to the Conduit API.ArcanistCapabilityNotSupportedExceptionClassArcanistCheckstyleXMLLintRendererClassShows lint messages to the user.ArcanistChmodLinterClassEnsures that files are not executable unless they are either binary or contain a shebang.ArcanistChmodLinterTestCaseClassArcanistCloseRevisionWorkflowClassExplicitly closes Differential revisions.ArcanistCloseWorkflowClassClose a task.ArcanistClosureLinterClassUses `gjslint` to detect errors and potential problems in JavaScript code.ArcanistClosureLinterTestCaseClassArcanistCoffeeLintLinterClassArcanistCoffeeLintLinterTestCaseClassArcanistCommentRemoverClassArcanistCommentRemoverTestCaseClassArcanistCommitLinterClassArcanistCommitLinterTestCaseClassArcanistCommitWorkflowClassExecutes "svn commit" once a revision has been "Accepted".ArcanistCompilerLintRendererClassShows lint messages to the user.ArcanistComprehensiveLintEngineClassBasic lint engine which just applies several linters based on the file types.ArcanistConduitLinterClassImplements linting via Conduit RPC call.ArcanistConfigurationClassRuntime 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.ArcanistConfigurationDrivenLintEngineClassArcanistConfigurationManagerClassThis class holds everything related to configuration and configuration files.ArcanistConsoleLintRendererClassShows lint messages to the user.ArcanistCoverWorkflowClassCovers your professional reputation by blaming changes to locate reviewers.ArcanistCppcheckLinterClassUses Cppcheck to do basic checks in a C++ file.ArcanistCppcheckLinterTestCaseClassArcanistCpplintLinterClassUses Google's `cpplint.py` to check code.ArcanistCpplintLinterTestCaseClassArcanistCSharpLinterClassC# linter for Arcanist.ArcanistCSSLintLinterClassUses "CSS Lint" to detect checkstyle errors in CSS code.ArcanistCSSLintLinterTestCaseClassArcanistDiffChangeClassRepresents a change to an individual path.ArcanistDiffChangeTypeClassDefines constants for file types and operations in changesets.ArcanistDifferentialCommitMessageClassRepresents a parsed commit message.ArcanistDifferentialCommitMessageParserExceptionClassThrown when a commit message isn't parseable.ArcanistDifferentialDependencyGraphClassArcanistDifferentialRevisionHashClassArcanistDifferentialRevisionStatusClassArcanistDiffHunkClassRepresents a contiguous set of added and removed lines in a diff.ArcanistDiffParserClassParses diffs from a working copy.ArcanistDiffParserTestCaseClassTest cases for @{class:ArcanistDiffParser}.ArcanistDiffUtilsClassDumping ground for diff- and diff-algorithm-related miscellany.ArcanistDiffUtilsTestCaseClassTest cases for @{class:ArcanistDiffUtils}.ArcanistDiffWorkflowClassSends changes from your working copy to Differential for code review.ArcanistDownloadWorkflowClassDownload a file from Phabricator.ArcanistEventTypeClassArcanistExportWorkflowClassExports changes from Differential or the working copy to a file.ArcanistExternalLinterClassBase class for linters which operate by invoking an external program and parsing results.ArcanistExternalLinterTestCaseClassArcanistFeatureWorkflowClassDisplays user's Git branches or Mercurial bookmarks.ArcanistFilenameLinterClassStifles creativity in choosing imaginative file names.ArcanistFilenameLinterTestCaseClassArcanistFlagWorkflowClassArcanistFlake8LinterClassUses "flake8" to detect various errors in Python code. Requires version 1.7.0 or newer of flake8.ArcanistFlake8LinterTestCaseClassArcanistFutureLinterClassArcanistGeneratedLinterClassStops other linters from running on generated code.ArcanistGeneratedLinterTestCaseClassArcanistGetConfigWorkflowClassRead configuration settings.ArcanistGitAPIClassInterfaces with Git working copies.ArcanistGitHookPreReceiveWorkflowClassInstallable as a git pre-receive hook.ArcanistGoLintLinterClassArcanistGoLintLinterTestCaseClassArcanistGoTestResultParserClassGo Test Result Parsing utilityArcanistGoTestResultParserTestCaseClassTest for @{class:ArcanistGoTestResultParser}.ArcanistHelpWorkflowClassSeduces the reader with majestic prose.ArcanistHgClientChannelClassChannel to a Mercurial "cmdserver" client. For a detailed description of the "cmdserver" protocol, see @{class:ArcanistHgServerChannel}. This channel implements the other half of the protocol: it decodes messages from the client and encodes messages from the server.ArcanistHgProxyClientClassClient for an @{class:ArcanistHgProxyServer}. This client talks to a PHP process which serves as a proxy in front of a Mercurial server process. The PHP proxy allows multiple clients to use the same Mercurial server.ArcanistHgProxyServerClassServer which @{class:ArcanistHgProxyClient} clients connect to. This server binds to a Mercurial working copy and creates a Mercurial process and a unix domain socket in that working copy. It listens for connections on the socket, reads commands from them, and forwards their requests to the Mercurial process. It then returns responses to the original clients.ArcanistHgServerChannelClassChannel to a Mercurial "cmdserver" server. Messages sent to the server look like this:ArcanistHLintLinterClassCalls `hlint` and parses its results.ArcanistHLintLinterTestCaseClassArcanistHookAPIClassAPI while running in the context of a commit hook.ArcanistInstallCertificateWorkflowClassInstalls arcanist certificates.ArcanistJscsLinterClassArcanistJscsLinterTestCaseClassArcanistJSHintLinterClassUses JSHint to detect errors and potential problems in JavaScript code.ArcanistJSHintLinterTestCaseClassArcanistJSONLinterClassA linter for JSON files.ArcanistJSONLinterTestCaseClassArcanistJSONLintLinterClassA linter for JSON files.ArcanistJSONLintLinterTestCaseClassArcanistJSONLintRendererClassShows lint messages to the user.ArcanistLandWorkflowClassLands a branch by rebasing, merging and amending it.ArcanistLesscLinterClassA linter for LESSCSS files.ArcanistLesscLinterTestCaseClassArcanistLiberateWorkflowClassCreate and update libphutil libraries.ArcanistLibraryTestCaseClassArcanistLintEngineClassManages lint execution. When you run 'arc lint' or 'arc diff', Arcanist attempts to run lint rules using a lint engine.ArcanistLinterClassImplements lint rules, like syntax checks for a specific language.ArcanistLintersWorkflowClassList available linters.ArcanistLinterTestCaseClassFacilitates implementation of test cases for @{class:ArcanistLinter}s.ArcanistLintMessageClassMessage emitted by a linter, like an error or warning.ArcanistLintPatcherClassApplies lint patches to the working copy.ArcanistLintRendererClassShows lint messages to the user.ArcanistLintResultClassA group of @{class:ArcanistLintMessage}s that apply to a file.ArcanistLintSeverityClassDescribes the severity of an @{class:ArcanistLintMessage}.ArcanistLintWorkflowClassRuns lint rules on changes.ArcanistListWorkflowClassLists open revisions in Differential.ArcanistMercurialAPIClassInterfaces with the Mercurial working copies.ArcanistMercurialParserClassParses output from various "hg" commands into structured data. This class provides low-level APIs for reading "hg" output.ArcanistMercurialParserTestCaseClassArcanistMergeConflictLinterClassChecks files for unresolved merge conflicts.ArcanistMergeConflictLinterTestCaseClassArcanistMissingLinterExceptionClassArcanistNoEffectExceptionClassThrown when lint or unit tests have no effect, i.e. no paths are affected by any linter or no unit tests provide coverage.ArcanistNoEngineExceptionClassThrown when no engine is configured for linting or running unit tests.ArcanistNoLintLinterClassStops other linters from running on code marked with a nolint annotation.ArcanistNoLintLinterTestCaseClassArcanistNoneLintRendererClassArcanistPasteWorkflowClassUpload a chunk of text to the Paste application, or download one.ArcanistPatchWorkflowClassApplies changes from Differential or a file to the working copy.ArcanistPEP8LinterClassUses "pep8.py" to enforce PEP8 rules for Python.ArcanistPEP8LinterTestCaseClassArcanistPhpcsLinterClassUses "PHP_CodeSniffer" to detect checkstyle errors in PHP code.ArcanistPhpcsLinterTestCaseClassArcanistPhpLinterClassUses "php -l" to detect syntax errors in PHP code.ArcanistPhpLinterTestCaseClassArcanistPhpunitTestResultParserClassPHPUnit Result Parsing utilityArcanistPhrequentWorkflowClassBase workflow for Phrequent workflows.ArcanistPhutilLibraryLinterClassApplies lint rules for Phutil libraries. We enforce three rules:ArcanistPhutilTestCaseClassBase test case for the very simple libphutil test framework.ArcanistPhutilTestCaseTestCaseClassTest for @{class:PhutilUnitTestEngineTestCase}.ArcanistPhutilTestSkippedExceptionClassThrown to skip test execution.ArcanistPhutilTestTerminatedExceptionClassThrown to prematurely end test execution.ArcanistPhutilXHPASTLinterClassArcanistPhutilXHPASTLinterTestCaseClassArcanistPuppetLintLinterClassA linter for Puppet files.ArcanistPuppetLintLinterTestCaseClassArcanistPyFlakesLinterClassUses "PyFlakes" to detect various errors in Python code.ArcanistPyFlakesLinterTestCaseClassArcanistPyLintLinterClassUses "PyLint" to detect various errors in Python code. To use this linter, you must install pylint and configure which codes you want to be reported as errors, warnings and advice.ArcanistPyLintLinterTestCaseClassArcanistRepositoryAPIClassInterfaces with the VCS in the working copy.ArcanistRepositoryAPIMiscTestCaseClassArcanistRepositoryAPIStateTestCaseClassArcanistRevertWorkflowClassRedirects to `arc backout` workflow.ArcanistRubyLinterClassUses `ruby` to detect various errors in Ruby code.ArcanistRubyLinterTestCaseClassArcanistScriptAndRegexLinterClassSimple glue linter which runs some script on each path, and then uses a regex to parse lint messages from the script's output. (This linter uses a script and a regex to interpret the results of some real linter, it does not itself lint both scripts and regexes).ArcanistSetConfigWorkflowClassWrite configuration settings.ArcanistSettingsClassArcanistShellCompleteWorkflowClassPowers shell-completion scripts.ArcanistSingleLintEngineClassRun a single linter on every path unconditionally. This is a glue engine for linters like @{class:ArcanistScriptAndRegexLinter}, if you are averse to writing a phutil library. Your linter will receive every path, including paths which have been moved or deleted.ArcanistSpellingLinterClassEnforces basic spelling. Spelling inside code is actually pretty hard to get right without false positives. I take a conservative approach and just use a blacklisted set of words that are commonly spelled incorrectly.ArcanistSpellingLinterTestCaseClassArcanistStartWorkflowClassStart time tracking on an object.ArcanistStopWorkflowClassStop time tracking on an object.ArcanistSubversionAPIClassInterfaces with Subversion working copies.ArcanistSubversionHookAPIClassInterfaces with Subversion while running as a commit hook.ArcanistSummaryLintRendererClassShows lint messages to the user.ArcanistSvnHookPreCommitWorkflowClassInstallable as an SVN "pre-commit" hook.ArcanistTasksWorkflowClassDisplays User Tasks.ArcanistTestCaseClassArcanistTestResultParserClassAbstract base class for test result parsers.ArcanistTestXHPASTLintSwitchHookClassArcanistTextLinterClassEnforces basic text file rules.ArcanistTextLinterTestCaseClassArcanistTimeWorkflowClassShow time being tracked in Phrequent.ArcanistTodoWorkflowClassQuickly create a task.ArcanistUncommittedChangesExceptionClassArcanistUnitConsoleRendererClassArcanistUnitRendererClassArcanistUnitTestableLintEngineClassLint engine for use in constructing test cases. See @{class:ArcanistLinterTestCase}.ArcanistUnitTestEngineClassManages unit test execution.ArcanistUnitTestResultClassRepresents the outcome of running a unit test.ArcanistUnitWorkflowClassRuns unit tests which cover your changes.ArcanistUpgradeWorkflowClassUpgrade arcanist itself.ArcanistUploadWorkflowClassUpload a file to Phabricator.ArcanistUsageExceptionClassThrown when there is a problem with how a user is invoking a command, rather than a technical problem.ArcanistUSEnglishTranslationClassArcanistUserAbortExceptionClassThrown when the user chooses not to continue when warned that they're about to do something dangerous.ArcanistVersionWorkflowClassDisplay the current version of Arcanist.ArcanistWhichWorkflowClassShow which revision or revisions are in the working copy.ArcanistWorkflowClassImplements a runnable command, like "arc diff" or "arc help".ArcanistWorkingCopyIdentityClassInterfaces with basic information about the working copy.ArcanistXHPASTLinterClassUses XHPAST to apply lint rules to PHP.ArcanistXHPASTLinterTestCaseClassArcanistXHPASTLintNamingHookClassYou can extend this class and set `xhpast.naminghook` in your `.arclint` to have an opportunity to override lint results for symbol names.ArcanistXHPASTLintNamingHookTestCaseClassTest cases for @{class:ArcanistXHPASTLintNamingHook}.ArcanistXHPASTLintSwitchHookClassYou can extend this class and set `xhpast.switchhook` in your `.arclint` to have an opportunity to override results for linting `switch` statements.ArcanistXMLLinterClassA linter which uses [[http://php.net/simplexml | SimpleXML]] to detect errors and potential problems in XML files.ArcanistXMLLinterTestCaseClassTest cases were mostly taken from https://git.gnome.org/browse/libxml2/tree/test.ArcanistXUnitTestResultParserClassParser for JUnit, NUnit, etc results formatComprehensiveLintEngineClassCSharpToolsTestEngineClassUses cscover (http://github.com/hach-que/cstools) to report code coverage.NoseTestEngineClassVery basic 'nose' unit test engine wrapper.PhpunitTestEngineClassPHPUnit wrapper.PhpunitTestEngineTestCaseClassTests for @{class:PhpunitTestEngine}.PhutilUnitTestEngineClassVery basic unit test engine which runs libphutil tests.PhutilUnitTestEngineTestCaseClassVery meta test for @{class:PhutilUnitTestEngine}.PytestTestEngineClassVery basic 'py.test' unit test engine wrapper.XUnitTestEngineClassUses xUnit (http://xunit.codeplex.com/) to test C# code.XUnitTestResultParserTestCaseClassTest for @{class:ArcanistXUnitTestResultParser}.
Column Prototype
This is a very early prototype of a persistent column. It is not expected to work yet, and leaving it open will activate other new features which will break things. Press "\" (backslash) on your keyboard to close it now.