Skip to content

Commit bf77378

Browse files
authored
ci: spell check on GitHub workflows (informalsystems#964)
* typos github action * cutom config for typos * fix spelling to counterparty * fix spelling to transfer
1 parent 95fc7d7 commit bf77378

File tree

5 files changed

+37
-21
lines changed

5 files changed

+37
-21
lines changed

.github/typos.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[default.extend-words]
2+
# for serde serialization
3+
ser = "ser"

.github/workflows/typos.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Spell Check
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
run:
7+
name: Spell Check with Typos
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
- uses: crate-ci/typos@master
12+
with:
13+
config: ./.github/typos.toml

crates/ibc/src/applications/transfer/relay/send_transfer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ where
2828
send_transfer_execute(send_packet_ctx_a, token_ctx_a, msg)
2929
}
3030

31-
/// Validates the token tranfer. If this succeeds, then it is legal to initiate the transfer with [`send_transfer_execute`].
31+
/// Validates the token transfer. If this succeeds, then it is legal to initiate the transfer with [`send_transfer_execute`].
3232
pub fn send_transfer_validate<SendPacketCtx, TokenCtx>(
3333
send_packet_ctx_a: &SendPacketCtx,
3434
token_ctx_a: &TokenCtx,

crates/ibc/src/core/ics03_connection/msgs/conn_open_init.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,24 @@ mod tests {
208208

209209
// Check if handler sets counterparty connection id to `None`
210210
// in case relayer passes `MsgConnectionOpenInit` message with it set to `Some(_)`.
211-
let raw_with_counterpary_conn_id_some = dummy_raw_msg_conn_open_init();
212-
let msg_with_counterpary_conn_id_some =
213-
MsgConnectionOpenInit::try_from(raw_with_counterpary_conn_id_some).unwrap();
214-
let raw_with_counterpary_conn_id_some_back =
215-
RawMsgConnectionOpenInit::from(msg_with_counterpary_conn_id_some.clone());
216-
let msg_with_counterpary_conn_id_some_back =
217-
MsgConnectionOpenInit::try_from(raw_with_counterpary_conn_id_some_back.clone())
211+
let raw_with_counterparty_conn_id_some = dummy_raw_msg_conn_open_init();
212+
let msg_with_counterparty_conn_id_some =
213+
MsgConnectionOpenInit::try_from(raw_with_counterparty_conn_id_some).unwrap();
214+
let raw_with_counterparty_conn_id_some_back =
215+
RawMsgConnectionOpenInit::from(msg_with_counterparty_conn_id_some.clone());
216+
let msg_with_counterparty_conn_id_some_back =
217+
MsgConnectionOpenInit::try_from(raw_with_counterparty_conn_id_some_back.clone())
218218
.unwrap();
219219
assert_eq!(
220-
raw_with_counterpary_conn_id_some_back
220+
raw_with_counterparty_conn_id_some_back
221221
.counterparty
222222
.unwrap()
223223
.connection_id,
224224
"".to_string()
225225
);
226226
assert_eq!(
227-
msg_with_counterpary_conn_id_some,
228-
msg_with_counterpary_conn_id_some_back
227+
msg_with_counterparty_conn_id_some,
228+
msg_with_counterparty_conn_id_some_back
229229
);
230230
}
231231

crates/ibc/src/core/ics04_channel/msgs/chan_open_init.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,15 @@ mod tests {
162162

163163
// Check if handler sets counterparty channel id to `None`
164164
// in case relayer passes `MsgChannelOpenInit` message with it set to `Some(_)`
165-
let raw_with_counterpary_chan_id_some = dummy_raw_msg_chan_open_init(None);
166-
let msg_with_counterpary_chan_id_some =
167-
MsgChannelOpenInit::try_from(raw_with_counterpary_chan_id_some).unwrap();
168-
let raw_with_counterpary_chan_id_some_back =
169-
RawMsgChannelOpenInit::from(msg_with_counterpary_chan_id_some.clone());
170-
let msg_with_counterpary_chan_id_some_back =
171-
MsgChannelOpenInit::try_from(raw_with_counterpary_chan_id_some_back.clone()).unwrap();
165+
let raw_with_counterparty_chan_id_some = dummy_raw_msg_chan_open_init(None);
166+
let msg_with_counterparty_chan_id_some =
167+
MsgChannelOpenInit::try_from(raw_with_counterparty_chan_id_some).unwrap();
168+
let raw_with_counterparty_chan_id_some_back =
169+
RawMsgChannelOpenInit::from(msg_with_counterparty_chan_id_some.clone());
170+
let msg_with_counterparty_chan_id_some_back =
171+
MsgChannelOpenInit::try_from(raw_with_counterparty_chan_id_some_back.clone()).unwrap();
172172
assert_eq!(
173-
raw_with_counterpary_chan_id_some_back
173+
raw_with_counterparty_chan_id_some_back
174174
.channel
175175
.unwrap()
176176
.counterparty
@@ -179,8 +179,8 @@ mod tests {
179179
"".to_string()
180180
);
181181
assert_eq!(
182-
msg_with_counterpary_chan_id_some,
183-
msg_with_counterpary_chan_id_some_back
182+
msg_with_counterparty_chan_id_some,
183+
msg_with_counterparty_chan_id_some_back
184184
);
185185
}
186186
}

0 commit comments

Comments
 (0)