feat(ci): reusable spellcheck from unified CI (#10873)

* ci: use spellcheck from unified CI
* chore: fix spelling

---------

Co-authored-by: Marcin Rataj <lidel@lidel.org>
This commit is contained in:
Piotr Galar 2025-08-14 01:35:35 +01:00 committed by GitHub
parent 8e5ef5503d
commit 2b858bb3e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 53 additions and 71 deletions

View File

@ -1,21 +0,0 @@
Adin
nd
Nd
afile
thirdparty
receivedFrom
origN
hel
TotalIn
childs
userA
AssignT
OT
AssignT
fo
recusive
raison
Boddy
ressource
achin
re-using

6
.cspell.yml Normal file
View File

@ -0,0 +1,6 @@
ignoreWords:
- childs # This spelling is used in the files command
- NodeCreater # This spelling is used in the fuse dependency
- Boddy # One of the contributors to the project - Chris Boddy
- Botto # One of the contributors to the project - Santiago Botto
- cose # dag-cose

View File

@ -1,21 +1,18 @@
name: Spell Check
on: [push, pull_request]
on:
pull_request:
push:
branches: ["master"]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
cancel-in-progress: true
jobs:
spellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Codespell
run: pip install codespell==2.4.0
- name: Run Codespell
uses: codespell-project/actions-codespell@v2
with:
only_warn: 1
ignore_words_file: .codespell-ignore
skip: "*.mod,*.sum,*.pdf,./docs/AUTHORS,./test/sharness/t0275-cid-security-data,./test/sharness/t0280-plugin-dag-jose-data,./bin"
uses: ipdxco/unified-github-workflows/.github/workflows/reusable-spellcheck.yml@v1

View File

@ -5,7 +5,7 @@ import (
"testing"
)
func TestBoostrapPeerStrings(t *testing.T) {
func TestBootstrapPeerStrings(t *testing.T) {
parsed, err := ParseBootstrapPeers(DefaultBootstrapAddresses)
if err != nil {
t.Fatal(err)

View File

@ -409,7 +409,7 @@ func (s multibaseSorter) Sort() {
if n := cmp.Compare(unicode.ToLower(rune(a.Code)), unicode.ToLower(rune(b.Code))); n != 0 {
return n
}
// lowecase letters should come before uppercase
// lowercase letters should come before uppercase
return cmp.Compare(b.Code, a.Code)
})
}

View File

@ -10,7 +10,7 @@ var statReprovideCmd = &cmds.Command{
Tagline: "Deprecated command, use 'ipfs provide stat' instead.",
ShortDescription: `
'ipfs stats reprovide' is deprecated because provider stats are now
available fomr 'ipfs provide stat'.
available from 'ipfs provide stat'.
`,
},
Arguments: provideStatCmd.Arguments,

View File

@ -433,7 +433,7 @@ func getThreeChainedNodes(t *testing.T, ctx context.Context, api iface.CoreAPI,
return immutablePathCidContainer{leaf}, parent, grandparent
}
func assertPinTypes(t *testing.T, ctx context.Context, api iface.CoreAPI, recusive, direct, indirect []cidContainer) {
func assertPinTypes(t *testing.T, ctx context.Context, api iface.CoreAPI, recursive, direct, indirect []cidContainer) {
assertPinLsAllConsistency(t, ctx, api)
list, err := accPins(ctx, api, opt.Pin.Ls.Recursive())
@ -441,7 +441,7 @@ func assertPinTypes(t *testing.T, ctx context.Context, api iface.CoreAPI, recusi
t.Fatal(err)
}
assertPinCids(t, list, recusive...)
assertPinCids(t, list, recursive...)
list, err = accPins(ctx, api, opt.Pin.Ls.Direct())
if err != nil {

View File

@ -214,8 +214,8 @@ func Files(strategy string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, repo
return nil, err
}
offineDag := merkledag.NewDAGService(blockservice.New(bs, offline.Exchange(bs)))
rnd, err := offineDag.Get(ctx, c)
offlineDag := merkledag.NewDAGService(blockservice.New(bs, offline.Exchange(bs)))
rnd, err := offlineDag.Get(ctx, c)
if err != nil {
return nil, fmt.Errorf("error loading filesroot from dagservice: %s", err)
}

View File

@ -36,7 +36,7 @@ func AddrFilters(filters []string) func() (*ma.Filters, Libp2pOpts, error) {
}
}
func makeAddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string) (p2pbhost.AddrsFactory, error) {
func makeAddrsFactory(announce []string, appendAnnounce []string, noAnnounce []string) (p2pbhost.AddrsFactory, error) {
var err error // To assign to the slice in the for loop
existing := make(map[string]bool) // To avoid duplicates
@ -50,7 +50,7 @@ func makeAddrsFactory(announce []string, appendAnnouce []string, noAnnounce []st
}
var appendAnnAddrs []ma.Multiaddr
for _, addr := range appendAnnouce {
for _, addr := range appendAnnounce {
if existing[addr] {
// skip AppendAnnounce that is on the Announce list already
continue
@ -99,14 +99,14 @@ func makeAddrsFactory(announce []string, appendAnnouce []string, noAnnounce []st
}, nil
}
func AddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string) interface{} {
func AddrsFactory(announce []string, appendAnnounce []string, noAnnounce []string) interface{} {
return func(params struct {
fx.In
ForgeMgr *p2pforge.P2PForgeCertMgr `optional:"true"`
},
) (opts Libp2pOpts, err error) {
var addrsFactory p2pbhost.AddrsFactory
announceAddrsFactory, err := makeAddrsFactory(announce, appendAnnouce, noAnnounce)
announceAddrsFactory, err := makeAddrsFactory(announce, appendAnnounce, noAnnounce)
if err != nil {
return opts, err
}
@ -115,8 +115,8 @@ func AddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string
} else {
addrsFactory = func(multiaddrs []ma.Multiaddr) []ma.Multiaddr {
forgeProcessing := params.ForgeMgr.AddressFactory()(multiaddrs)
annouceProcessing := announceAddrsFactory(forgeProcessing)
return annouceProcessing
announceProcessing := announceAddrsFactory(forgeProcessing)
return announceProcessing
}
}
opts.Opts = append(opts.Opts, libp2p.AddrsFactory(addrsFactory))

View File

@ -80,7 +80,7 @@ Performance profiles can now be collected using `ipfs diag profile`. If you need
#### 🍎 Mac OS notarized binaries
The go-ipfs and related migration binaries (for both Intel and Apple Sillicon) are now signed and notarized to make Mac OS installation easier.
The go-ipfs and related migration binaries (for both Intel and Apple Silicon) are now signed and notarized to make Mac OS installation easier.
#### 👨‍👩‍👦 Improved MDNS

View File

@ -629,7 +629,7 @@ and various improvements have been made to improve the UX including:
- feat: WithLocalPublication option to enable local only publishing on a topic (#481) ([libp2p/go-libp2p-pubsub#481](https://github.com/libp2p/go-libp2p-pubsub/pull/481))
- update pubsub deps (#491) ([libp2p/go-libp2p-pubsub#491](https://github.com/libp2p/go-libp2p-pubsub/pull/491))
- Gossipsub: Unsubscribe backoff (#488) ([libp2p/go-libp2p-pubsub#488](https://github.com/libp2p/go-libp2p-pubsub/pull/488))
- Adds exponential backoff to re-spawing new streams for supposedly dead peers (#483) ([libp2p/go-libp2p-pubsub#483](https://github.com/libp2p/go-libp2p-pubsub/pull/483))
- Adds exponential backoff to re-spawning new streams for supposedly dead peers (#483) ([libp2p/go-libp2p-pubsub#483](https://github.com/libp2p/go-libp2p-pubsub/pull/483))
- Publishing option for signing a message with a custom private key (#486) ([libp2p/go-libp2p-pubsub#486](https://github.com/libp2p/go-libp2p-pubsub/pull/486))
- fix unused GossipSubHistoryGossip, make seenMessages ttl configurable, make score params SeenMsgTTL configurable
- Update README.md

View File

@ -10,7 +10,7 @@
config file Bootstrap field changed accordingly. users
can upgrade cleanly with:
ipfs bootstrap >boostrap_peers
ipfs bootstrap >bootstrap_peers
ipfs bootstrap rm --all
<install new ipfs>
<manually add .../ipfs/... to addrs in bootstrap_peers>

View File

@ -471,7 +471,7 @@ You can read more about the rationale behind this decision on the [tracking issu
- identify: fix stale comment (#2179) ([libp2p/go-libp2p#2179](https://github.com/libp2p/go-libp2p/pull/2179))
- relay service: add metrics (#2154) ([libp2p/go-libp2p#2154](https://github.com/libp2p/go-libp2p/pull/2154))
- identify: Fix IdentifyWait when Connected events happen out of order (#2173) ([libp2p/go-libp2p#2173](https://github.com/libp2p/go-libp2p/pull/2173))
- chore: fix ressource manager's README (#2168) ([libp2p/go-libp2p#2168](https://github.com/libp2p/go-libp2p/pull/2168))
- chore: fix resource manager's README (#2168) ([libp2p/go-libp2p#2168](https://github.com/libp2p/go-libp2p/pull/2168))
- relay: fix deadlock when closing (#2171) ([libp2p/go-libp2p#2171](https://github.com/libp2p/go-libp2p/pull/2171))
- core: remove LocalPrivateKey method from network.Conn interface (#2144) ([libp2p/go-libp2p#2144](https://github.com/libp2p/go-libp2p/pull/2144))
- routed host: return connection error instead of routing error (#2169) ([libp2p/go-libp2p#2169](https://github.com/libp2p/go-libp2p/pull/2169))

View File

@ -263,7 +263,7 @@ should be using AcceleratedDHTClient because they are falling behind.
- chore: release v0.24.0
- fix: don't add unresponsive DHT servers to the Routing Table (#820) ([libp2p/go-libp2p-kad-dht#820](https://github.com/libp2p/go-libp2p-kad-dht/pull/820))
- github.com/libp2p/go-libp2p-kbucket (v0.5.0 -> v0.6.3):
- fix: fix abba bug in UsefullNewPeer ([libp2p/go-libp2p-kbucket#122](https://github.com/libp2p/go-libp2p-kbucket/pull/122))
- fix: fix abba bug in UsefulNewPeer ([libp2p/go-libp2p-kbucket#122](https://github.com/libp2p/go-libp2p-kbucket/pull/122))
- chore: release v0.6.2 ([libp2p/go-libp2p-kbucket#121](https://github.com/libp2p/go-libp2p-kbucket/pull/121))
- Replacing UsefulPeer() with UsefulNewPeer() ([libp2p/go-libp2p-kbucket#120](https://github.com/libp2p/go-libp2p-kbucket/pull/120))
- chore: release 0.6.1 ([libp2p/go-libp2p-kbucket#119](https://github.com/libp2p/go-libp2p-kbucket/pull/119))

View File

@ -236,7 +236,7 @@ This includes a breaking change to `ipfs id` and some of the `ipfs swarm` comman
- chore: cleanup error handling in compparallel
- fix: correctly handle errors in compparallel
- fix: make the ProvideMany docs clearer
- perf: remove goroutine that just waits before closing with a synchrous waitgroup
- perf: remove goroutine that just waits before closing with a synchronous waitgroup
- github.com/libp2p/go-nat (v0.1.0 -> v0.2.0):
- release v0.2.0 (#30) ([libp2p/go-nat#30](https://github.com/libp2p/go-nat/pull/30))
- update deps, use contexts on UPnP functions (#29) ([libp2p/go-nat#29](https://github.com/libp2p/go-nat/pull/29))

View File

@ -36,7 +36,7 @@ For a description of the available tuning parameters, see [kubo/docs/datastores.
We've notices users were applying `lowpower` profile, and then reporting content routing issues. This was because `lowpower` disabled reprovider system and locally hosted data was no longer announced on Amino DHT.
This release changes [`lowpower` profile](https://github.com/ipfs/kubo/blob/master/docs/config.md#lowpower-profile) to not change reprovider settings, ensuring the new users are not sabotaging themselves. It also adds [`annouce-on`](https://github.com/ipfs/kubo/blob/master/docs/config.md#announce-on-profile) and [`announce-off`](https://github.com/ipfs/kubo/blob/master/docs/config.md#announce-off-profile) profiles for controlling announcement settings separately.
This release changes [`lowpower` profile](https://github.com/ipfs/kubo/blob/master/docs/config.md#lowpower-profile) to not change reprovider settings, ensuring the new users are not sabotaging themselves. It also adds [`announce-on`](https://github.com/ipfs/kubo/blob/master/docs/config.md#announce-on-profile) and [`announce-off`](https://github.com/ipfs/kubo/blob/master/docs/config.md#announce-off-profile) profiles for controlling announcement settings separately.
> [!IMPORTANT]
> If you've ever applied the `lowpower` profile before, there is a high chance your node is not announcing to DHT anymore.

View File

@ -3255,7 +3255,7 @@ other requested improvements. See below for the full list of changes.
- Make sure all keystore keys get republished ([ipfs/go-ipfs#3951](https://github.com/ipfs/go-ipfs/pull/3951))
- Documentation
- Adding documentation on PubSub encodings ([ipfs/go-ipfs#3909](https://github.com/ipfs/go-ipfs/pull/3909))
- Change 'neccessary' to 'necessary' ([ipfs/go-ipfs#3941](https://github.com/ipfs/go-ipfs/pull/3941))
- Change 'necessary' to 'necessary' ([ipfs/go-ipfs#3941](https://github.com/ipfs/go-ipfs/pull/3941))
- README.md: add Nix to the linux package managers ([ipfs/go-ipfs#3939](https://github.com/ipfs/go-ipfs/pull/3939))
- More verbose errors in filestore ([ipfs/go-ipfs#3964](https://github.com/ipfs/go-ipfs/pull/3964))
- Bug fixes

View File

@ -26,7 +26,7 @@ ipfs pin remote service add myservice https://myservice.tld:1234/api/path myacce
ipfs pin remote add /ipfs/bafymydata --service=myservice --name=myfile
ipfs pin remote ls --service=myservice --name=myfile
ipfs pin remote ls --service=myservice --cid=bafymydata
ipfs pin remote rm --serivce=myservice --name=myfile
ipfs pin remote rm --service=myservice --name=myfile
```
A few notes:

View File

@ -337,7 +337,7 @@ SECIO was deprecated and turned off by default given the prevalence of TLS and N
- schema/gen/go: please vet a bit more
- Introduce 'quip' data building helpers. ([ipld/go-ipld-prime#134](https://github.com/ipld/go-ipld-prime/pull/134))
- gengo: support for unions with stringprefix representation. ([ipld/go-ipld-prime#133](https://github.com/ipld/go-ipld-prime/pull/133))
- target of opporunity DRY improvement: use more shared templates for structs with stringjoin representations.
- target of opportunity DRY improvement: use more shared templates for structs with stringjoin representations.
- fix small consistency typo in gen function names.
- drop old generation mechanisms that were already deprecated.
- error type cleanup, and helpers.

View File

@ -81,7 +81,7 @@ func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn
return
}
keychan, err := bs.AllKeysChan(ctx)
keychain, err := bs.AllKeysChan(ctx)
if err != nil {
select {
case output <- Result{Error: err}:
@ -96,11 +96,11 @@ func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn
loop:
for ctx.Err() == nil { // select may not notice that we're "done".
select {
case k, ok := <-keychan:
case k, ok := <-keychain:
if !ok {
break loop
}
// NOTE: assumes that all CIDs returned by the keychan are _raw_ CIDv1 CIDs.
// NOTE: assumes that all CIDs returned by the keychain are _raw_ CIDv1 CIDs.
// This means we keep the block as long as we want it somewhere (CIDv1, CIDv0, Raw, other...).
if !gcs.Has(k) {
err := bs.DeleteBlock(ctx, k)

View File

@ -169,7 +169,7 @@ func TestRunMigrations(t *testing.T) {
err = RunMigration(ctx, fetcher, targetVer, fakeIpfs, false)
if err == nil || !strings.HasPrefix(err.Error(), "downgrade not allowed") {
t.Fatal("expected 'downgrade not alloed' error")
t.Fatal("expected 'downgrade not allowed' error")
}
err = RunMigration(ctx, fetcher, targetVer, fakeIpfs, true)

View File

@ -50,7 +50,7 @@ func TestSwarm(t *testing.T) {
actualID := output.Peers[0].Identify.ID
actualPublicKey := output.Peers[0].Identify.PublicKey
actualAgentVersion := output.Peers[0].Identify.AgentVersion
actualAdresses := output.Peers[0].Identify.Addresses
actualAddresses := output.Peers[0].Identify.Addresses
actualProtocols := output.Peers[0].Identify.Protocols
expectedID := otherNode.PeerID().String()
@ -59,8 +59,8 @@ func TestSwarm(t *testing.T) {
assert.Equal(t, actualID, expectedID)
assert.NotNil(t, actualPublicKey)
assert.NotNil(t, actualAgentVersion)
assert.Len(t, actualAdresses, 1)
assert.Equal(t, expectedAddresses[0], actualAdresses[0])
assert.Len(t, actualAddresses, 1)
assert.Equal(t, expectedAddresses[0], actualAddresses[0])
assert.Greater(t, len(actualProtocols), 0)
})

View File

@ -14,10 +14,10 @@ DEPS_$(d) += $(SHARNESS_$(d))
ifeq ($(OS),Linux)
PLUGINS_DIR_$(d) := $(d)/plugins/
ORGIN_PLUGINS_$(d) := $(plugin/plugins_plugins_so)
PLUGINS_$(d) := $(addprefix $(PLUGINS_DIR_$(d)),$(notdir $(ORGIN_PLUGINS_$(d))))
ORIGIN_PLUGINS_$(d) := $(plugin/plugins_plugins_so)
PLUGINS_$(d) := $(addprefix $(PLUGINS_DIR_$(d)),$(notdir $(ORIGIN_PLUGINS_$(d))))
$(PLUGINS_$(d)): $(ORGIN_PLUGINS_$(d))
$(PLUGINS_$(d)): $(ORIGIN_PLUGINS_$(d))
@mkdir -p $(@D)
cp -f plugin/plugins/$(@F) $@

View File

@ -802,7 +802,7 @@ test_expect_success "request for http://fake.domain.com/ipfs/{CID} with X-Forwar
# Kubo specific end-to-end test
# (independent of gateway-conformance)
# test configuration beign wired up correctly end-to-end
# test configuration being wired up correctly end-to-end
## ============================================================================
## Test support for wildcards in gateway config