[ci] Add -D warnings for cargo-check-each-crate job to fail on warnings (#2670)

## Summary

This PR turns on `-D warnings` for `cargo-check-each-crate job` job to
fail on warnings e.g. like this:
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673130

Before this PR, there was a warning and `cargo-check-each-crate` job did
not fail:
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4641444
```
warning: unused import: `ToTokens`
  --> substrate/primitives/api/proc-macro/src/utils.rs:22:34
   |
22 | use quote::{format_ident, quote, ToTokens};
   |                                  ^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default
warning: `sp-api-proc-macro` (lib) generated 1 warning (run `cargo fix --lib -p sp-api-proc-macro` to apply 1 suggestion)
```

Fixes on the way:
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4641444
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673265
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673410
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673681
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673836
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4673941
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4674256
https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/4679328



## Questions
- [ ] why does this check triggers only `cargo check --locked`?
`--all-features` or `--all-targets` are not needed? Or aren't they
avoided intentionally?

---------

Co-authored-by: command-bot <>
This commit is contained in:
Branislav Kontur
2023-12-12 21:01:36 +01:00
committed by GitHub
parent 0470bd6851
commit d18a682bf7
9 changed files with 11 additions and 16 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ use parking_lot::Mutex;
use sp_runtime::traits::Block as BlockT;
use std::{collections::HashSet, sync::Arc, time::Duration};
pub use crate::request_responses::{InboundFailure, OutboundFailure, RequestId, ResponseFailure};
pub use crate::request_responses::{InboundFailure, OutboundFailure, ResponseFailure};
/// General behaviour of the network. Combines all protocols together.
#[derive(NetworkBehaviour)]
@@ -19,10 +19,6 @@
//! Network packet message types. These get serialized and put into the lower level protocol
//! payload.
pub use self::generic::{
RemoteCallRequest, RemoteChangesRequest, RemoteChangesResponse, RemoteHeaderRequest,
RemoteHeaderResponse, RemoteReadChildRequest, RemoteReadRequest,
};
use codec::{Decode, Encode};
use sc_client_api::StorageProof;
use sc_network_common::message::RequestId;
@@ -16,12 +16,14 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
#[cfg(test)]
pub(crate) use self::notifications::{
NotificationsInOpen, NotificationsInSubstreamHandshake, NotificationsOutOpen,
};
pub use self::{
collec::UpgradeCollec,
notifications::{
NotificationsHandshakeError, NotificationsIn, NotificationsInOpen,
NotificationsInSubstream, NotificationsInSubstreamHandshake, NotificationsOut,
NotificationsOutError, NotificationsOutOpen, NotificationsOutSubstream,
NotificationsIn, NotificationsInSubstream, NotificationsOut, NotificationsOutSubstream,
},
};