Skip to content

Commit 539f379

Browse files
authored
chore(dev): Add note about generating licenses to CONTRIBUTING.md (#17410)
* chore(dev): Add note about generating licenses to CONTRIBUTING.md Also have the check command output how to fix it to guide contributors. Signed-off-by: Jesse Szwedko <[email protected]> * PR feedback Signed-off-by: Jesse Szwedko <[email protected]> * fix spelling Signed-off-by: Jesse Szwedko <[email protected]> --------- Signed-off-by: Jesse Szwedko <[email protected]>
1 parent 0518176 commit 539f379

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.github/actions/spelling/expect.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1014,6 +1014,7 @@ rawconfig
10141014
rawstring
10151015
rbaz
10161016
rdkafka
1017+
rdparty
10171018
rdr
10181019
readnone
10191020
rebuffer

docs/CONTRIBUTING.md

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ Vector team member will find this document useful.
2525
- [Flakey tests](#flakey-tests)
2626
- [Test harness](#test-harness)
2727
- [Deprecations](#deprecations)
28+
- [Dependencies](#dependencies)
2829
- [Next steps](#next-steps)
2930
- [Legal](#legal)
3031
- [Contributor License Agreement](#contributor-license-agreement)
@@ -184,6 +185,13 @@ any pull request with:
184185

185186
When deprecating functionality in Vector, see [DEPRECATION.md](DEPRECATION.md).
186187

188+
### Dependencies
189+
190+
When adding, modifying, or removing a dependency in Vector you may find that you need to update the
191+
inventory of third-party licenses maintained in `LICENSE-3rdparty.csv`. This file is generated using
192+
[rust-license-tool](https://github.com/DataDog/rust-license-tool.git) and can be updated using
193+
`cargo vdev build licenses`.
194+
187195
## Next steps
188196

189197
As discussed in the [`README`](README.md), you should continue to the following

vdev/src/commands/check/licenses.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ pub struct Cli {}
99

1010
impl Cli {
1111
pub fn exec(self) -> Result<()> {
12-
app::exec("rust-license-tool", ["check"], true)
12+
app::exec("rust-license-tool", ["check"], true).map_err(|err| {
13+
info!("Run `cargo vdev build licenses` to regenerate the file");
14+
err
15+
})
1316
}
1417
}

0 commit comments

Comments
 (0)