mirror of
https://github.com/okhsunrog/vpnhide.git
synced 2026-04-29 23:22:00 +00:00
Six small review-list items rolled together — all CI/dev-tooling, no runtime behaviour change. #12 Dockerfile: pin Rust 1.95.0 and cargo-ndk 4.1.2 (was floating `stable` + latest cargo-ndk on monthly rebuild). Versions live in ENV vars to make the next bump a one-line edit. #13 Add shellcheck to lint job. SC2034/SC3043 excluded — Magisk reads SKIPUNZIP externally; Android's /system/bin/sh (mksh on Pixel) does support `local` despite POSIX. Verified locally that the 11 .sh files (module-side + dev tooling) pass. shellcheck baked into the CI image via apt; inline apt-get fallback covers the window before image rebuild. #24 ci.yml keystore.properties: replace heredoc with `printf '%s\n'`. Heredoc without single-quoted EOF re-expands $, backticks and backslashes in the password — printf takes the value verbatim. #31 scripts/release.py::patch_file now hard-fails when a regex pattern doesn't match (was silently leaving stale versions). #32 Split rotate_fragments_into_history into rotate + delete steps so release.py can save_json + write_md *before* unlinking the fragment files. If anything in between fails, fragments are still on disk and the run is retryable. #37 codegen-interfaces.py: emit `assert!(matches_vpn(…), msg)` / `assert!(!matches_vpn(…), msg)` instead of `assert_eq!(matches_vpn(…), true/false, msg)` — clippy::bool_assert_comparison was firing on every generated row under `cargo clippy --tests`. Both generated test modules regenerated. CI's clippy steps now also pass `--tests` so this class of regression is caught.
This commit is contained in:
parent
e57417b686
commit
0d4cf09866
7 changed files with 168 additions and 101 deletions
|
|
@ -461,9 +461,13 @@ def emit_rust(rules: list[Rule], tests: list[TestVector]) -> str:
|
|||
lines.append(" #[test]")
|
||||
lines.append(" fn generated_vectors() {")
|
||||
for t in tests:
|
||||
expected = "true" if t.is_vpn else "false"
|
||||
# `assert!(x, msg)` / `assert!(!x, msg)` instead of
|
||||
# `assert_eq!(x, true/false, msg)` — clippy::bool_assert_comparison
|
||||
# would otherwise fire on every generated row when contributors
|
||||
# run `cargo clippy --tests`.
|
||||
prefix = "" if t.is_vpn else "!"
|
||||
lines.append(
|
||||
f" assert_eq!(matches_vpn({rust_byte_lit(t.name)}), {expected}, "
|
||||
f" assert!({prefix}matches_vpn({rust_byte_lit(t.name)}), "
|
||||
f'"matches_vpn({t.name!r})");'
|
||||
)
|
||||
lines.append(" }")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue