@cryptotaxi247 / kubo / commits / 2b858bb3e

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>

Piotr Galar committed Aug 14, 2025 at 01:35 UTC 2b858bb3e6b4d0135a9f652bb4a60091ecd1f8bf
24 files changed +53 -71
.codespell-ignore deleted
-21
@@ -1,21 +0,0 @@
1 -Adin
2 -nd
3 -Nd
4 -afile
5 -thirdparty
6 -receivedFrom
7 -origN
8 -hel
9 -TotalIn
10 -childs
11 -userA
12 -AssignT
13 -OT
14 -AssignT
15 -fo
16 -recusive
17 -raison
18 -Boddy
19 -ressource
20 -achin
21 -re-using
.cspell.yml new
+6
@@ -0,0 +1,6 @@
1 +ignoreWords:
2 + - childs # This spelling is used in the files command
3 + - NodeCreater # This spelling is used in the fuse dependency
4 + - Boddy # One of the contributors to the project - Chris Boddy
5 + - Botto # One of the contributors to the project - Santiago Botto
6 + - cose # dag-cose
.github/workflows/spellcheck.yml
+13 -16
@@ -1,21 +1,18 @@
1 name: Spell Check
2
3 -on: [push, pull_request]
3 +on:
4 + pull_request:
5 + push:
6 + branches: ["master"]
7 + workflow_dispatch:
8
5 -jobs:
6 - spellcheck:
7 - runs-on: ubuntu-latest
8 -
9 - steps:
10 - - name: Checkout code
11 - uses: actions/checkout@v4
9 +permissions:
10 + contents: read
11
13 - - name: Install Codespell
14 - run: pip install codespell==2.4.0
12 +concurrency:
13 + group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
14 + cancel-in-progress: true
15
16 - - name: Run Codespell
17 - uses: codespell-project/actions-codespell@v2
18 - with:
19 - only_warn: 1
20 - ignore_words_file: .codespell-ignore
21 - skip: "*.mod,*.sum,*.pdf,./docs/AUTHORS,./test/sharness/t0275-cid-security-data,./test/sharness/t0280-plugin-dag-jose-data,./bin"
16 +jobs:
17 + spellcheck:
18 + uses: ipdxco/unified-github-workflows/.github/workflows/reusable-spellcheck.yml@v1
config/bootstrap_peers_test.go
+1 -1
@@ -5,7 +5,7 @@ import (
5 "testing"
6 )
7
8 -func TestBoostrapPeerStrings(t *testing.T) {
8 +func TestBootstrapPeerStrings(t *testing.T) {
9 parsed, err := ParseBootstrapPeers(DefaultBootstrapAddresses)
10 if err != nil {
11 t.Fatal(err)
core/commands/cid.go
+1 -1
@@ -409,7 +409,7 @@ func (s multibaseSorter) Sort() {
409 if n := cmp.Compare(unicode.ToLower(rune(a.Code)), unicode.ToLower(rune(b.Code))); n != 0 {
410 return n
411 }
412 - // lowecase letters should come before uppercase
412 + // lowercase letters should come before uppercase
413 return cmp.Compare(b.Code, a.Code)
414 })
415 }
core/commands/stat_reprovide.go
+1 -1
@@ -10,7 +10,7 @@ var statReprovideCmd = &cmds.Command{
10 Tagline: "Deprecated command, use 'ipfs provide stat' instead.",
11 ShortDescription: `
12 'ipfs stats reprovide' is deprecated because provider stats are now
13 -available fomr 'ipfs provide stat'.
13 +available from 'ipfs provide stat'.
14 `,
15 },
16 Arguments: provideStatCmd.Arguments,
core/coreiface/tests/pin.go
+2 -2
@@ -433,7 +433,7 @@ func getThreeChainedNodes(t *testing.T, ctx context.Context, api iface.CoreAPI,
433 return immutablePathCidContainer{leaf}, parent, grandparent
434 }
435
436 -func assertPinTypes(t *testing.T, ctx context.Context, api iface.CoreAPI, recusive, direct, indirect []cidContainer) {
436 +func assertPinTypes(t *testing.T, ctx context.Context, api iface.CoreAPI, recursive, direct, indirect []cidContainer) {
437 assertPinLsAllConsistency(t, ctx, api)
438
439 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
441 t.Fatal(err)
442 }
443
444 - assertPinCids(t, list, recusive...)
444 + assertPinCids(t, list, recursive...)
445
446 list, err = accPins(ctx, api, opt.Pin.Ls.Direct())
447 if err != nil {
core/node/core.go
+2 -2
@@ -214,8 +214,8 @@ func Files(strategy string) func(mctx helpers.MetricsCtx, lc fx.Lifecycle, repo
214 return nil, err
215 }
216
217 - offineDag := merkledag.NewDAGService(blockservice.New(bs, offline.Exchange(bs)))
218 - rnd, err := offineDag.Get(ctx, c)
217 + offlineDag := merkledag.NewDAGService(blockservice.New(bs, offline.Exchange(bs)))
218 + rnd, err := offlineDag.Get(ctx, c)
219 if err != nil {
220 return nil, fmt.Errorf("error loading filesroot from dagservice: %s", err)
221 }
core/node/libp2p/addrs.go
+6 -6
@@ -36,7 +36,7 @@ func AddrFilters(filters []string) func() (*ma.Filters, Libp2pOpts, error) {
36 }
37 }
38
39 -func makeAddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string) (p2pbhost.AddrsFactory, error) {
39 +func makeAddrsFactory(announce []string, appendAnnounce []string, noAnnounce []string) (p2pbhost.AddrsFactory, error) {
40 var err error // To assign to the slice in the for loop
41 existing := make(map[string]bool) // To avoid duplicates
42
@@ -50,7 +50,7 @@ func makeAddrsFactory(announce []string, appendAnnouce []string, noAnnounce []st
50 }
51
52 var appendAnnAddrs []ma.Multiaddr
53 - for _, addr := range appendAnnouce {
53 + for _, addr := range appendAnnounce {
54 if existing[addr] {
55 // skip AppendAnnounce that is on the Announce list already
56 continue
@@ -99,14 +99,14 @@ func makeAddrsFactory(announce []string, appendAnnouce []string, noAnnounce []st
99 }, nil
100 }
101
102 -func AddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string) interface{} {
102 +func AddrsFactory(announce []string, appendAnnounce []string, noAnnounce []string) interface{} {
103 return func(params struct {
104 fx.In
105 ForgeMgr *p2pforge.P2PForgeCertMgr `optional:"true"`
106 },
107 ) (opts Libp2pOpts, err error) {
108 var addrsFactory p2pbhost.AddrsFactory
109 - announceAddrsFactory, err := makeAddrsFactory(announce, appendAnnouce, noAnnounce)
109 + announceAddrsFactory, err := makeAddrsFactory(announce, appendAnnounce, noAnnounce)
110 if err != nil {
111 return opts, err
112 }
@@ -115,8 +115,8 @@ func AddrsFactory(announce []string, appendAnnouce []string, noAnnounce []string
115 } else {
116 addrsFactory = func(multiaddrs []ma.Multiaddr) []ma.Multiaddr {
117 forgeProcessing := params.ForgeMgr.AddressFactory()(multiaddrs)
118 - annouceProcessing := announceAddrsFactory(forgeProcessing)
119 - return annouceProcessing
118 + announceProcessing := announceAddrsFactory(forgeProcessing)
119 + return announceProcessing
120 }
121 }
122 opts.Opts = append(opts.Opts, libp2p.AddrsFactory(addrsFactory))
docs/changelogs/v0.10.md
+1 -1
@@ -80,7 +80,7 @@ Performance profiles can now be collected using `ipfs diag profile`. If you need
80
81 #### 🍎 Mac OS notarized binaries
82
83 -The go-ipfs and related migration binaries (for both Intel and Apple Sillicon) are now signed and notarized to make Mac OS installation easier.
83 +The go-ipfs and related migration binaries (for both Intel and Apple Silicon) are now signed and notarized to make Mac OS installation easier.
84
85 #### 👨‍👩‍👦 Improved MDNS
86
docs/changelogs/v0.18.md
+1 -1
@@ -629,7 +629,7 @@ and various improvements have been made to improve the UX including:
629 - 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))
630 - update pubsub deps (#491) ([libp2p/go-libp2p-pubsub#491](https://github.com/libp2p/go-libp2p-pubsub/pull/491))
631 - Gossipsub: Unsubscribe backoff (#488) ([libp2p/go-libp2p-pubsub#488](https://github.com/libp2p/go-libp2p-pubsub/pull/488))
632 - - 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))
632 + - 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))
633 - 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))
634 - fix unused GossipSubHistoryGossip, make seenMessages ttl configurable, make score params SeenMsgTTL configurable
635 - Update README.md
docs/changelogs/v0.2.md
+1 -1
@@ -10,7 +10,7 @@
10 config file Bootstrap field changed accordingly. users
11 can upgrade cleanly with:
12
13 - ipfs bootstrap >boostrap_peers
13 + ipfs bootstrap >bootstrap_peers
14 ipfs bootstrap rm --all
15 <install new ipfs>
16 <manually add .../ipfs/... to addrs in bootstrap_peers>
docs/changelogs/v0.20.md
+1 -1
@@ -471,7 +471,7 @@ You can read more about the rationale behind this decision on the [tracking issu
471 - identify: fix stale comment (#2179) ([libp2p/go-libp2p#2179](https://github.com/libp2p/go-libp2p/pull/2179))
472 - relay service: add metrics (#2154) ([libp2p/go-libp2p#2154](https://github.com/libp2p/go-libp2p/pull/2154))
473 - identify: Fix IdentifyWait when Connected events happen out of order (#2173) ([libp2p/go-libp2p#2173](https://github.com/libp2p/go-libp2p/pull/2173))
474 - - chore: fix ressource manager's README (#2168) ([libp2p/go-libp2p#2168](https://github.com/libp2p/go-libp2p/pull/2168))
474 + - chore: fix resource manager's README (#2168) ([libp2p/go-libp2p#2168](https://github.com/libp2p/go-libp2p/pull/2168))
475 - relay: fix deadlock when closing (#2171) ([libp2p/go-libp2p#2171](https://github.com/libp2p/go-libp2p/pull/2171))
476 - core: remove LocalPrivateKey method from network.Conn interface (#2144) ([libp2p/go-libp2p#2144](https://github.com/libp2p/go-libp2p/pull/2144))
477 - routed host: return connection error instead of routing error (#2169) ([libp2p/go-libp2p#2169](https://github.com/libp2p/go-libp2p/pull/2169))
docs/changelogs/v0.21.md
+1 -1
@@ -263,7 +263,7 @@ should be using AcceleratedDHTClient because they are falling behind.
263 - chore: release v0.24.0
264 - 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))
265 - github.com/libp2p/go-libp2p-kbucket (v0.5.0 -> v0.6.3):
266 - - fix: fix abba bug in UsefullNewPeer ([libp2p/go-libp2p-kbucket#122](https://github.com/libp2p/go-libp2p-kbucket/pull/122))
266 + - fix: fix abba bug in UsefulNewPeer ([libp2p/go-libp2p-kbucket#122](https://github.com/libp2p/go-libp2p-kbucket/pull/122))
267 - chore: release v0.6.2 ([libp2p/go-libp2p-kbucket#121](https://github.com/libp2p/go-libp2p-kbucket/pull/121))
268 - Replacing UsefulPeer() with UsefulNewPeer() ([libp2p/go-libp2p-kbucket#120](https://github.com/libp2p/go-libp2p-kbucket/pull/120))
269 - chore: release 0.6.1 ([libp2p/go-libp2p-kbucket#119](https://github.com/libp2p/go-libp2p-kbucket/pull/119))
docs/changelogs/v0.22.md
+1 -1
@@ -236,7 +236,7 @@ This includes a breaking change to `ipfs id` and some of the `ipfs swarm` comman
236 - chore: cleanup error handling in compparallel
237 - fix: correctly handle errors in compparallel
238 - fix: make the ProvideMany docs clearer
239 - - perf: remove goroutine that just waits before closing with a synchrous waitgroup
239 + - perf: remove goroutine that just waits before closing with a synchronous waitgroup
240 - github.com/libp2p/go-nat (v0.1.0 -> v0.2.0):
241 - release v0.2.0 (#30) ([libp2p/go-nat#30](https://github.com/libp2p/go-nat/pull/30))
242 - update deps, use contexts on UPnP functions (#29) ([libp2p/go-nat#29](https://github.com/libp2p/go-nat/pull/29))
docs/changelogs/v0.31.md
+1 -1
@@ -36,7 +36,7 @@ For a description of the available tuning parameters, see [kubo/docs/datastores.
36
37 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.
38
39 -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.
39 +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.
40
41 > [!IMPORTANT]
42 > If you've ever applied the `lowpower` profile before, there is a high chance your node is not announcing to DHT anymore.
docs/changelogs/v0.4.md
+1 -1
@@ -3255,7 +3255,7 @@ other requested improvements. See below for the full list of changes.
3255 - Make sure all keystore keys get republished ([ipfs/go-ipfs#3951](https://github.com/ipfs/go-ipfs/pull/3951))
3256 - Documentation
3257 - Adding documentation on PubSub encodings ([ipfs/go-ipfs#3909](https://github.com/ipfs/go-ipfs/pull/3909))
3258 - - Change 'neccessary' to 'necessary' ([ipfs/go-ipfs#3941](https://github.com/ipfs/go-ipfs/pull/3941))
3258 + - Change 'necessary' to 'necessary' ([ipfs/go-ipfs#3941](https://github.com/ipfs/go-ipfs/pull/3941))
3259 - README.md: add Nix to the linux package managers ([ipfs/go-ipfs#3939](https://github.com/ipfs/go-ipfs/pull/3939))
3260 - More verbose errors in filestore ([ipfs/go-ipfs#3964](https://github.com/ipfs/go-ipfs/pull/3964))
3261 - Bug fixes
docs/changelogs/v0.8.md
+1 -1
@@ -26,7 +26,7 @@ ipfs pin remote service add myservice https://myservice.tld:1234/api/path myacce
26 ipfs pin remote add /ipfs/bafymydata --service=myservice --name=myfile
27 ipfs pin remote ls --service=myservice --name=myfile
28 ipfs pin remote ls --service=myservice --cid=bafymydata
29 -ipfs pin remote rm --serivce=myservice --name=myfile
29 +ipfs pin remote rm --service=myservice --name=myfile
30 ```
31 A few notes:
32
docs/changelogs/v0.9.md
+1 -1
@@ -337,7 +337,7 @@ SECIO was deprecated and turned off by default given the prevalence of TLS and N
337 - schema/gen/go: please vet a bit more
338 - Introduce 'quip' data building helpers. ([ipld/go-ipld-prime#134](https://github.com/ipld/go-ipld-prime/pull/134))
339 - gengo: support for unions with stringprefix representation. ([ipld/go-ipld-prime#133](https://github.com/ipld/go-ipld-prime/pull/133))
340 - - target of opporunity DRY improvement: use more shared templates for structs with stringjoin representations.
340 + - target of opportunity DRY improvement: use more shared templates for structs with stringjoin representations.
341 - fix small consistency typo in gen function names.
342 - drop old generation mechanisms that were already deprecated.
343 - error type cleanup, and helpers.
gc/gc.go
+3 -3
@@ -81,7 +81,7 @@ func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn
81 return
82 }
83
84 - keychan, err := bs.AllKeysChan(ctx)
84 + keychain, err := bs.AllKeysChan(ctx)
85 if err != nil {
86 select {
87 case output <- Result{Error: err}:
@@ -96,11 +96,11 @@ func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn
96 loop:
97 for ctx.Err() == nil { // select may not notice that we're "done".
98 select {
99 - case k, ok := <-keychan:
99 + case k, ok := <-keychain:
100 if !ok {
101 break loop
102 }
103 - // NOTE: assumes that all CIDs returned by the keychan are _raw_ CIDv1 CIDs.
103 + // NOTE: assumes that all CIDs returned by the keychain are _raw_ CIDv1 CIDs.
104 // This means we keep the block as long as we want it somewhere (CIDv1, CIDv0, Raw, other...).
105 if !gcs.Has(k) {
106 err := bs.DeleteBlock(ctx, k)
repo/fsrepo/migrations/migrations_test.go
+1 -1
@@ -169,7 +169,7 @@ func TestRunMigrations(t *testing.T) {
169
170 err = RunMigration(ctx, fetcher, targetVer, fakeIpfs, false)
171 if err == nil || !strings.HasPrefix(err.Error(), "downgrade not allowed") {
172 - t.Fatal("expected 'downgrade not alloed' error")
172 + t.Fatal("expected 'downgrade not allowed' error")
173 }
174
175 err = RunMigration(ctx, fetcher, targetVer, fakeIpfs, true)
test/cli/swarm_test.go
+3 -3
@@ -50,7 +50,7 @@ func TestSwarm(t *testing.T) {
50 actualID := output.Peers[0].Identify.ID
51 actualPublicKey := output.Peers[0].Identify.PublicKey
52 actualAgentVersion := output.Peers[0].Identify.AgentVersion
53 - actualAdresses := output.Peers[0].Identify.Addresses
53 + actualAddresses := output.Peers[0].Identify.Addresses
54 actualProtocols := output.Peers[0].Identify.Protocols
55
56 expectedID := otherNode.PeerID().String()
@@ -59,8 +59,8 @@ func TestSwarm(t *testing.T) {
59 assert.Equal(t, actualID, expectedID)
60 assert.NotNil(t, actualPublicKey)
61 assert.NotNil(t, actualAgentVersion)
62 - assert.Len(t, actualAdresses, 1)
63 - assert.Equal(t, expectedAddresses[0], actualAdresses[0])
62 + assert.Len(t, actualAddresses, 1)
63 + assert.Equal(t, expectedAddresses[0], actualAddresses[0])
64 assert.Greater(t, len(actualProtocols), 0)
65 })
66
test/sharness/Rules.mk
+3 -3
@@ -14,10 +14,10 @@ DEPS_$(d) += $(SHARNESS_$(d))
14
15 ifeq ($(OS),Linux)
16 PLUGINS_DIR_$(d) := $(d)/plugins/
17 -ORGIN_PLUGINS_$(d) := $(plugin/plugins_plugins_so)
18 -PLUGINS_$(d) := $(addprefix $(PLUGINS_DIR_$(d)),$(notdir $(ORGIN_PLUGINS_$(d))))
17 +ORIGIN_PLUGINS_$(d) := $(plugin/plugins_plugins_so)
18 +PLUGINS_$(d) := $(addprefix $(PLUGINS_DIR_$(d)),$(notdir $(ORIGIN_PLUGINS_$(d))))
19
20 -$(PLUGINS_$(d)): $(ORGIN_PLUGINS_$(d))
20 +$(PLUGINS_$(d)): $(ORIGIN_PLUGINS_$(d))
21 @mkdir -p $(@D)
22 cp -f plugin/plugins/$(@F) $@
23
test/sharness/t0114-gateway-subdomains.sh
+1 -1
@@ -802,7 +802,7 @@ test_expect_success "request for http://fake.domain.com/ipfs/{CID} with X-Forwar
802
803 # Kubo specific end-to-end test
804 # (independent of gateway-conformance)
805 -# test configuration beign wired up correctly end-to-end
805 +# test configuration being wired up correctly end-to-end
806
807 ## ============================================================================
808 ## Test support for wildcards in gateway config