Skip to content

Commit

Permalink
ci: spell check on GitHub workflows (#964)
Browse files Browse the repository at this point in the history
* typos github action

* cutom config for typos

* fix spelling to counterparty

* fix spelling to transfer
  • Loading branch information
rnbguy committed Nov 14, 2023
1 parent 95fc7d7 commit bf77378
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .github/typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
# for serde serialization
ser = "ser"
13 changes: 13 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check
on:
pull_request:

jobs:
run:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: crate-ci/typos@master
with:
config: ./.github/typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ where
send_transfer_execute(send_packet_ctx_a, token_ctx_a, msg)
}

/// Validates the token tranfer. If this succeeds, then it is legal to initiate the transfer with [`send_transfer_execute`].
/// Validates the token transfer. If this succeeds, then it is legal to initiate the transfer with [`send_transfer_execute`].
pub fn send_transfer_validate<SendPacketCtx, TokenCtx>(
send_packet_ctx_a: &SendPacketCtx,
token_ctx_a: &TokenCtx,
Expand Down
20 changes: 10 additions & 10 deletions crates/ibc/src/core/ics03_connection/msgs/conn_open_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,24 +208,24 @@ mod tests {

// Check if handler sets counterparty connection id to `None`
// in case relayer passes `MsgConnectionOpenInit` message with it set to `Some(_)`.
let raw_with_counterpary_conn_id_some = dummy_raw_msg_conn_open_init();
let msg_with_counterpary_conn_id_some =
MsgConnectionOpenInit::try_from(raw_with_counterpary_conn_id_some).unwrap();
let raw_with_counterpary_conn_id_some_back =
RawMsgConnectionOpenInit::from(msg_with_counterpary_conn_id_some.clone());
let msg_with_counterpary_conn_id_some_back =
MsgConnectionOpenInit::try_from(raw_with_counterpary_conn_id_some_back.clone())
let raw_with_counterparty_conn_id_some = dummy_raw_msg_conn_open_init();
let msg_with_counterparty_conn_id_some =
MsgConnectionOpenInit::try_from(raw_with_counterparty_conn_id_some).unwrap();
let raw_with_counterparty_conn_id_some_back =
RawMsgConnectionOpenInit::from(msg_with_counterparty_conn_id_some.clone());
let msg_with_counterparty_conn_id_some_back =
MsgConnectionOpenInit::try_from(raw_with_counterparty_conn_id_some_back.clone())
.unwrap();
assert_eq!(
raw_with_counterpary_conn_id_some_back
raw_with_counterparty_conn_id_some_back
.counterparty
.unwrap()
.connection_id,
"".to_string()
);
assert_eq!(
msg_with_counterpary_conn_id_some,
msg_with_counterpary_conn_id_some_back
msg_with_counterparty_conn_id_some,
msg_with_counterparty_conn_id_some_back
);
}

Expand Down
20 changes: 10 additions & 10 deletions crates/ibc/src/core/ics04_channel/msgs/chan_open_init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ mod tests {

// Check if handler sets counterparty channel id to `None`
// in case relayer passes `MsgChannelOpenInit` message with it set to `Some(_)`
let raw_with_counterpary_chan_id_some = dummy_raw_msg_chan_open_init(None);
let msg_with_counterpary_chan_id_some =
MsgChannelOpenInit::try_from(raw_with_counterpary_chan_id_some).unwrap();
let raw_with_counterpary_chan_id_some_back =
RawMsgChannelOpenInit::from(msg_with_counterpary_chan_id_some.clone());
let msg_with_counterpary_chan_id_some_back =
MsgChannelOpenInit::try_from(raw_with_counterpary_chan_id_some_back.clone()).unwrap();
let raw_with_counterparty_chan_id_some = dummy_raw_msg_chan_open_init(None);
let msg_with_counterparty_chan_id_some =
MsgChannelOpenInit::try_from(raw_with_counterparty_chan_id_some).unwrap();
let raw_with_counterparty_chan_id_some_back =
RawMsgChannelOpenInit::from(msg_with_counterparty_chan_id_some.clone());
let msg_with_counterparty_chan_id_some_back =
MsgChannelOpenInit::try_from(raw_with_counterparty_chan_id_some_back.clone()).unwrap();
assert_eq!(
raw_with_counterpary_chan_id_some_back
raw_with_counterparty_chan_id_some_back
.channel
.unwrap()
.counterparty
Expand All @@ -179,8 +179,8 @@ mod tests {
"".to_string()
);
assert_eq!(
msg_with_counterpary_chan_id_some,
msg_with_counterpary_chan_id_some_back
msg_with_counterparty_chan_id_some,
msg_with_counterparty_chan_id_some_back
);
}
}

0 comments on commit bf77378

Please sign in to comment.