Skip to content
Snippets Groups Projects
Unverified Commit 72030ce3 authored by hrls's avatar hrls Committed by GitHub
Browse files

Add 'missing_docs' attribute to dummy package (#4992)


We want to add linter to the entire node based on a template. Just like
`cargo clippy -- --deny missing_docs`. And we have the error (pasted at
the end).
The dummy crate is used to test whether the WASM toolchain is installed
and working as expected. And for some reason this dummy crate included
as a target for the linter. I added an attribute to pass the check.
```
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_DEV_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.

Caused by:
  process didn't exit successfully: `/Users/hrls/src/atleta/target/debug/build/atleta-runtime-b15153eff20cbe96/build-script-build` (exit status: 1)
  --- stderr
  Rust WASM target for toolchain stable-aarch64-apple-darwin is not properly installed; please install it!

  Further error information:
  ------------------------------------------------------------
     Compiling dummy-crate v1.0.0 (/var/folders/h1/_5gdnk8901n959lc28fwx8400000gn/T/.tmpUQCLaV)
  error: missing documentation for the crate
   --> src/main.rs:1:1
    |
  1 | fn main() {}
    | ^^^^^^^^^^^^
    |
    = note: requested on the command line with `-D missing-docs`

  error: could not compile `dummy-crate` (bin "dummy-crate") due to 1 previous error
  ------------------------------------------------------------


```

Co-authored-by: default avatarBastian Köcher <git@kchr.de>
parent 12f352cc
Branches
No related merge requests found
Pipeline #485456 waiting for manual action with stages
in 22 minutes and 19 seconds
......@@ -102,7 +102,10 @@ impl<'a> DummyCrate<'a> {
"#,
);
write_file_if_changed(project_dir.join("src/main.rs"), "fn main() {}");
write_file_if_changed(
project_dir.join("src/main.rs"),
"#![allow(missing_docs)] fn main() {}",
);
DummyCrate { cargo_command, temp, manifest_path, target }
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment