Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ class PackagesCheckLicensesCommand extends Command<int> {
_pubLicense = pubLicense ?? PubLicense() {
argParser
..addFlag(
'ignore-failures',
help: 'Ignore any license that failed to be retrieved.',
'ignore-retrieval-failures',
help: 'Disregard licenses that failed to be retrieved.',
negatable: false,
)
..addMultiOption(
Expand Down Expand Up @@ -90,7 +90,7 @@ class PackagesCheckLicensesCommand extends Command<int> {
usageException('Too many arguments');
}

final ignoreFailures = _argResults['ignore-failures'] as bool;
final ignoreFailures = _argResults['ignore-retrieval-failures'] as bool;
final dependencyTypes = _argResults['dependency-type'] as List<String>;
final allowedLicenses = _argResults['allowed'] as List<String>;
final forbiddenLicenses = _argResults['forbidden'] as List<String>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const _expectedPackagesCheckLicensesUsage = [
'\n'
'Usage: very_good packages check licenses [arguments]\n'
'-h, --help Print this usage information.\n'
''' --ignore-failures Ignore any license that failed to be retrieved.\n'''
''' --ignore-retrieval-failures Disregard licenses that failed to be retrieved.\n'''
''' --dependency-type The type of dependencies to check licenses for.\n'''
'\n'
''' [direct-dev] Check for direct dev dependencies.\n'''
''' [direct-main] (default) Check for direct main dependencies.\n'''
''' [transitive] Check for transitive dependencies.\n'''
'\n'
''' --allowed Whitelist of allowed licenses.\n'''
' --allowed Whitelist of allowed licenses.\n'
''' --forbidden Blacklist of not allowed licenses.\n'''
'\n'
'Run "very_good help" to see global options.'
Expand Down Expand Up @@ -161,8 +161,8 @@ void main() {
},
);

group('ignore-failures', () {
const ignoreFailuresArgument = '--ignore-failures';
group('ignore-retrieval-failures', () {
const ignoreRetrievalFailuresArgument = '--ignore-retrieval-failures';

group('reports licenses', () {
test(
Expand All @@ -183,7 +183,11 @@ void main() {
.thenThrow(exception);

final result = await commandRunner.run(
[...commandArguments, ignoreFailuresArgument, tempDirectory.path],
[
...commandArguments,
ignoreRetrievalFailuresArgument,
tempDirectory.path,
],
);

final errorMessage =
Expand Down Expand Up @@ -224,7 +228,11 @@ void main() {
.thenThrow(error);

final result = await commandRunner.run(
[...commandArguments, ignoreFailuresArgument, tempDirectory.path],
[
...commandArguments,
ignoreRetrievalFailuresArgument,
tempDirectory.path,
],
);

const errorMessage =
Expand Down Expand Up @@ -264,7 +272,11 @@ void main() {
when(() => pubLicense.getLicense(any())).thenThrow(error);

final result = await commandRunner.run(
[...commandArguments, ignoreFailuresArgument, tempDirectory.path],
[
...commandArguments,
ignoreRetrievalFailuresArgument,
tempDirectory.path,
],
);

final packageNames = verify(() => pubLicense.getLicense(captureAny()))
Expand Down