CheckCommand constructor
CheckCommand()
Implementation
CheckCommand()
: super(
'check',
'Run quality gates: analyze, tests and (optionally) a debug build.\n\n'
'Output of the commands is filtered from noise, '
'a short verdict is printed for each gate.\n\n'
'Exit code is 0 if all gates passed, '
'$kExitCodeAnalyzeFailed if analyze failed, '
'$kExitCodeTestFailed if tests failed, '
'$kExitCodeBuildFailed if build failed. '
'Other exit codes are used for errors.\n\n'
'Arguments after `--` are passed to the test command, '
'for example: alex code check -- test/some_test.dart',
) {
argParser
..addFlag(
_argAnalyzeOnly,
help: 'Run the analyze gate only.',
negatable: false,
)
..addFlag(
_argTestOnly,
help: 'Run the test gate only.',
negatable: false,
)
..addFlag(
_argBuild,
help: 'Also run a debug build of the platform target.',
negatable: false,
)
..addOption(
_argBuildTarget,
help: 'Target for the build gate. '
'By default the value of the `code.check.build_target` '
'config option is used, or `ios` on macOS and `apk` on '
'other platforms.',
allowed: _kBuildTargets,
)
..addFlag(
_argFailFast,
help: 'Stop on the first failed gate.',
negatable: false,
)
..addFormatOption()
..addVerboseFlutterCmdFlag();
}