Skip to content

Commit

Permalink
chore(dev): Add note about generating licenses to CONTRIBUTING.md (#1…
Browse files Browse the repository at this point in the history
…7410)

* 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 <jesse.szwedko@datadoghq.com>

* PR feedback

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

* fix spelling

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>

---------

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko authored May 16, 2023
1 parent 0518176 commit 539f379
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1014,6 +1014,7 @@ rawconfig
rawstring
rbaz
rdkafka
rdparty
rdr
readnone
rebuffer
Expand Down
8 changes: 8 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Vector team member will find this document useful.
- [Flakey tests](#flakey-tests)
- [Test harness](#test-harness)
- [Deprecations](#deprecations)
- [Dependencies](#dependencies)
- [Next steps](#next-steps)
- [Legal](#legal)
- [Contributor License Agreement](#contributor-license-agreement)
Expand Down Expand Up @@ -184,6 +185,13 @@ any pull request with:

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

### Dependencies

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

## Next steps

As discussed in the [`README`](README.md), you should continue to the following
Expand Down
5 changes: 4 additions & 1 deletion vdev/src/commands/check/licenses.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ pub struct Cli {}

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

0 comments on commit 539f379

Please sign in to comment.