Consider adding clippy and fmt steps to CI on push.
There is a long list of warring, some are a bit noisy and other might point to a potential issues.
I can take this if needed.
Some examples:
warning: this `if` has identical blocks
--> src/cmd/include.rs:290:52
|
290 | let iostandard = if port_name == "clk" { "LVCMOS33" } else { "LVCMOS33" };
| ^^^^^^^^^^^^^^
|
note: same as this
--> src/cmd/include.rs:290:72
|
290 | let iostandard = if port_name == "clk" { "LVCMOS33" } else { "LVCMOS33" };
| ^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: `#[warn(clippy::if_same_then_else)]` on by default
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
--> src/cmd/include.rs:549:31
|
549 | fn update_lockfile(full_path: &PathBuf, url: &str, contents: &str, visited: &HashSet<String>, is_top_module: bool) -> Result<()> {
| ^^^^^^^^ help: change this to: `&Path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
warning: useless use of `format!`
--> src/cmd/include.rs:300:31
|
300 | xdc_content.push_str(&format!("create_clock -period 10.000 -name sys_clk_pin -waveform {{0.000 5.000}} -add [get_ports {{ clk }}]\n"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"create_clock -period 10.000 -name sys_clk_pin -waveform {0.000 5.000} -add [get_ports { clk }]\n".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
Consider adding clippy and fmt steps to CI on push. There is a long list of warring, some are a bit noisy and other might point to a potential issues.
I can take this if needed.
Some examples: