Closed Lynskylate closed 3 weeks ago
You mean adding a github workflow and running a script with lint?
# rs_lint.py
def _run_rust():
logging.info("Executing rust tests")
_cd_project_subdir("rust")
cmds = (
"cargo doc --no-deps --document-private-items --all-features --open",
"cargo fmt --all -- --check",
"cargo fmt --all",
"cargo clippy --workspace --all-features --all-targets -- -D warnings",
"cargo doc",
"cargo build --all-features --all-targets",
"cargo test",
"cargo clean",
)
for cmd in cmds:
_exec_cmd(cmd)
logging.info("Executing rust tests succeeds")
lint.yaml
。。。
lint:
name: Code Style Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check code style
run: ./ci/rs_lint.sh
Why do you need it?
The number of Rust plugins is still limited. To ensure the quality moving forward, we need to add basic linting.
How could it be?
Add
cargo fmt
andcargo clippy
check for the rust plugin code.For the plugin wrapper, we also need add fuzz test