WIP: CI: add spellcheck (#3421)

* CI: add spellcheck

* revert me

* CI: explicit command for spellchecker

* spellcheck: edit misspells

* CI: run spellcheck on diff

* spellcheck: edits

* spellcheck: edit misspells

* spellcheck: add rules

* spellcheck: mv configs

* spellcheck: more edits

* spellcheck: chore

* spellcheck: one more thing

* spellcheck: and another one

* spellcheck: seems like it doesn't get to an end

* spellcheck: new words after rebase

* spellcheck: new words appearing out of nowhere

* chore

* review edits

* more review edits

* more edits

* wonky behavior

* wonky behavior 2

* wonky behavior 3

* change git behavior

* spellcheck: another bunch of new edits

* spellcheck: new words are koming out of nowhere

* CI: finding the master

* CI: fetching master implicitly

* CI: undebug

* new errors

* a bunch of new edits

* and some more

* Update node/core/approval-voting/src/approval_db/v1/mod.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Update xcm/xcm-executor/src/assets.rs

Co-authored-by: Andronik Ordian <write@reusable.software>

* Apply suggestions from code review

Co-authored-by: Andronik Ordian <write@reusable.software>

* Suggestions from the code review

* CI: scan only changed files

Co-authored-by: Andronik Ordian <write@reusable.software>
This commit is contained in:
Denis Pisarev
2021-07-14 19:22:58 +02:00
committed by GitHub
parent f6305d29be
commit fc253e6e4d
239 changed files with 927 additions and 761 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ pub enum AssetId {
}
impl AssetId {
/// Prepend a MultiLocation to a concrete asset, giving it a new root location.
/// Prepend a `MultiLocation` to a concrete asset, giving it a new root location.
pub fn prepend_location(&mut self, prepend: &MultiLocation) -> Result<(), ()> {
if let AssetId::Concrete(ref mut l) = self {
l.prepend_with(prepend.clone()).map_err(|_| ())?;
+1 -1
View File
@@ -22,7 +22,7 @@ use crate::traits::{
OnResponse,
};
/// The trait to parametrize the `XcmExecutor`.
/// The trait to parameterize the `XcmExecutor`.
pub trait Config {
/// The outer call dispatch type.
type Call: Parameter + Dispatchable<PostInfo=PostDispatchInfo> + GetDispatchInfo;
@@ -19,7 +19,7 @@ use parity_scale_codec::{Encode, Decode};
use xcm::v0::{MultiLocation, OriginKind};
/// Generic third-party conversion trait. Use this when you don't want to force the user to use default
/// impls of `From` and `Into` for the types you wish to convert between.
/// implementations of `From` and `Into` for the types you wish to convert between.
///
/// One of `convert`/`convert_ref` and `reverse`/`reverse_ref` MUST be implemented. If possible, implement
/// `convert_ref`, since this will never result in a clone. Use `convert` when you definitely need to consume
@@ -118,7 +118,7 @@ impl<T: Clone + Encode + Decode> Convert<Vec<u8>, T> for Decoded {
fn reverse_ref(value: impl Borrow<T>) -> Result<Vec<u8>, ()> { Ok(value.borrow().encode()) }
}
/// A convertor trait for origin types.
/// A converter `trait` for origin types.
///
/// Can be amalgamated into tuples. If any of the tuple elements returns `Ok(_)`, it short circuits. Else, the `Err(_)`
/// of the last tuple item is returned. Each intermediate `Err(_)` might return a different `origin` of type `Origin`
@@ -31,7 +31,7 @@ pub trait ShouldExecute {
/// - `message`: The message itself.
/// - `shallow_weight`: The weight of the non-negotiable execution of the message. This does not include any
/// embedded XCMs sat behind mechanisms like `BuyExecution` which would need to answer for their own weight.
/// - `weight_credit`: The pre-established amount of weight that the system has determined this message may utilise
/// - `weight_credit`: The pre-established amount of weight that the system has determined this message may utilize
/// in its execution. Typically non-zero only because of prior fee payment, but could in principle be due to other
/// factors.
fn should_execute<Call>(
@@ -44,7 +44,7 @@ pub trait TransactAsset {
/// not be needed if the teleporting chains are to be trusted, but better to be safe than sorry). On chains
/// where the asset is not native then it will generally just be a no-op.
///
/// When composed as a tuple, all type-items are called. It is up to the implementor that there exists no
/// When composed as a tuple, all type-items are called. It is up to the implementer that there exists no
/// value for `_what` which can cause side-effects for more than one of the type-items.
fn check_in(_origin: &MultiLocation, _what: &MultiAsset) {}
@@ -56,7 +56,7 @@ pub trait TransactAsset {
/// be needed if the teleporting chains are to be trusted, but better to be safe than sorry). On chains where
/// the asset is not native then it will generally just be a no-op.
///
/// When composed as a tuple, all type-items are called. It is up to the implementor that there exists no
/// When composed as a tuple, all type-items are called. It is up to the implementer that there exists no
/// value for `_what` which can cause side-effects for more than one of the type-items.
fn check_out(_origin: &MultiLocation, _what: &MultiAsset) {}
@@ -41,7 +41,7 @@ pub trait WeightBounds<Call> {
///
/// This is guaranteed equal to the eventual sum of all `shallow` XCM messages that get executed through
/// any internal effects. Inner XCM messages may be executed by:
/// - Order::BuyExecution
/// - `Order::BuyExecution`
fn deep(message: &mut Xcm<Call>) -> Result<Weight, ()>;
/// Return the total weight for executing `message`.