Skip to content

Commit b018218

Browse files
committed
chore(backward): run custom tfhe-rs lints in the ci
1 parent 0a9fcbe commit b018218

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

Makefile

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@ install_tarpaulin: install_rs_build_toolchain
149149
cargo $(CARGO_RS_BUILD_TOOLCHAIN) install cargo-tarpaulin --locked || \
150150
( echo "Unable to install cargo tarpaulin, unknown error." && exit 1 )
151151

152+
.PHONY: install_tfhe_lints # Install custom tfhe-rs lints
153+
install_tfhe_lints:
154+
(cd utils/cargo-tfhe-lints-inner && cargo install --path .) && \
155+
cd utils/cargo-tfhe-lints && cargo install --path .
156+
152157
.PHONY: check_linelint_installed # Check if linelint newline linter is installed
153158
check_linelint_installed:
154159
@printf "\n" | linelint - > /dev/null 2>&1 || \
@@ -331,6 +336,11 @@ clippy_cuda_backend: install_rs_check_toolchain
331336
RUSTFLAGS="$(RUSTFLAGS)" cargo "$(CARGO_RS_CHECK_TOOLCHAIN)" clippy --all-targets \
332337
-p tfhe-cuda-backend -- --no-deps -D warnings
333338

339+
.PHONY: tfhe_lints # Run custom tfhe-rs lints
340+
tfhe_lints: install_tfhe_lints
341+
cd tfhe && RUSTFLAGS="$(RUSTFLAGS)" cargo tfhe-lints \
342+
--features=$(TARGET_ARCH_FEATURE),boolean,shortint,integer -- -D warnings
343+
334344
.PHONY: build_core # Build core_crypto without experimental features
335345
build_core: install_rs_build_toolchain install_rs_check_toolchain
336346
RUSTFLAGS="$(RUSTFLAGS)" cargo $(CARGO_RS_BUILD_TOOLCHAIN) build --profile $(CARGO_PROFILE) \
@@ -1068,7 +1078,7 @@ sha256_bool: install_rs_check_toolchain
10681078

10691079
.PHONY: pcc # pcc stands for pre commit checks (except GPU)
10701080
pcc: no_tfhe_typo no_dbg_log check_fmt lint_doc check_md_docs_are_tested check_intra_md_links \
1071-
clippy_all check_compile_tests
1081+
clippy_all tfhe_lints check_compile_tests
10721082

10731083
.PHONY: pcc_gpu # pcc stands for pre commit checks for GPU compilation
10741084
pcc_gpu: clippy_gpu clippy_cuda_backend check_compile_tests_benches_gpu

tfhe/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,4 +329,5 @@ crate-type = ["lib", "staticlib", "cdylib"]
329329
unexpected_cfgs = { level = "warn", check-cfg = [
330330
'cfg(bench)',
331331
'cfg(tarpaulin)',
332+
'cfg(tfhe_lints)'
332333
] }

0 commit comments

Comments
 (0)