public function getArguments()

in src/workflow/ArcanistDiffWorkflow.php [83:466]


  public function getArguments() {
    $arguments = array(
      'message' => array(
        'short'       => 'm',
        'param'       => 'message',
        'help' => pht(
          'When updating a revision, use the specified message instead of '.
          'prompting.'),
      ),
      'message-file' => array(
        'short' => 'F',
        'param' => 'file',
        'paramtype' => 'file',
        'help' => pht(
          'When creating a revision, read revision information '.
          'from this file.'),
      ),
      'use-commit-message' => array(
        'supports' => array(
          'git',
          // TODO: Support mercurial.
        ),
        'short' => 'C',
        'param' => 'commit',
        'help' => pht('Read revision information from a specific commit.'),
        'conflicts' => array(
          'only'    => null,
          'preview' => null,
          'update'  => null,
        ),
      ),
      'edit' => array(
        'supports'    => array(
          'git',
          'hg',
        ),
        'nosupport'   => array(
          'svn' => pht('Edit revisions via the web interface when using SVN.'),
        ),
        'help' => pht(
          'When updating a revision under git, edit revision information '.
          'before updating.'),
      ),
      'raw' => array(
        'help' => pht(
          'Read diff from stdin, not from the working copy. This disables '.
          'many Arcanist/Phabricator features which depend on having access '.
          'to the working copy.'),
        'conflicts' => array(
          'less-context'        => null,
          'apply-patches'       => pht('%s disables lint.', '--raw'),
          'never-apply-patches' => pht('%s disables lint.', '--raw'),
          'advice'              => pht('%s disables lint.', '--raw'),
          'lintall'             => pht('%s disables lint.', '--raw'),

          'create'              => pht(
            '%s and %s both need stdin. Use %s.',
            '--raw',
            '--create',
            '--raw-command'),
          'edit'                => pht(
            '%s and %s both need stdin. Use %s.',
            '--raw',
            '--edit',
            '--raw-command'),
          'raw-command'         => null,
        ),
      ),
      'raw-command' => array(
        'param' => 'command',
        'help' => pht(
          'Generate diff by executing a specified command, not from the '.
          'working copy. This disables many Arcanist/Phabricator features '.
          'which depend on having access to the working copy.'),
        'conflicts' => array(
          'less-context'        => null,
          'apply-patches'       => pht('%s disables lint.', '--raw-command'),
          'never-apply-patches' => pht('%s disables lint.', '--raw-command'),
          'advice'              => pht('%s disables lint.', '--raw-command'),
          'lintall'             => pht('%s disables lint.', '--raw-command'),
        ),
      ),
      'create' => array(
        'help' => pht('Always create a new revision.'),
        'conflicts' => array(
          'edit'    => pht(
            '%s can not be used with %s.',
            '--create',
            '--edit'),
          'only'    => pht(
            '%s can not be used with %s.',
            '--create',
            '--only'),
          'preview' => pht(
            '%s can not be used with %s.',
            '--create',
            '--preview'),
          'update'  => pht(
            '%s can not be used with %s.',
            '--create',
            '--update'),
        ),
      ),
      'update' => array(
        'param' => 'revision_id',
        'help'  => pht('Always update a specific revision.'),
      ),
      'nounit' => array(
        'help' => pht('Do not run unit tests.'),
      ),
      'nocpr' => array(
        'help' => pht('Do not run CPR scripts. This will also be skipped '.
                      'on --nolint'),
      ),
      'autoland' => array(
        'help' => pht('Autoland this change (Skips interactive prompt)'),
      ),
      'noautoland' => array(
        'help' => pht('Do not autoland this change (Skips interactive prompt)'),
      ),
      'nolint' => array(
        'help' => pht('Do not run lint.'),
        'conflicts' => array(
          'lintall'   => pht('%s suppresses lint.', '--nolint'),
          'advice'    => pht('%s suppresses lint.', '--nolint'),
          'apply-patches' => pht('%s suppresses lint.', '--nolint'),
          'never-apply-patches' => pht('%s suppresses lint.', '--nolint'),
        ),
      ),
      'nointeractive' => array(
        'help' => pht('This is being run by a script, try to make progress '.
                      'through any non-critical user prompts.'),
      ),
      'only' => array(
        'help' => pht(
          'Only generate a diff, without running lint, unit tests, or other '.
          'auxiliary steps. See also %s.',
          '--preview'),
        'conflicts' => array(
          'preview'   => null,
          'message'   => pht('%s does not affect revisions.', '--only'),
          'edit'      => pht('%s does not affect revisions.', '--only'),
          'lintall'   => pht('%s suppresses lint.', '--only'),
          'advice'    => pht('%s suppresses lint.', '--only'),
          'apply-patches' => pht('%s suppresses lint.', '--only'),
          'never-apply-patches' => pht('%s suppresses lint.', '--only'),
        ),
      ),
      'preview' => array(
        'help' => pht(
          'Instead of creating or updating a revision, only create a diff, '.
          'which you may later attach to a revision. This still runs lint '.
          'unit tests. See also %s.',
          '--only'),
        'conflicts' => array(
          'only'      => null,
          'edit'      => pht('%s does affect revisions.', '--preview'),
          'message'   => pht('%s does not update any revision.', '--preview'),
        ),
      ),
      'plan-changes' => array(
        'help' => pht(
          'Create or update a revision without requesting a code review.'),
        'conflicts' => array(
          'only'     => pht('%s does not affect revisions.', '--only'),
          'preview'  => pht('%s does not affect revisions.', '--preview'),
        ),
      ),
      'encoding' => array(
        'param' => 'encoding',
        'help' => pht(
          'Attempt to convert non UTF-8 hunks into specified encoding.'),
      ),
      'allow-untracked' => array(
        'help' => pht('Skip checks for untracked files in the working copy.'),
      ),
      'excuse' => array(
        'param' => 'excuse',
        'help' => pht(
          'Provide a prepared in advance excuse for any lints/tests '.
          'shall they fail.'),
      ),
      'less-context' => array(
        'help' => pht(
          "Normally, files are diffed with full context: the entire file is ".
          "sent to Differential so reviewers can 'show more' and see it. If ".
          "you are making changes to very large files with tens of thousands ".
          "of lines, this may not work well. With this flag, a diff will ".
          "be created that has only a few lines of context."),
      ),
      'lintall' => array(
        'help' => pht(
          'Raise all lint warnings, not just those on lines you changed.'),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'advice' => array(
        'help' => pht(
          'Require excuse for lint advice in addition to lint warnings and '.
          'errors.'),
      ),
      'only-new' => array(
        'param' => 'bool',
        'help' => pht(
          'Display only lint messages not present in the original code.'),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'apply-patches' => array(
        'help' => pht(
          'Apply patches suggested by lint to the working copy without '.
          'prompting.'),
        'conflicts' => array(
          'never-apply-patches' => true,
        ),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'never-apply-patches' => array(
        'help' => pht('Never apply patches suggested by lint.'),
        'conflicts' => array(
          'apply-patches' => true,
        ),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'amend-all' => array(
        'help' => pht(
          'When linting git repositories, amend HEAD with all patches '.
          'suggested by lint without prompting.'),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'amend-autofixes' => array(
        'help' => pht(
          'When linting git repositories, amend HEAD with autofix '.
          'patches suggested by lint without prompting.'),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'add-all' => array(
        'short' => 'a',
        'help' => pht(
          'Automatically add all unstaged and uncommitted '.
          'files to the commit.'),
      ),
      'json' => array(
        'help' => pht(
          'Emit machine-readable JSON. EXPERIMENTAL! Probably does not work!'),
      ),
      'no-amend' => array(
        'help' => pht(
          'Never amend commits in the working copy with lint patches.'),
      ),
      'uncommitted' => array(
        'help' => pht('Suppress warning about uncommitted changes.'),
        'supports' => array(
          'hg',
        ),
      ),
      'verbatim' => array(
        'help' => pht(
          'When creating a revision, try to use the working copy commit '.
          'message verbatim, without prompting to edit it. When updating a '.
          'revision, update some fields from the local commit message.'),
        'supports' => array(
          'hg',
          'git',
        ),
        'conflicts' => array(
          'use-commit-message'  => true,
          'update'              => true,
          'only'                => true,
          'preview'             => true,
          'raw'                 => true,
          'raw-command'         => true,
          'message-file'        => true,
        ),
      ),
      'reviewers' => array(
        'param' => 'usernames',
        'help' => pht('When creating a revision, add reviewers.'),
        'conflicts' => array(
          'only'    => true,
          'preview' => true,
          'update'  => true,
        ),
      ),
      'cc' => array(
        'param' => 'usernames',
        'help' => pht('When creating a revision, add CCs.'),
        'conflicts' => array(
          'only'    => true,
          'preview' => true,
          'update'  => true,
        ),
      ),
      'skip-binaries' => array(
        'help'  => pht('Do not upload binaries (like images).'),
      ),
      'skip-staging' => array(
        'help' => pht('Do not copy changes to the staging area.'),
      ),
      'ignore-unsound-tests' => array(
        'help'  => pht('Ignore unsound test failures without prompting.'),
      ),
      'base' => array(
        'param' => 'rules',
        'help'  => pht('Additional rules for determining base revision.'),
        'nosupport' => array(
          'svn' => pht('Subversion does not use base commits.'),
        ),
        'supports' => array('git', 'hg'),
      ),
      'no-diff' => array(
        'help' => pht(
          'Only run lint and unit tests. Intended for internal use.'),
      ),
      'cache' => array(
        'param' => 'bool',
        'help' => pht(
          '%d to disable lint cache, %d to enable (default).',
          0,
          1),
        'passthru' => array(
          'lint' => true,
        ),
      ),
      'coverage' => array(
        'help' => pht('Always enable coverage information.'),
        'conflicts' => array(
          'no-coverage' => null,
        ),
        'passthru' => array(
          'unit' => true,
        ),
      ),
      'no-coverage' => array(
        'help' => pht('Always disable coverage information.'),
        'passthru' => array(
          'unit' => true,
        ),
      ),
      'browse' => array(
        'help' => pht(
          'After creating a diff or revision, open it in a web browser.'),
      ),
      // UBER CODE
      'nojira' => array(
        'help' => pht('Do not run Jira checks and suggestions.'),
      ),
      // UBER CODE END
      '*' => 'paths',
      'head' => array(
        'param' => 'commit',
        'help' => pht(
          'Specify the end of the commit range. This disables many '.
          'Arcanist/Phabricator features which depend on having access to '.
          'the working copy.'),
        'supports' => array('git'),
        'nosupport' => array(
          'svn' => pht('Subversion does not support commit ranges.'),
          'hg' => pht('Mercurial does not support %s yet.', '--head'),
        ),
        'conflicts' => array(
          'lintall'   => pht('%s suppresses lint.', '--head'),
          'advice'    => pht('%s suppresses lint.', '--head'),
        ),
      ),
      'automatically-convert-non-utf' => array(
        'help' => pht(
          'Automatically convert invalid UTF-8 sequences '.
          'to binary.'),
      ),
    );

    return $arguments;
  }