Skip to content

Commit 2656d7b

Browse files
committed
chore(backward): run custom tfhe-rs lints in the ci
1 parent ab63dd6 commit 2656d7b

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
@@ -148,6 +148,11 @@ install_tarpaulin: install_rs_build_toolchain
148148
cargo $(CARGO_RS_BUILD_TOOLCHAIN) install cargo-tarpaulin --locked || \
149149
( echo "Unable to install cargo tarpaulin, unknown error." && exit 1 )
150150

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

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

10561066
.PHONY: pcc # pcc stands for pre commit checks (except GPU)
10571067
pcc: no_tfhe_typo no_dbg_log check_fmt lint_doc check_md_docs_are_tested check_intra_md_links \
1058-
clippy_all check_compile_tests
1068+
clippy_all tfhe_lints check_compile_tests
10591069

10601070
.PHONY: pcc_gpu # pcc stands for pre commit checks for GPU compilation
10611071
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)