Skip to content

Commit 5af8a54

Browse files
authored
ci: Add spellcheck step (#164)
* Add invoke instruction helper * Typos * Remove new helpers * Remove unused * Address review comments * Tweak inline attributes * Use invoke signed unchecked * Refactor inline * Renamed to with_bounds * Update docs * Revert change * Add constant length check * Add spellcheck step * Tweak action * Fix typos * More fixes * Yet more fixes * Fixes * Add j1 option * More and more fixes * Add missing acronym * Fix merge * Fix spelling * Fix spelling
1 parent f61609a commit 5af8a54

File tree

32 files changed

+155
-58
lines changed

32 files changed

+155
-58
lines changed

.github/actions/setup/action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ runs:
9898
toolchain: ${{ env.TOOLCHAIN_LINT }}
9999
components: miri
100100

101+
- name: Install 'cargo-spellcheck'
102+
if: ${{ contains(inputs.components, 'spellcheck') }}
103+
uses: taiki-e/install-action@v2
104+
with:
105+
tool: cargo-spellcheck
106+
101107
- name: Cache Cargo Dependencies
102108
if: ${{ inputs.cargo-cache-key }}
103109
uses: actions/cache@v4

.github/workflows/main.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@ jobs:
3535
id: filter
3636
run: pnpm tsx ./scripts/setup/members.mts
3737

38+
spellcheck:
39+
name: Spellcheck
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Git Checkout
43+
uses: actions/checkout@v4
44+
45+
- name: Setup Environment
46+
uses: ./.github/actions/setup
47+
with:
48+
cargo-cache-key: cargo-spellcheck
49+
components: spellcheck
50+
51+
- name: cargo-spellcheck
52+
run: pnpm spellcheck
53+
3854
process:
3955
name: Check
4056
needs: sanity

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,6 @@ test = "1.84.1"
3939
pre-release-commit-message = "Publish {{crate_name}} v{{version}}"
4040
tag-message = "Publish {{crate_name}} v{{version}}"
4141
consolidate-commits = false
42+
43+
[workspace.metadata.spellcheck]
44+
config = "scripts/setup/spellcheck.toml"

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"lint": "tsx ./scripts/lint.mts",
1111
"miri": "tsx ./scripts/miri.mts",
1212
"semver": "tsx ./scripts/semver.mts",
13+
"spellcheck": "cargo spellcheck -j1 --code 1",
1314
"test": "tsx ./scripts/test.mts"
1415
},
1516
"devDependencies": {

programs/system/src/instructions/advance_nonce_account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ use pinocchio::{
99
///
1010
/// ### Accounts:
1111
/// 0. `[WRITE]` Nonce account
12-
/// 1. `[]` RecentBlockhashes sysvar
12+
/// 1. `[]` Recent blockhashes sysvar
1313
/// 2. `[SIGNER]` Nonce authority
1414
pub struct AdvanceNonceAccount<'a> {
1515
/// Nonce account.
1616
pub account: &'a AccountInfo,
1717

18-
/// RecentBlockhashes sysvar.
18+
/// Recent blockhashes sysvar.
1919
pub recent_blockhashes_sysvar: &'a AccountInfo,
2020

2121
/// Nonce authority.

programs/system/src/instructions/initialize_nonce_account.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,21 @@ use pinocchio::{
1616
///
1717
/// ### Accounts:
1818
/// 0. `[WRITE]` Nonce account
19-
/// 1. `[]` RecentBlockhashes sysvar
19+
/// 1. `[]` Recent blockhashes sysvar
2020
/// 2. `[]` Rent sysvar
2121
pub struct InitializeNonceAccount<'a, 'b> {
2222
/// Nonce account.
2323
pub account: &'a AccountInfo,
2424

25-
/// RecentBlockhashes sysvar.
25+
/// Recent blockhashes sysvar.
2626
pub recent_blockhashes_sysvar: &'a AccountInfo,
2727

2828
/// Rent sysvar.
2929
pub rent_sysvar: &'a AccountInfo,
3030

3131
/// Lamports to withdraw.
3232
///
33-
/// The account balance muat be left above the rent exempt reserve
33+
/// The account balance must be left above the rent exempt reserve
3434
/// or at zero.
3535
pub authority: &'b Pubkey,
3636
}

programs/system/src/instructions/withdraw_nonce_account.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use pinocchio::{
1313
/// ### Accounts:
1414
/// 0. `[WRITE]` Nonce account
1515
/// 1. `[WRITE]` Recipient account
16-
/// 2. `[]` RecentBlockhashes sysvar
16+
/// 2. `[]` Recent blockhashes sysvar
1717
/// 3. `[]` Rent sysvar
1818
/// 4. `[SIGNER]` Nonce authority
1919
pub struct WithdrawNonceAccount<'a> {
@@ -23,7 +23,7 @@ pub struct WithdrawNonceAccount<'a> {
2323
/// Recipient account.
2424
pub recipient: &'a AccountInfo,
2525

26-
/// RecentBlockhashes sysvar.
26+
/// Recent blockhashes sysvar.
2727
pub recent_blockhashes_sysvar: &'a AccountInfo,
2828

2929
/// Rent sysvar.
@@ -34,7 +34,7 @@ pub struct WithdrawNonceAccount<'a> {
3434

3535
/// Lamports to withdraw.
3636
///
37-
/// The account balance muat be left above the rent exempt reserve
37+
/// The account balance must be left above the rent exempt reserve
3838
/// or at zero.
3939
pub lamports: u64,
4040
}

programs/token/src/instructions/freeze_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use pinocchio::{
55
ProgramResult,
66
};
77

8-
/// Freeze an Initialized account using the Mint's freeze_authority
8+
/// Freeze an initialized account using the Mint's freeze authority.
99
///
1010
/// ### Accounts:
1111
/// 0. `[WRITE]` The account to freeze.

programs/token/src/instructions/initialize_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use pinocchio::{
1010
/// ### Accounts:
1111
/// 0. `[WRITE]` The account to initialize.
1212
/// 1. `[]` The mint this account will be associated with.
13-
/// 2. `[]` The new account's owner/multisignature.
13+
/// 2. `[]` The new account's owner/multi-signature.
1414
/// 3. `[]` Rent sysvar
1515
pub struct InitializeAccount<'a> {
1616
/// New Account.

programs/token/src/instructions/thaw_account.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use pinocchio::{
55
ProgramResult,
66
};
77

8-
/// Thaw a Frozen account using the Mint's freeze_authority
8+
/// Thaw a frozen account using the Mint's freeze authority.
99
///
1010
/// ### Accounts:
1111
/// 0. `[WRITE]` The account to thaw.

0 commit comments

Comments
 (0)