DemesneGH opened a new issue, #222:
URL: https://github.com/apache/incubator-teaclave-trustzone-sdk/issues/222
## Plan
- Add a `clippy` command in the Makefile and make it mandatory for each
build, for both `no-std` and `std` targets.
Example for `std`:
`xargo clippy --target aarch64-unknown-optee -- -D clippy::all`
- Fix all existing `clippy` errors in current codebase, e.g. in
`user_ta_header.rs`:
```
error: unsafe function's docs miss `# Safety` section
|
31 | pub unsafe extern "C" fn tahead_get_trace_level() -> c_int {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#missing_safety_doc
= note: `-D clippy::missing-safety-doc` implied by `-D clippy::all`
= help: to override `-D clippy::all` add
`#[allow(clippy::missing_safety_doc)]`
error: unneeded `return` statement
|
33 | return trace_level;
| ^^^^^^^^^^^^^^^^^^
|
= help: for further information visit
https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `-D clippy::needless-return` implied by `-D clippy::all`
= help: to override `-D clippy::all` add
`#[allow(clippy::needless_return)]`
help: remove `return`
|
33 - return trace_level;
33 + trace_level
|
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]