Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ members = [
"fuzz",
"logger-cli",
]
exclude = ["tools/dylints"]
resolver = "2"

[workspace.dependencies]
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ setup:
clippy: setup
ci/check_license.sh
SKIP_PROTO_GEN=1 SKIP_FILE_GEN=1 cargo clippy --workspace --bins --examples --tests -- --no-deps
$(MAKE) dylint

.PHONY: dylint
dylint:
command -v cargo-dylint >/dev/null || cargo install cargo-dylint --version 6.0.3 --locked
command -v dylint-link >/dev/null || cargo install dylint-link --version 6.0.3 --locked
cargo dylint --all -- --workspace --all-targets

# Leaving the below loop around to help with debugging flakes if needed.
.PHONY: test
Expand Down
6 changes: 5 additions & 1 deletion ci/license_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
'./fuzz/corpus/',
'./proto/',
'./target/',
'./tools/dylints/target/',
'./thirdparty/',
)

Expand Down Expand Up @@ -50,7 +51,10 @@ def check_file(file_path: str):

if (file_path.endswith('Cargo.toml') and
not file_path == './Cargo.toml' and
not 'license-file = "../LICENSE"' in content):
'[package]' in content and
not ('license-file = "../LICENSE"' in content or
(file_path.startswith('./tools/dylints/') and
'license-file = "../../../LICENSE"' in content))):
raise Exception(
f'license-file = "../LICENSE" not found in {file_path}')

Expand Down
2 changes: 2 additions & 0 deletions dylint.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[workspace.metadata.dylint]
libraries = [{ path = "tools/dylints", pattern = "mutex_lock_must_unwrap" }]
Loading
Loading