diff --git a/.codespell-ignore b/.codespell-ignore deleted file mode 100644 index 4b7efa7c0..000000000 --- a/.codespell-ignore +++ /dev/null @@ -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 diff --git a/.cspell.yml b/.cspell.yml new file mode 100644 index 000000000..da6c80196 --- /dev/null +++ b/.cspell.yml @@ -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 diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index a34cc0798..4eda8b222 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -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 diff --git a/config/bootstrap_peers_test.go b/config/bootstrap_peers_test.go index eeea9b5fd..2d2b66045 100644 --- a/config/bootstrap_peers_test.go +++ b/config/bootstrap_peers_test.go @@ -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) diff --git a/core/commands/cid.go b/core/commands/cid.go index a1660e509..0be9f6cc1 100644 --- a/core/commands/cid.go +++ b/core/commands/cid.go @@ -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) }) } diff --git a/core/commands/stat_reprovide.go b/core/commands/stat_reprovide.go index 0e18ceedd..87893d1b5 100644 --- a/core/commands/stat_reprovide.go +++ b/core/commands/stat_reprovide.go @@ -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, diff --git a/core/coreiface/tests/pin.go b/core/coreiface/tests/pin.go index 4c606323f..18f90c051 100644 --- a/core/coreiface/tests/pin.go +++ b/core/coreiface/tests/pin.go @@ -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 { diff --git a/core/node/core.go b/core/node/core.go index 38e68f285..0a0ded89a 100644 --- a/core/node/core.go +++ b/core/node/core.go @@ -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) } diff --git a/core/node/libp2p/addrs.go b/core/node/libp2p/addrs.go index 91fae17c5..135b71d91 100644 --- a/core/node/libp2p/addrs.go +++ b/core/node/libp2p/addrs.go @@ -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)) diff --git a/docs/changelogs/v0.10.md b/docs/changelogs/v0.10.md index 9a1d8b8af..429ff7d37 100644 --- a/docs/changelogs/v0.10.md +++ b/docs/changelogs/v0.10.md @@ -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 diff --git a/docs/changelogs/v0.18.md b/docs/changelogs/v0.18.md index 972ecb84e..70ce9ef24 100644 --- a/docs/changelogs/v0.18.md +++ b/docs/changelogs/v0.18.md @@ -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 diff --git a/docs/changelogs/v0.2.md b/docs/changelogs/v0.2.md index 4e60221d5..4d42ea2f5 100644 --- a/docs/changelogs/v0.2.md +++ b/docs/changelogs/v0.2.md @@ -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 diff --git a/docs/changelogs/v0.20.md b/docs/changelogs/v0.20.md index 3a6ce8f64..e26c0695d 100644 --- a/docs/changelogs/v0.20.md +++ b/docs/changelogs/v0.20.md @@ -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)) diff --git a/docs/changelogs/v0.21.md b/docs/changelogs/v0.21.md index 569ea8f79..e8511d981 100644 --- a/docs/changelogs/v0.21.md +++ b/docs/changelogs/v0.21.md @@ -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)) diff --git a/docs/changelogs/v0.22.md b/docs/changelogs/v0.22.md index 3aa55f30e..503c618fc 100644 --- a/docs/changelogs/v0.22.md +++ b/docs/changelogs/v0.22.md @@ -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)) diff --git a/docs/changelogs/v0.31.md b/docs/changelogs/v0.31.md index b20b15862..e055cc9f4 100644 --- a/docs/changelogs/v0.31.md +++ b/docs/changelogs/v0.31.md @@ -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. diff --git a/docs/changelogs/v0.4.md b/docs/changelogs/v0.4.md index 3f2b9c358..de15c51dd 100644 --- a/docs/changelogs/v0.4.md +++ b/docs/changelogs/v0.4.md @@ -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 diff --git a/docs/changelogs/v0.8.md b/docs/changelogs/v0.8.md index d9d42fa89..8b28ff706 100644 --- a/docs/changelogs/v0.8.md +++ b/docs/changelogs/v0.8.md @@ -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: diff --git a/docs/changelogs/v0.9.md b/docs/changelogs/v0.9.md index 64b94e97e..c0dba5abd 100644 --- a/docs/changelogs/v0.9.md +++ b/docs/changelogs/v0.9.md @@ -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. diff --git a/gc/gc.go b/gc/gc.go index 37daa887c..1d4805a66 100644 --- a/gc/gc.go +++ b/gc/gc.go @@ -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) diff --git a/repo/fsrepo/migrations/migrations_test.go b/repo/fsrepo/migrations/migrations_test.go index 96370f864..ff5e2bfe0 100644 --- a/repo/fsrepo/migrations/migrations_test.go +++ b/repo/fsrepo/migrations/migrations_test.go @@ -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) diff --git a/test/cli/swarm_test.go b/test/cli/swarm_test.go index ecb668362..88f5f403b 100644 --- a/test/cli/swarm_test.go +++ b/test/cli/swarm_test.go @@ -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) }) diff --git a/test/sharness/Rules.mk b/test/sharness/Rules.mk index 2f2e076ba..0ac3cf950 100644 --- a/test/sharness/Rules.mk +++ b/test/sharness/Rules.mk @@ -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) $@ diff --git a/test/sharness/t0114-gateway-subdomains.sh b/test/sharness/t0114-gateway-subdomains.sh index 7d18ab265..ae1bc1a93 100755 --- a/test/sharness/t0114-gateway-subdomains.sh +++ b/test/sharness/t0114-gateway-subdomains.sh @@ -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