Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions .cspell-anchor-dictionary.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
aarch
ahash
ambigious
anchorversion
anza
Anza
arrayref
autoload
backpackapp
behaviour
blockhash
Blockhash
borsh
Borsh
bytemuck
bytemuckunsafe
cfgs
clippy
compinit
composibility
dedup
deriveaccounts
devex
devnet
Devnet
duplicative
footguns
fumadocs
Fumadocs
getrandom
Helius
idls
isinstance
keypair
Keypair
keypairs
Keypairs
Kibibyte
Lamport
lamports
Lamports
LAMPORTS
libclang
libudev
litesvm
localnet
Localnet
localnetwork
metas
Metas
millis
MSRV
msvc
namespacing
nonblocking
openbook
pathlib
pdas
pdksh
permissioned
programatically
programdata
projectserum
pubkeys
publickey
reallocs
repr
reqwest
rustc
rustls
rustup
RUSTUP
Sealevel
serde
shmem
sighash
sigverify
solana
Solana
Solana's
solanafoundation
Solang
solpg
Solpg
stdsimd
syscall
syscalls
sysvar
Sysvar
sysvars
underyling
unsized
Unsized
unverify
Zeroable
Znext
27 changes: 27 additions & 0 deletions .github/workflows/global-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Linters that run on everything and don't exclude docs/**
name: Global Linters
on:
workflow_dispatch:
pull_request:

# Manually run cspell locally via:
# make spellcheck
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Pinned version of the v7.2.0 tag, which is a lightweight and hence mutable tag
- uses: streetsidesoftware/cspell-action@dcd03dc3e8a59ec2e360d0c62db517baa0b4bb6d
with:
# For now, only lint markdown files
files: |
**/*.md
**/*.mdx
inline: warning

# Only check files in the PR or push
incremental_files_only: true

# Do not error out on failures, only complain
strict: false
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
DICTIONARY_FILE ?= .cspell-anchor-dictionary.txt

.PHONY: build-cli
build-cli:
cargo build -p anchor-cli --release
Expand Down Expand Up @@ -39,3 +41,15 @@ publish:
sleep 25
cd cli/ && cargo publish && cd ../
sleep 25

.PHONY: spellcheck
spellcheck:
cspell *.md **/*.md **/*.mdx --config cspell.config.yaml --no-progress

.PHONY: update-dictionary
update-dictionary:
echo $(DICTIONARY_FILE)
cspell *.md **/*.md **/*.mdx --config cspell.config.yaml --words-only --unique --no-progress --quiet 2>/dev/null | sort --ignore-case > .new-dictionary-words
cat .new-dictionary-words $(DICTIONARY_FILE) | sort --ignore-case > .new-$(DICTIONARY_FILE)
mv .new-$(DICTIONARY_FILE) $(DICTIONARY_FILE)
rm -f .new-dictionary-words
10 changes: 10 additions & 0 deletions cspell.config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
$schema: https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json
version: '0.2'
dictionaryDefinitions:
- name: anchor-dictionary
path: './.cspell-anchor-dictionary.txt'
addWords: true
dictionaries:
- anchor-dictionary
ignorePaths: []
8 changes: 8 additions & 0 deletions docs/content/docs/features/events.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ describe("event", () => {
</Tab>
</Tabs>

<!-- cspell:disable -->

The following is the output of the program logs. The event data is base64
encoded as `Zb1eU3aiYdwOAAAASGVsbG8sIFNvbGFuYSE=`.

Expand All @@ -130,6 +132,8 @@ Log Messages:
Program 8T7MsCZyzxboviPJg5Rc7d8iqEcDReYR2pkQKrmbg7dy success
```

<!-- cspell:enable -->

<Callout type="info">
Ensure the RPC provider you use does not truncate the program logs from the
transaction data.
Expand Down Expand Up @@ -273,6 +277,8 @@ In the example transaction below, the encoded event data is
`"data": "6AJcBqZP8afBKheoif1oA6UAiLAcqYr2RaR33pFnEY1taQp"` in the
`innerInstructions` array.

<!-- cspell:disable -->

```shell title="Transaction Data"
{
"blockTime": 1735854530,
Expand Down Expand Up @@ -359,6 +365,8 @@ In the example transaction below, the encoded event data is
}
```

<!-- cspell:enable -->

<Callout type="info">
Currently, event data emitted through CPIs cannot be directly subscribed to.
To access this data, you must fetch the complete transaction data and manually
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ Generating a new keypair

For added security, enter a BIP39 passphrase

NOTE! This passphrase improves security of the recovery seed phrae NOT the
NOTE! This passphrase improves security of the recovery seed phrase NOT the
keypair file itself, which is stored as insecure plain text

BIP39 Passphrase (empty for none):
Expand Down
4 changes: 4 additions & 0 deletions docs/content/docs/quickstart/local.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,8 @@ new program.

Below is an overview of default file structure in an Anchor workspace:

<!-- cspell:disable -->

<Files>
<Folder name=".anchor">
<File name="program-logs" />
Expand Down Expand Up @@ -378,6 +380,8 @@ Below is an overview of default file structure in an Anchor workspace:
<File name="package.json" />
</Files>

<!-- cspell:enable -->

### Programs Folder

The `/programs` directory contains your project's Anchor programs. A single
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/updates/release-notes/0-31-0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ The following issues with the IDL generation have been fixed:
- A bug where using tuple parameters in instructions would result in an
incorrect IDL ([#3294](https://github.com/coral-xyz/anchor/pull/3294))
- A bug where doc comments could trigger false-positives during module paths
convertion ([#3359](https://github.com/coral-xyz/anchor/pull/3359))
conversion ([#3359](https://github.com/coral-xyz/anchor/pull/3359))
- A bug where the generated IDL only has partial resolution information
([#3474](https://github.com/coral-xyz/anchor/pull/3474))
- Being unable to use constant identifiers as generic arguments
Expand Down