Skip to content

Commit 95df427

Browse files
authored
docs: add license checking documentation to commands' overview (#867)
1 parent 7c213f2 commit 95df427

File tree

5 files changed

+58
-22
lines changed

5 files changed

+58
-22
lines changed

README.md

Lines changed: 37 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dart pub global run very_good_cli:very_good <command> <args>
4444

4545
### Commands ✨
4646

47-
### `very_good create`
47+
### [`very_good create`](https://cli.vgv.dev/docs/category/templates)
4848

4949
Create a very good project in seconds based on the provided template. Each template has a corresponding sub-command (e.g.,`very_good create flutter_app` will generate a Flutter starter app).
5050

@@ -114,7 +114,31 @@ very_good create docs_site my_docs_site
114114

115115
---
116116

117-
### `very_good packages get`
117+
### [`very_good test`](https://cli.vgv.dev/docs/commands/test)
118+
119+
Run tests in a Dart or Flutter project.
120+
121+
```sh
122+
# Run all tests
123+
very_good test
124+
125+
# Run all tests and collect coverage
126+
very_good test --coverage
127+
128+
# Run all tests and enforce 100% coverage
129+
very_good test --coverage --min-coverage 100
130+
131+
# Run only tests in ./some/other/directory
132+
very_good test ./some/other/directory
133+
134+
# Run tests recursively
135+
very_good test --recursive
136+
137+
# Run tests recursively (shorthand)
138+
very_good test -r
139+
```
140+
141+
### [`very_good packages get`](https://cli.vgv.dev/docs/commands/get_pkgs)
118142

119143
Get packages in a Dart or Flutter project.
120144

@@ -132,31 +156,25 @@ very_good packages get --recursive
132156
very_good packages get -r
133157
```
134158

135-
### `very_good test`
159+
### [`very_good packages check licenses`](https://cli.vgv.dev/docs/commands/check_licenses)
136160

137-
Run tests in a Dart or Flutter project.
161+
Check packages' licenses in a Dart or Flutter project.
138162

139163
```sh
140-
# Run all tests
141-
very_good test
164+
# Check licenses in the current directory
165+
very_good packages check licenses
142166

143-
# Run all tests and collect coverage
144-
very_good test --coverage
167+
# Only allow the use of certain licenses
168+
very_good packages check licenses --allowed="MIT,BSD-3-Clause,BSD-2-Clause,Apache-2.0"
145169

146-
# Run all tests and enforce 100% coverage
147-
very_good test --coverage --min-coverage 100
170+
# Deny the use of certain licenses
171+
very_good packages check licenses --forbidden="unknown"
148172

149-
# Run only tests in ./some/other/directory
150-
very_good test ./some/other/directory
151-
152-
# Run tests recursively
153-
very_good test --recursive
154-
155-
# Run tests recursively (shorthand)
156-
very_good test -r
173+
# Check licenses for certain dependencies types
174+
very_good packages check licenses --dependency-type="direct-main,transitive"
157175
```
158176

159-
### `very_good --help`
177+
### [`very_good --help`](https://cli.vgv.dev/docs/overview)
160178

161179
See the complete list of commands and usage information.
162180

lib/src/commands/packages/commands/check/commands/licenses.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class PackagesCheckLicensesCommand extends Command<int> {
8484

8585
@override
8686
String get description =>
87-
'Check packages licenses in a Dart or Flutter project.';
87+
"Check packages' licenses in a Dart or Flutter project.";
8888

8989
@override
9090
String get name => 'licenses';

site/docs/overview.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,24 @@ very_good packages get --recursive
8080
very_good packages get -r
8181
```
8282

83+
### `very_good packages check licenses`
84+
85+
Check packages' licenses in a Dart or Flutter project.
86+
87+
```sh
88+
# Check licenses in the current directory
89+
very_good packages check licenses
90+
91+
# Only allow the use of certain licenses
92+
very_good packages check licenses --allowed="MIT,BSD-3-Clause,BSD-2-Clause,Apache-2.0"
93+
94+
# Deny the use of certain licenses
95+
very_good packages check licenses --forbidden="unknown"
96+
97+
# Check licenses for certain dependencies types
98+
very_good packages check licenses --dependency-type="direct-main,transitive"
99+
```
100+
83101
### `very_good test`
84102

85103
Run tests in a Dart or Flutter project.

test/src/commands/packages/commands/check/check_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const _expectedPackagesCheckUsage = [
1414
'-h, --help Print this usage information.\n'
1515
'\n'
1616
'Available subcommands:\n'
17-
' licenses Check packages licenses in a Dart or Flutter project.\n'
17+
" licenses Check packages' licenses in a Dart or Flutter project.\n"
1818
'\n'
1919
'Run "very_good help" to see global options.'
2020
];

test/src/commands/packages/commands/check/commands/licenses_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class _MockProgress extends Mock implements Progress {}
1414

1515
const _expectedPackagesCheckLicensesUsage = [
1616
// ignore: no_adjacent_strings_in_list
17-
'Check packages licenses in a Dart or Flutter project.\n'
17+
"Check packages' licenses in a Dart or Flutter project.\n"
1818
'\n'
1919
'Usage: very_good packages check licenses [arguments]\n'
2020
'-h, --help Print this usage information.\n'

0 commit comments

Comments
 (0)