Skip to content

Commit 0b0bbad

Browse files
authored
add codespell workflow (#1021)
* add codespell * fix typo * fix typo
1 parent bbb326f commit 0b0bbad

File tree

17 files changed

+71
-32
lines changed

17 files changed

+71
-32
lines changed

.codespell/codespellrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[codespell]
2+
skip = .git,Cargo.lock
3+
count =
4+
quiet-level = 3
5+
ignore-words = ./.codespell/ignore.txt

.codespell/ignore.txt

Whitespace-only changes.

.codespell/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
codespell==2.4.1

.github/workflows/codespell.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# A Github action that using codespell to check spelling.
2+
# see .codespell/* for configs
3+
# https://github.com/codespell-project/codespell
4+
5+
name: codespell
6+
7+
on:
8+
# Triggers the workflow on push or pull request against main
9+
push:
10+
branches: [master]
11+
pull_request:
12+
branches: [master]
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
jobs:
17+
codespell:
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- name: Checkout the repository
22+
uses: actions/checkout@v4
23+
24+
- name: Setup python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.x'
28+
29+
- name: Install codespell requirements
30+
run: pip install -r ./.codespell/requirements.txt
31+
32+
- name: Spell check
33+
run: codespell --config=./.codespell/codespellrc

authority/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
### Overview
44

5-
Authority module to provide features for governance including dispatch method on behalf other accounts and schdule dispatchables.
5+
Authority module to provide features for governance including dispatch method on behalf other accounts and schedule dispatchables.
66

77
- `dispatch_as` can dispatch a dispatchable on behalf of other origin.
8-
- `schedule_dispatch` can schdule a dispatchable to be dispatched at later block.
8+
- `schedule_dispatch` can schedule a dispatchable to be dispatched at later block.
99
- `fast_track_scheduled_dispatch` can fast track a scheduled dispatchable.
1010
- `delay_scheduled_dispatch` can delay a scheduled dispatchable.
1111
- `cancel_scheduled_dispatch` can cancel a scheduled dispatchable.

benchmarking/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ macro_rules! impl_benchmark_test_suite {
11721172
$crate::BenchmarkError::Override(_) => {
11731173
// This is still considered a success condition.
11741174
$crate::log::error!(
1175-
"WARNING: benchmark error overrided - {}",
1175+
"WARNING: benchmark error overridden - {}",
11761176
$crate::str::from_utf8(benchmark_name)
11771177
.expect("benchmark name is always a valid string!"),
11781178
);
@@ -1300,7 +1300,7 @@ macro_rules! add_benchmark {
13001300
Err($crate::BenchmarkError::Override(mut result)) => {
13011301
// Insert override warning as the first storage key.
13021302
$crate::log::error!(
1303-
"WARNING: benchmark error overrided - {}",
1303+
"WARNING: benchmark error overridden - {}",
13041304
$crate::str::from_utf8(benchmark)
13051305
.expect("benchmark name is always a valid string!")
13061306
);

oracle/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
This module exposes capabilities for oracle operators to feed external offchain data.
66
The raw values can be combined to provide an aggregated value.
77

8-
The data is valid only if feeded by an authorized operator. This module implements `frame_support::traits::InitializeMembers` and `frame_support::traits::ChangeMembers`, to provide a way to manage operators membership. Typically it could be leveraged to `pallet_membership` in FRAME.
8+
The data is valid only if fed by an authorized operator. This module implements `frame_support::traits::InitializeMembers` and `frame_support::traits::ChangeMembers`, to provide a way to manage operators membership. Typically it could be leveraged to `pallet_membership` in FRAME.

oracle/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! offchain data. The raw values can be combined to provide an aggregated
1212
//! value.
1313
//!
14-
//! The data is valid only if feeded by an authorized operator.
14+
//! The data is valid only if fed by an authorized operator.
1515
//! `pallet_membership` in FRAME can be used to as source of `T::Members`.
1616
1717
#![cfg_attr(not(feature = "std"), no_std)]
@@ -130,7 +130,7 @@ pub mod module {
130130
pub enum Error<T, I = ()> {
131131
/// Sender does not have permission
132132
NoPermission,
133-
/// Feeder has already feeded at this block
133+
/// Feeder has already fed at this block
134134
AlreadyFeeded,
135135
}
136136

payments/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ This pallet allows users to create secure reversible payments that keep funds lo
2929

3030
- `pay` - Create an payment for the given currencyid/amount
3131
- `pay_with_remark` - Create a payment with a remark, can be used to tag payments
32-
- `release` - Release the payment amount to recipent
32+
- `release` - Release the payment amount to recipient
3333
- `cancel` - Allows the recipient to cancel the payment and release the payment amount to creator
3434
- `resolve_release_payment` - Allows assigned judge to release a payment
3535
- `resolve_cancel_payment` - Allows assigned judge to cancel a payment

payments/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! - `pay` - Create an payment for the given currencyid/amount
3131
//! - `pay_with_remark` - Create a payment with a remark, can be used to tag
3232
//! payments
33-
//! - `release` - Release the payment amount to recipent
33+
//! - `release` - Release the payment amount to recipient
3434
//! - `cancel` - Allows the recipient to cancel the payment and release the
3535
//! payment amount to creator
3636
//! - `resolve_release_payment` - Allows assigned judge to release a payment
@@ -207,13 +207,13 @@ pub mod pallet {
207207
InvalidAction,
208208
/// Payment is in review state and cannot be modified
209209
PaymentNeedsReview,
210-
/// Unexpeted math error
210+
/// Unexpected math error
211211
MathError,
212212
/// Payment request has not been created
213213
RefundNotRequested,
214214
/// Dispute period has not passed
215215
DisputePeriodNotPassed,
216-
/// The automatic cancelation queue cannot accept
216+
/// The automatic cancellation queue cannot accept
217217
RefundQueueFull,
218218
}
219219

@@ -400,7 +400,7 @@ pub mod pallet {
400400
}
401401

402402
/// Allow the creator of a payment to initiate a refund that will return
403-
/// the funds after a configured amount of time that the reveiver has to
403+
/// the funds after a configured amount of time that the receiver has to
404404
/// react and oppose the request
405405
#[pallet::call_index(4)]
406406
#[pallet::weight(T::WeightInfo::request_refund())]

0 commit comments

Comments
 (0)