argumentParser top-level property

ArgParser argumentParser
final

Script argument parser.

Implementation

final ArgParser argumentParser = ArgParser()
  ..addOption(
    _projectTypeArgument,
    defaultsTo: dartProjectType,
    allowed: supportedProjectType,
    allowedHelp: <String, String>{
      dartProjectType: 'Static analytics for dart project',
      flutterProjectType: 'Static analytics for flutter project',
    },
    help: 'Specify the type of project the script is run on',
  )
  ..addOption(
    _commitMessageRuleArgument,
    help: 'Specify the commit message rule',
    defaultsTo: GitHooksHandler.defaultCommitMessageRule,
  )
  ..addOption(
    _branchNamingRuleArgument,
    help: 'Specify the branch naming rule',
    defaultsTo: GitHooksHandler.defaultBranchNameRule,
  )
  ..addFlag(
    _codeStyleCheckEnabledArgument,
    defaultsTo: true,
    help: 'Enable code style check on pre-commit',
  )
  ..addFlag(
    _unitTestsEnabledArgument,
    defaultsTo: true,
    help: 'Enable unit tests on pre-commit',
  )
  ..addFlag(
    _integrationTestsEnabledArgument,
    hide: true,
    help: 'Enable integration tests on pre-commit',
  )
  ..addFlag(
    _uiTestsEnabledArgument,
    hide: true,
    help: 'Enable UI tests on pre-commit',
  )
  ..addFlag(
    helpArgument,
    help: 'Print help message',
  );