argumentParser top-level property

ArgParser argumentParser
final

DBStyleGuideChecker script argument parser.

Implementation

final ArgParser argumentParser = ArgParser()
  ..addOption(
    _codeStyleParameter,
    defaultsTo: 'analysis_options.yaml',
    help: 'Specify the code style guide to use',
  )
  ..addOption(
    _projectTypeParameter,
    defaultsTo: dartProjectType,
    allowed: supportedProjectType,
    allowedHelp: <String, String>{
      dartProjectType: 'Report code style violation for dart project',
      flutterProjectType: 'Report code style violation for flutter project',
    },
    help: 'Specify the type of project to analyze',
  )
  ..addOption(
    _reporterTypeParameter,
    defaultsTo: reporterOfTypeConsole,
    allowed: _supportedReporterType,
    allowedHelp: <String, String>{
      reporterOfTypeConsole: 'Report code style violation to the console',
      reporterOfTypeFile: 'Report code style violation to a file',
      reporterOfTypeGithub: 'Report code style violation to pull request',
      reporterOfTypeJson: 'Report code style violation to the console as json'
    },
    help: 'Specify how to report code style violations',
  )
  ..addOption(
    _reporterOutputFileParameter,
    help: 'Specify the file where the file code violation reporter will output',
  )
  ..addOption(
    _vcsUrlParameter,
    help: 'VCS repository to push code style violation report',
  )
  ..addOption(
    _vcsPullRequestIdParameter,
    help: 'VCS repository pull request id',
  )
  ..addOption(
    _vcsAccessTokenParameter,
    help: 'VCS repository access token',
  )
  ..addFlag(
    helpParameter,
    help: 'print help message',
  );