Skip to content

Commit

Permalink
chore(dev): Add note about generating licenses to CONTRIBUTING.md
Browse files Browse the repository at this point in the history
Also have the check command output how to fix it to guide contributors.

Signed-off-by: Jesse Szwedko <jesse.szwedko@datadoghq.com>
  • Loading branch information
jszwedko committed May 16, 2023
1 parent 0518176 commit 10095c3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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| {
eprintln!("Run `cargo vdev build licenses` to regenerate the file");
err
})
}
}

0 comments on commit 10095c3

Please sign in to comment.