Skip to content

Commit

Permalink
Add License csv and tool (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkzou authored Feb 2, 2024
1 parent 0439980 commit a0d1537
Show file tree
Hide file tree
Showing 6 changed files with 154 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Rust
uses: dtolnay/rust-toolchain@master
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust-version }}
- uses: Swatinem/rust-cache@v2
- name: Test
run: cargo build

Expand Down
36 changes: 22 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,36 @@ repos:
hooks:
- id: generate
name: Generate
language: node
language: system
entry: bash -c "./generate.sh"
files: '^(\.generator/.*|\.pre-commit-config\.yaml|Makefile|\tests/scenarios/features/.*)'
pass_filenames: false
- id: lint
name: Lint
entry: cargo clippy
language: system
pass_filenames: false
verbose: true
- id: generator
name: generator
language: python
entry: bash -c "cd .generator && poetry install && poetry run python -m generator ./schemas/v1/openapi.yaml ./schemas/v2/openapi.yaml -o ../src/"
files: "^.generator/.*"
stages: [manual]
pass_filenames: false
additional_dependencies:
- "poetry"
- id: format
name: Format
language: rust
language: system
entry: cargo fmt
pass_filenames: false
stages: [manual]
- id: generator
name: generator
language: python
entry: bash -c "cd .generator && poetry install && poetry run python -m generator ./schemas/v1/openapi.yaml ./schemas/v2/openapi.yaml -o ../src/"
files: "^.generator/(config|schemas/v1|src|poetry.lock|pyproject.toml)"
- id: lint
name: Lint
entry: cargo check
language: system
pass_filenames: false
stages: [manual]
- id: license-check
name: Check license file
entry: bash -c "scripts/license-check.sh"
language: system
stages: ["manual"]
verbose: true
pass_filenames: false
additional_dependencies:
- "poetry"
120 changes: 120 additions & 0 deletions LICENSE-3rdparty.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
Component,Origin,License,Copyright
addr2line,https://github.com/gimli-rs/addr2line,Apache-2.0 OR MIT,The addr2line Authors
adler,https://github.com/jonas-schievink/adler,0BSD OR MIT OR Apache-2.0,Jonas Schievink <[email protected]>
android-tzdata,https://github.com/RumovZ/android-tzdata,MIT OR Apache-2.0,RumovZ
android_system_properties,https://github.com/nical/android_system_properties,MIT OR Apache-2.0,Nicolas Silva <[email protected]>
anyhow,https://github.com/dtolnay/anyhow,MIT OR Apache-2.0,David Tolnay <[email protected]>
async-trait,https://github.com/dtolnay/async-trait,MIT OR Apache-2.0,David Tolnay <[email protected]>
backtrace,https://github.com/rust-lang/backtrace-rs,MIT OR Apache-2.0,The Rust Project Developers
base64,https://github.com/marshallpierce/rust-base64,MIT OR Apache-2.0,"Alice Maz <[email protected]>, Marshall Pierce <[email protected]>"
bitflags,https://github.com/bitflags/bitflags,MIT OR Apache-2.0,The Rust Project Developers
bumpalo,https://github.com/fitzgen/bumpalo,MIT OR Apache-2.0,Nick Fitzgerald <[email protected]>
bytes,https://github.com/tokio-rs/bytes,MIT,"Carl Lerche <[email protected]>, Sean McArthur <[email protected]>"
cfg-if,https://github.com/alexcrichton/cfg-if,MIT OR Apache-2.0,Alex Crichton <[email protected]>
chrono,https://github.com/chronotope/chrono,MIT OR Apache-2.0,The chrono Authors
core-foundation,https://github.com/servo/core-foundation-rs,MIT OR Apache-2.0,The Servo Project Developers
darling,https://github.com/TedDriggs/darling,MIT,Ted Driggs <[email protected]>
encoding_rs,https://github.com/hsivonen/encoding_rs,(Apache-2.0 OR MIT) AND BSD-3-Clause,Henri Sivonen <[email protected]>
errno,https://github.com/lambda-fairy/rust-errno,MIT OR Apache-2.0,Chris Wong <[email protected]>
errno-dragonfly,https://github.com/mneumann/errno-dragonfly-rs,MIT,Michael Neumann <[email protected]>
fastrand,https://github.com/smol-rs/fastrand,Apache-2.0 OR MIT,Stjepan Glavina <[email protected]>
fnv,https://github.com/servo/rust-fnv,Apache-2.0 OR MIT,Alex Crichton <[email protected]>
foreign-types,https://github.com/sfackler/foreign-types,MIT OR Apache-2.0,Steven Fackler <[email protected]>
futures,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures Authors
futures-channel,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-channel Authors
futures-core,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-core Authors
futures-executor,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-executor Authors
futures-io,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-io Authors
futures-macro,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-macro Authors
futures-sink,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-sink Authors
futures-task,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-task Authors
futures-util,https://github.com/rust-lang/futures-rs,MIT OR Apache-2.0,The futures-util Authors
gimli,https://github.com/gimli-rs/gimli,MIT OR Apache-2.0,The gimli Authors
h2,https://github.com/hyperium/h2,MIT,"Carl Lerche <[email protected]>, Sean McArthur <[email protected]>"
hashbrown,https://github.com/rust-lang/hashbrown,MIT OR Apache-2.0,Amanieu d'Antras <[email protected]>
hermit-abi,https://github.com/hermitcore/hermit-rs,MIT OR Apache-2.0,Stefan Lankes
hex,https://github.com/KokaKiwi/rust-hex,MIT OR Apache-2.0,KokaKiwi <[email protected]>
http,https://github.com/hyperium/http,MIT OR Apache-2.0,"Alex Crichton <[email protected]>, Carl Lerche <[email protected]>, Sean McArthur <[email protected]>"
http-body,https://github.com/hyperium/http-body,MIT,"Carl Lerche <[email protected]>, Lucio Franco <[email protected]>, Sean McArthur <[email protected]>"
httparse,https://github.com/seanmonstar/httparse,MIT OR Apache-2.0,Sean McArthur <[email protected]>
httpdate,https://github.com/pyfisch/httpdate,MIT OR Apache-2.0,Pyfisch <[email protected]>
hyper,https://github.com/hyperium/hyper,MIT,Sean McArthur <[email protected]>
hyper-tls,https://github.com/hyperium/hyper-tls,MIT OR Apache-2.0,Sean McArthur <[email protected]>
iana-time-zone,https://github.com/strawlab/iana-time-zone,MIT OR Apache-2.0,"Andrew Straw <[email protected]>, René Kijewski <[email protected]>, Ryan Lopopolo <[email protected]>"
iana-time-zone-haiku,https://github.com/strawlab/iana-time-zone,MIT OR Apache-2.0,René Kijewski <[email protected]>
ident_case,https://github.com/TedDriggs/ident_case,MIT OR Apache-2.0,Ted Driggs <[email protected]>
indexmap,https://github.com/bluss/indexmap,Apache-2.0 OR MIT,The indexmap Authors
ipnet,https://github.com/krisprice/ipnet,MIT OR Apache-2.0,Kris Price <[email protected]>
itoa,https://github.com/dtolnay/itoa,MIT OR Apache-2.0,David Tolnay <[email protected]>
js-sys,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/js-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
lazy_static,https://github.com/rust-lang-nursery/lazy-static.rs,MIT OR Apache-2.0,Marvin Löbel <[email protected]>
libc,https://github.com/rust-lang/libc,MIT OR Apache-2.0,The Rust Project Developers
linux-raw-sys,https://github.com/sunfishcode/linux-raw-sys,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,Dan Gohman <[email protected]>
log,https://github.com/rust-lang/log,MIT OR Apache-2.0,The Rust Project Developers
memchr,https://github.com/BurntSushi/memchr,Unlicense OR MIT,"Andrew Gallant <[email protected]>, bluss"
mime,https://github.com/hyperium/mime,MIT OR Apache-2.0,Sean McArthur <[email protected]>
mime_guess,https://github.com/abonander/mime_guess,MIT,Austin Bonander <[email protected]>
miniz_oxide,https://github.com/Frommi/miniz_oxide/tree/master/miniz_oxide,MIT OR Zlib OR Apache-2.0,"Frommi <[email protected]>, oyvindln <[email protected]>"
mio,https://github.com/tokio-rs/mio,MIT,"Carl Lerche <[email protected]>, Thomas de Zeeuw <[email protected]>, Tokio Contributors <[email protected]>"
native-tls,https://github.com/sfackler/rust-native-tls,MIT OR Apache-2.0,Steven Fackler <[email protected]>
num-traits,https://github.com/rust-num/num-traits,MIT OR Apache-2.0,The Rust Project Developers
num_cpus,https://github.com/seanmonstar/num_cpus,MIT OR Apache-2.0,Sean McArthur <[email protected]>
object,https://github.com/gimli-rs/object,Apache-2.0 OR MIT,The object Authors
once_cell,https://github.com/matklad/once_cell,MIT OR Apache-2.0,Aleksey Kladov <[email protected]>
openssl,https://github.com/sfackler/rust-openssl,Apache-2.0,Steven Fackler <[email protected]>
openssl-macros,https://github.com/sfackler/rust-openssl,MIT OR Apache-2.0,The openssl-macros Authors
openssl-probe,https://github.com/alexcrichton/openssl-probe,MIT OR Apache-2.0,Alex Crichton <[email protected]>
openssl-sys,https://github.com/sfackler/rust-openssl,MIT,"Alex Crichton <[email protected]>, Steven Fackler <[email protected]>"
pin-project-lite,https://github.com/taiki-e/pin-project-lite,Apache-2.0 OR MIT,The pin-project-lite Authors
pin-utils,https://github.com/rust-lang-nursery/pin-utils,MIT OR Apache-2.0,Josef Brandl <[email protected]>
proc-macro2,https://github.com/dtolnay/proc-macro2,MIT OR Apache-2.0,"David Tolnay <[email protected]>, Alex Crichton <[email protected]>"
quote,https://github.com/dtolnay/quote,MIT OR Apache-2.0,David Tolnay <[email protected]>
redox_syscall,https://gitlab.redox-os.org/redox-os/syscall,MIT,Jeremy Soller <[email protected]>
reqwest,https://github.com/seanmonstar/reqwest,MIT OR Apache-2.0,Sean McArthur <[email protected]>
reqwest-middleware,https://github.com/TrueLayer/reqwest-middleware,MIT OR Apache-2.0,Rodrigo Gryzinski <[email protected]>
rustc-demangle,https://github.com/alexcrichton/rustc-demangle,MIT OR Apache-2.0,Alex Crichton <[email protected]>
rustix,https://github.com/bytecodealliance/rustix,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,"Dan Gohman <[email protected]>, Jakub Konka <[email protected]>"
ryu,https://github.com/dtolnay/ryu,Apache-2.0 OR BSL-1.0,David Tolnay <[email protected]>
schannel,https://github.com/steffengy/schannel-rs,MIT,"Steven Fackler <[email protected]>, Steffen Butzer <[email protected]>"
security-framework,https://github.com/kornelski/rust-security-framework,MIT OR Apache-2.0,"Steven Fackler <[email protected]>, Kornel <[email protected]>"
serde,https://github.com/serde-rs/serde,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
serde_derive,https://github.com/serde-rs/serde,MIT OR Apache-2.0,David Tolnay <[email protected]>
serde_json,https://github.com/serde-rs/json,MIT OR Apache-2.0,"Erick Tryzelaar <[email protected]>, David Tolnay <[email protected]>"
serde_repr,https://github.com/dtolnay/serde-repr,MIT OR Apache-2.0,David Tolnay <[email protected]>
serde_urlencoded,https://github.com/nox/serde_urlencoded,MIT OR Apache-2.0,Anthony Ramine <[email protected]>
serde_with,https://github.com/jonasbb/serde_with,MIT OR Apache-2.0,"Jonas Bushart, Marcin Kaźmierczak"
serde_with_macros,https://github.com/jonasbb/serde_with,MIT OR Apache-2.0,Jonas Bushart
slab,https://github.com/tokio-rs/slab,MIT,Carl Lerche <[email protected]>
socket2,https://github.com/rust-lang/socket2,MIT OR Apache-2.0,"Alex Crichton <[email protected]>, Thomas de Zeeuw <[email protected]>"
strsim,https://github.com/dguo/strsim-rs,MIT,Danny Guo <[email protected]>
syn,https://github.com/dtolnay/syn,MIT OR Apache-2.0,David Tolnay <[email protected]>
task-local-extensions,https://github.com/TrueLayer/task-local-extensions,MIT OR Apache-2.0,"Conrad Ludgate <[email protected]>, Rodrigo Gryzinski <[email protected]>"
tempfile,https://github.com/Stebalien/tempfile,MIT OR Apache-2.0,"Steven Allen <[email protected]>, The Rust Project Developers, Ashley Mannix <[email protected]>, Jason White <[email protected]>"
thiserror,https://github.com/dtolnay/thiserror,MIT OR Apache-2.0,David Tolnay <[email protected]>
time,https://github.com/time-rs/time,MIT OR Apache-2.0,"Jacob Pratt <[email protected]>, Time contributors"
tinyvec,https://github.com/Lokathor/tinyvec,Zlib OR Apache-2.0 OR MIT,Lokathor <[email protected]>
tinyvec_macros,https://github.com/Soveu/tinyvec_macros,MIT OR Apache-2.0 OR Zlib,Soveu <[email protected]>
tokio,https://github.com/tokio-rs/tokio,MIT,Tokio Contributors <[email protected]>
tokio-native-tls,https://github.com/tokio-rs/tls,MIT,Tokio Contributors <[email protected]>
tower-service,https://github.com/tower-rs/tower,MIT,Tower Maintainers <[email protected]>
tracing,https://github.com/tokio-rs/tracing,MIT,"Eliza Weisman <[email protected]>, Tokio Contributors <[email protected]>"
tracing-attributes,https://github.com/tokio-rs/tracing,MIT,"Tokio Contributors <[email protected]>, Eliza Weisman <[email protected]>, David Barsky <[email protected]>"
tracing-core,https://github.com/tokio-rs/tracing,MIT,Tokio Contributors <[email protected]>
try-lock,https://github.com/seanmonstar/try-lock,MIT,Sean McArthur <[email protected]>
unicase,https://github.com/seanmonstar/unicase,MIT OR Apache-2.0,Sean McArthur <[email protected]>
unicode-bidi,https://github.com/servo/unicode-bidi,MIT OR Apache-2.0,The Servo Project Developers
unicode-ident,https://github.com/dtolnay/unicode-ident,(MIT OR Apache-2.0) AND Unicode-DFS-2016,David Tolnay <[email protected]>
unicode-normalization,https://github.com/unicode-rs/unicode-normalization,MIT OR Apache-2.0,"kwantam <[email protected]>, Manish Goregaokar <[email protected]>"
url,https://github.com/servo/rust-url,MIT OR Apache-2.0,The rust-url developers
want,https://github.com/seanmonstar/want,MIT,Sean McArthur <[email protected]>
wasi,https://github.com/bytecodealliance/wasi,Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT,The Cranelift Project Developers
wasm-bindgen,https://github.com/rustwasm/wasm-bindgen,MIT OR Apache-2.0,The wasm-bindgen Developers
wasm-bindgen-backend,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/backend,MIT OR Apache-2.0,The wasm-bindgen Developers
wasm-bindgen-futures,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/futures,MIT OR Apache-2.0,The wasm-bindgen Developers
wasm-bindgen-macro,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro,MIT OR Apache-2.0,The wasm-bindgen Developers
wasm-bindgen-macro-support,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/macro-support,MIT OR Apache-2.0,The wasm-bindgen Developers
wasm-bindgen-shared,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/shared,MIT OR Apache-2.0,The wasm-bindgen Developers
web-sys,https://github.com/rustwasm/wasm-bindgen/tree/master/crates/web-sys,MIT OR Apache-2.0,The wasm-bindgen Developers
winapi,https://github.com/retep998/winapi-rs,MIT OR Apache-2.0,Peter Atashian <[email protected]>
windows,https://github.com/microsoft/windows-rs,MIT OR Apache-2.0,Microsoft
winreg,https://github.com/gentoo90/winreg-rs,MIT,Igor Shaula <[email protected]>
3 changes: 2 additions & 1 deletion generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ pre_commit_wrapper () {
rm -rf src/* examples/*
pre_commit_wrapper generator
pre_commit_wrapper format
pre_commit_wrapper lint
pre_commit_wrapper lint
pre_commit_wrapper license-check
2 changes: 2 additions & 0 deletions license-tool.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[overrides]
"openssl-macros" = { origin = "https://github.com/sfackler/rust-openssl" }
6 changes: 6 additions & 0 deletions scripts/license-check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cargo install --quiet dd-rust-license-tool
dd-rust-license-tool check
if [ $? -ne 0 ]; then
echo "Run 'dd-rust-license-tool write' to regenerate license csv file."
fi
exit 0

0 comments on commit a0d1537

Please sign in to comment.