From 837ffcfab521e84701304900fdc59543ce7e2fb3 Mon Sep 17 00:00:00 2001 From: luzpaz Date: Tue, 23 Aug 2022 09:44:11 -0400 Subject: [PATCH] all: Fix various user-facing and non-user-facing typos (#8509) Found via `codespell -q 3 -S lang,./gui/default/vendor -L benchs,bu,inflight,ro` --- GOALS.md | 2 +- cmd/stdiscosrv/replication.go | 2 +- cmd/syncthing/cli/index_idxck.go | 4 ++-- cmd/syncthing/main.go | 2 +- cmd/syncthing/monitor.go | 2 +- etc/freebsd-rc/README.md | 2 +- gui/default/syncthing/app.js | 2 +- gui/default/syncthing/core/syncthingController.js | 2 +- gui/default/vendor/fancytree/jquery.fancytree-all-deps.js | 4 ++-- lib/api/api_test.go | 6 +++--- lib/config/folderconfiguration.go | 2 +- lib/config/optionsconfiguration.go | 2 +- lib/connections/dialqueue_test.go | 2 +- lib/db/db_test.go | 2 +- lib/db/set_test.go | 4 ++-- lib/discover/global.go | 2 +- lib/fs/basicfs_fileinfo_windows.go | 2 +- lib/fs/casefs_test.go | 2 +- lib/fs/mtimefs_test.go | 2 +- lib/ignore/ignore.go | 2 +- lib/model/folder_sendrecv.go | 4 ++-- lib/model/model.go | 4 ++-- lib/model/requests_test.go | 2 +- lib/model/sentdownloadstate.go | 2 +- lib/protocol/protocol_test.go | 2 +- lib/syncthing/utils.go | 4 ++-- lib/upgrade/upgrade_test.go | 2 +- lib/watchaggregator/aggregator.go | 4 ++-- man/syncthing-rest-api.7 | 2 +- script/codecov-upload.sh | 4 ++-- 30 files changed, 40 insertions(+), 40 deletions(-) diff --git a/GOALS.md b/GOALS.md index dc0081460..1628ed461 100644 --- a/GOALS.md +++ b/GOALS.md @@ -57,7 +57,7 @@ latest technology is not always available to any given individual. > Computers include desktops, laptops, servers, virtual machines, small > general purpose computers such as Raspberry Pis and, *where possible*, > tablets and phones. NAS appliances, toasters, cars, firearms, thermostats -> and so on may include computing capabitilies but it is not our goal for +> and so on may include computing capabilities but it is not our goal for > Syncthing to run smoothly on these devices. ### 6. For Individuals diff --git a/cmd/stdiscosrv/replication.go b/cmd/stdiscosrv/replication.go index 72701ba94..f21c9cc01 100644 --- a/cmd/stdiscosrv/replication.go +++ b/cmd/stdiscosrv/replication.go @@ -120,7 +120,7 @@ func (s *replicationSender) Serve(ctx context.Context) error { if _, err := conn.Write(buf[:4+n]); err != nil { replicationSendsTotal.WithLabelValues("error").Inc() log.Println("Replication write:", err) - // Yes, we are loosing the replication event here. + // Yes, we are losing the replication event here. return err } replicationSendsTotal.WithLabelValues("success").Inc() diff --git a/cmd/syncthing/cli/index_idxck.go b/cmd/syncthing/cli/index_idxck.go index 240e4b19e..e15002ce0 100644 --- a/cmd/syncthing/cli/index_idxck.go +++ b/cmd/syncthing/cli/index_idxck.go @@ -57,7 +57,7 @@ func indexCheck(*cli.Context) (err error) { defer func() { if err == nil { if success { - fmt.Println("Index check completed succesfully.") + fmt.Println("Index check completed successfully.") } else { err = errors.New("Inconsistencies found in the index") } @@ -349,7 +349,7 @@ func indexCheck(*cli.Context) (err error) { func needsLocally(vl db.VersionList) bool { gfv, gok := vl.GetGlobal() - if !gok { // That's weird, but we hardly need something non-existant + if !gok { // That's weird, but we hardly need something non-existent return false } fv, ok := vl.Get(protocol.LocalDeviceID[:]) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index c9b363db1..3d6255a34 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -591,7 +591,7 @@ func syncthingMain(options serveOptions) { } // Check if auto-upgrades is possible, and if yes, and it's enabled do an initial - // upgrade immedately. The auto-upgrade routine can only be started + // upgrade immediately. The auto-upgrade routine can only be started // later after App is initialised. autoUpgradePossible := autoUpgradePossible(options) diff --git a/cmd/syncthing/monitor.go b/cmd/syncthing/monitor.go index b4b8d15ab..edd74ee93 100644 --- a/cmd/syncthing/monitor.go +++ b/cmd/syncthing/monitor.go @@ -273,7 +273,7 @@ func copyStderr(stderr io.Reader, dst io.Writer) { * This crash usually occurs due to one of the following reasons: * * - Syncthing being stopped abruptly (killed/loss of power) * * - Bad hardware (memory/disk issues) * -* - Software that affects disk writes (SSD caching software and simillar) * +* - Software that affects disk writes (SSD caching software and similar) * * * * Please see the following URL for instructions on how to recover: * * https://docs.syncthing.net/users/faq.html#my-syncthing-database-is-corrupt * diff --git a/etc/freebsd-rc/README.md b/etc/freebsd-rc/README.md index 3c62ddacf..ed946ecf9 100644 --- a/etc/freebsd-rc/README.md +++ b/etc/freebsd-rc/README.md @@ -13,4 +13,4 @@ syncthing_log_file= syncthing_user= syncthing_group= ``` -See the rc.d script for more informations. \ No newline at end of file +See the rc.d script for more information. \ No newline at end of file diff --git a/gui/default/syncthing/app.js b/gui/default/syncthing/app.js index b0d607bca..87e33dfc4 100644 --- a/gui/default/syncthing/app.js +++ b/gui/default/syncthing/app.js @@ -215,7 +215,7 @@ function buildTree(children) { // unitPrefixed converts the input such that it returns a string representation // <1000 (<1024) with the metric unit prefix suffixed. I.e. when calling this with -// binary == true, you need to suffix an additon 'i'. The "biggest" prefix used +// binary == true, you need to suffix an addition 'i'. The "biggest" prefix used // is 'T', numbers > 1000T are just returned as such big numbers. If ever deemed // useful 'P' can be added easily. function unitPrefixed(input, binary) { diff --git a/gui/default/syncthing/core/syncthingController.js b/gui/default/syncthing/core/syncthingController.js index c9e773ff4..8b998a142 100755 --- a/gui/default/syncthing/core/syncthingController.js +++ b/gui/default/syncthing/core/syncthingController.js @@ -2630,7 +2630,7 @@ angular.module('syncthing.core') noData: $translate.instant("There are no file versions to restore.") }, // Set to '1' to silence errors after pressing arrow keys on file nodes. - // Happens on the official option cofiguration from the developer's site + // Happens on the official option configuration from the developer's site // too, so probably a bug? debugLevel: 1, source: buildTree($scope.restoreVersions.versions), diff --git a/gui/default/vendor/fancytree/jquery.fancytree-all-deps.js b/gui/default/vendor/fancytree/jquery.fancytree-all-deps.js index cdd4262cc..8faf111a0 100644 --- a/gui/default/vendor/fancytree/jquery.fancytree-all-deps.js +++ b/gui/default/vendor/fancytree/jquery.fancytree-all-deps.js @@ -12900,7 +12900,7 @@ var uniqueId = $.fn.extend( { }, // Overide virtual methods for this extension. // `this` : is this extension object - // `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree) + // `this._super`: the virtual function that was overridden (member of prev. extension or Fancytree) treeInit: function(ctx) { var i, n, @@ -13715,7 +13715,7 @@ var uniqueId = $.fn.extend( { } // Add level-n class to apply indentation padding. // (Setting element style would not work, since it cannot easily be - // overriden while animations run) + // overridden while animations run) $(node.span).addClass("fancytree-level-" + level); return res; }, diff --git a/lib/api/api_test.go b/lib/api/api_test.go index 5e5d3a33c..7736b9b8c 100644 --- a/lib/api/api_test.go +++ b/lib/api/api_test.go @@ -1189,7 +1189,7 @@ func TestBrowse(t *testing.T) { current string returns []string }{ - // The direcotory without slash is completed to one with slash. + // The directory without slash is completed to one with slash. {tmpDir, []string{tmpDir + pathSep}}, // With slash it's completed to its contents. // Dirs are given pathSeps. @@ -1201,7 +1201,7 @@ func TestBrowse(t *testing.T) { {tmpDir + pathSep + "dir", []string{dirPath}}, {tmpDir + pathSep + "f", nil}, {tmpDir + pathSep + "q", nil}, - // Globbing is case-insensitve + // Globbing is case-insensitive {tmpDir + pathSep + "mixed", []string{mixedCaseDirPath}}, } @@ -1387,7 +1387,7 @@ func TestConfigChanges(t *testing.T) { t.Fatal(err) } if opts.MaxSendKbps != 50 { - t.Error("Exepcted 50 for MaxSendKbps, got", opts.MaxSendKbps) + t.Error("Expected 50 for MaxSendKbps, got", opts.MaxSendKbps) } } diff --git a/lib/config/folderconfiguration.go b/lib/config/folderconfiguration.go index 45cdaa861..700be1958 100644 --- a/lib/config/folderconfiguration.go +++ b/lib/config/folderconfiguration.go @@ -45,7 +45,7 @@ func (f FolderConfiguration) Copy() FolderConfiguration { // Filesystem creates a filesystem for the path and options of this folder. // The fset parameter may be nil, in which case no mtime handling on top of -// the fileystem is provided. +// the filesystem is provided. func (f FolderConfiguration) Filesystem(fset *db.FileSet) fs.Filesystem { // This is intentionally not a pointer method, because things like // cfg.Folders["default"].Filesystem(nil) should be valid. diff --git a/lib/config/optionsconfiguration.go b/lib/config/optionsconfiguration.go index c3ac282e6..ea2de8bee 100644 --- a/lib/config/optionsconfiguration.go +++ b/lib/config/optionsconfiguration.go @@ -189,7 +189,7 @@ func (opts OptionsConfiguration) FeatureFlag(name string) bool { // LowestConnectionLimit is the lower of ConnectionLimitEnough or // ConnectionLimitMax, or whichever of them is actually set if only one of -// them is set. It's the point where we should stop dialling. +// them is set. It's the point where we should stop dialing. func (opts OptionsConfiguration) LowestConnectionLimit() int { limit := opts.ConnectionLimitEnough if limit == 0 || (opts.ConnectionLimitMax != 0 && opts.ConnectionLimitMax < limit) { diff --git a/lib/connections/dialqueue_test.go b/lib/connections/dialqueue_test.go index 2a0ddd268..bdf33bc0a 100644 --- a/lib/connections/dialqueue_test.go +++ b/lib/connections/dialqueue_test.go @@ -20,7 +20,7 @@ func TestDialQueueSort(t *testing.T) { t.Run("ByLastSeen", func(t *testing.T) { t.Parallel() - // Devices seen within the last week or so should be sorted stricly in order. + // Devices seen within the last week or so should be sorted strictly in order. now := time.Now() queue := dialQueue{ {id: device1, lastSeen: now.Add(-5 * time.Hour)}, // 1 diff --git a/lib/db/db_test.go b/lib/db/db_test.go index 947188c20..0f6ee1e1c 100644 --- a/lib/db/db_test.go +++ b/lib/db/db_test.go @@ -754,7 +754,7 @@ func TestUpdateTo14(t *testing.T) { t.Fatal(err) } - // Initally add the correct file the usual way, all good here. + // Initially add the correct file the usual way, all good here. if err := db.updateLocalFiles(folder, []protocol.FileInfo{file}, meta); err != nil { t.Fatal(err) } diff --git a/lib/db/set_test.go b/lib/db/set_test.go index b479f5aee..902cfb10c 100644 --- a/lib/db/set_test.go +++ b/lib/db/set_test.go @@ -1020,7 +1020,7 @@ func TestWithHaveSequence(t *testing.T) { } func TestStressWithHaveSequence(t *testing.T) { - // This races two loops against each other: one that contiously does + // This races two loops against each other: one that continuously does // updates, and one that continuously does sequence walks. The test fails // if the sequence walker sees a discontinuity. @@ -1306,7 +1306,7 @@ func TestReceiveOnlyAccounting(t *testing.T) { t.Fatal("expected 1 receive only changed file after local change, not", n) } if n := receiveOnlyChangedSize(t, s).Bytes; n != 100 { - t.Fatal("expected 100 receive only changed btyes after local change, not", n) + t.Fatal("expected 100 receive only changed bytes after local change, not", n) } // Fake a revert. That's a two step process, first converting our diff --git a/lib/discover/global.go b/lib/discover/global.go index bebd3edd0..b1937efd7 100644 --- a/lib/discover/global.go +++ b/lib/discover/global.go @@ -137,7 +137,7 @@ func NewGlobal(server string, cert tls.Certificate, addrList AddressLister, evLo evLogger: evLogger, } if !opts.noAnnounce { - // If we are supposed to annonce, it's an error until we've done so. + // If we are supposed to announce, it's an error until we've done so. cl.setError(errors.New("not announced")) } diff --git a/lib/fs/basicfs_fileinfo_windows.go b/lib/fs/basicfs_fileinfo_windows.go index e510b60cd..b7ef4cb56 100644 --- a/lib/fs/basicfs_fileinfo_windows.go +++ b/lib/fs/basicfs_fileinfo_windows.go @@ -37,7 +37,7 @@ func (e basicFileInfo) Mode() FileMode { // NTFS deduped files. Remove the symlink bit. m &^= os.ModeSymlink } - // Set executable bits on files with executable extenions (.exe, .bat, etc). + // Set executable bits on files with executable extensions (.exe, .bat, etc). if isWindowsExecutable(e.Name()) { m |= 0111 } diff --git a/lib/fs/casefs_test.go b/lib/fs/casefs_test.go index 1e1ab8650..4dec87c7d 100644 --- a/lib/fs/casefs_test.go +++ b/lib/fs/casefs_test.go @@ -242,7 +242,7 @@ func benchmarkWalkFakeFS(b *testing.B, fsys Filesystem, paths []string, otherOpE } func TestStressCaseFS(t *testing.T) { - // Exercise a bunch of paralell operations for stressing out race + // Exercise a bunch of parallel operations for stressing out race // conditions in the realnamer cache etc. const limit = 10 * time.Second diff --git a/lib/fs/mtimefs_test.go b/lib/fs/mtimefs_test.go index 8258f000c..673b26b1f 100644 --- a/lib/fs/mtimefs_test.go +++ b/lib/fs/mtimefs_test.go @@ -205,7 +205,7 @@ func TestMtimeFSInsensitive(t *testing.T) { t.Error("Should not have failed:", err) } - // Check that we get back the mtime we set, if we were supposed to succed. + // Check that we get back the mtime we set, if we were supposed to succeed. info, err := fs.Lstat("testdata/FILE") if err != nil { t.Error("Lstat shouldn't fail:", err) diff --git a/lib/ignore/ignore.go b/lib/ignore/ignore.go index 1d63e46b8..a26e73c7b 100644 --- a/lib/ignore/ignore.go +++ b/lib/ignore/ignore.go @@ -556,7 +556,7 @@ func parseIgnoreFile(fs fs.Filesystem, fd io.Reader, currentFile string, cd Chan } else { // Wrap the error, as if the include does not exist, we get a // IsNotExists(err) == true error, which we use to check - // existance of the .stignore file, and just end up assuming + // existence of the .stignore file, and just end up assuming // there is none, rather than a broken include. err = parseError(fmt.Errorf("failed to load include file %s: %w", includeFile, err)) } diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index 395a575ed..af00eb2b5 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -503,7 +503,7 @@ nextFile: devices := snap.Availability(fileName) for _, dev := range devices { if _, ok := f.model.Connection(dev); ok { - // Handle the file normally, by coping and pulling, etc. + // Handle the file normally, by copying and pulling, etc. f.handleFile(fi, snap, copyChan) continue nextFile } @@ -1877,7 +1877,7 @@ func (f *sendReceiveFolder) newPullError(path string, err error) { // Establish context to differentiate from errors while scanning. // Use "syncing" as opposed to "pulling" as the latter might be used - // for errors occurring specificly in the puller routine. + // for errors occurring specifically in the puller routine. errStr := fmt.Sprintln("syncing:", err) f.tempPullErrors[path] = errStr diff --git a/lib/model/model.go b/lib/model/model.go index a917d19e2..24b37ece8 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -1433,7 +1433,7 @@ func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice } if !(hasTokenRemote || hasTokenLocal || isEncryptedRemote || isEncryptedLocal) { - // Noone cares about encryption here + // No one cares about encryption here return nil } @@ -1515,7 +1515,7 @@ func (m *model) ccCheckEncryption(fcfg config.FolderConfiguration, folderDevice m.fmut.Lock() m.folderEncryptionPasswordTokens[fcfg.ID] = ccToken m.fmut.Unlock() - // We can only announce ourselfs once we have the token, + // We can only announce ourselves once we have the token, // thus we need to resend CCs now that we have it. m.sendClusterConfig(fcfg.DeviceIDs()) return nil diff --git a/lib/model/requests_test.go b/lib/model/requests_test.go index 39ca8b4b1..a2a8d4e57 100644 --- a/lib/model/requests_test.go +++ b/lib/model/requests_test.go @@ -1174,7 +1174,7 @@ func TestRequestIndexSenderPause(t *testing.T) { var seq int64 = 1 files := []protocol.FileInfo{{Name: "foo", Size: 10, Version: protocol.Vector{}.Update(myID.Short()), Sequence: seq}} - // Both devices connected, noone paused + // Both devices connected, none paused localIndexUpdate(m, fcfg.ID, files) select { case <-time.After(5 * time.Second): diff --git a/lib/model/sentdownloadstate.go b/lib/model/sentdownloadstate.go index 3a5bcd702..2c205a7ad 100644 --- a/lib/model/sentdownloadstate.go +++ b/lib/model/sentdownloadstate.go @@ -78,7 +78,7 @@ func (s *sentFolderDownloadState) update(pullers []*sharedPullerState) []protoco } if !pullerVersion.Equal(localFile.version) || !pullerCreated.Equal(localFile.created) { - // The version has changed or the puller was reconstrcuted due to failure. + // The version has changed or the puller was reconstructed due to failure. // Clean up whatever we had for the old file, and advertise the new file. updates = append(updates, protocol.FileDownloadProgressUpdate{ diff --git a/lib/protocol/protocol_test.go b/lib/protocol/protocol_test.go index 722623ae7..2ce8c0025 100644 --- a/lib/protocol/protocol_test.go +++ b/lib/protocol/protocol_test.go @@ -702,7 +702,7 @@ func TestIsEquivalent(t *testing.T) { // Empty FileInfos are equivalent {eq: true}, - // Various basic attributes, all of which cause ineqality when + // Various basic attributes, all of which cause inequality when // they differ { a: FileInfo{Name: "foo"}, diff --git a/lib/syncthing/utils.go b/lib/syncthing/utils.go index 5d406fbfd..c707e895b 100644 --- a/lib/syncthing/utils.go +++ b/lib/syncthing/utils.go @@ -30,7 +30,7 @@ func EnsureDir(dir string, mode fs.FileMode) error { } if fi, err := fs.Stat("."); err == nil { - // Apprently the stat may fail even though the mkdirall passed. If it + // Apparently the stat may fail even though the mkdirall passed. If it // does, we'll just assume things are in order and let other things // fail (like loading or creating the config...). currentMode := fi.Mode() & 0777 @@ -83,7 +83,7 @@ func DefaultConfig(path string, myID protocol.DeviceID, evLogger events.Logger, } // LoadConfigAtStartup loads an existing config. If it doesn't yet exist, it -// creates a default one, without the default folder if noDefaultFolder is ture. +// creates a default one, without the default folder if noDefaultFolder is true. // Otherwise it checks the version, and archives and upgrades the config if // necessary or returns an error, if the version isn't compatible. func LoadConfigAtStartup(path string, cert tls.Certificate, evLogger events.Logger, allowNewerConfig, noDefaultFolder, skipPortProbing bool) (config.Wrapper, error) { diff --git a/lib/upgrade/upgrade_test.go b/lib/upgrade/upgrade_test.go index 1197fc781..919af72c1 100644 --- a/lib/upgrade/upgrade_test.go +++ b/lib/upgrade/upgrade_test.go @@ -144,7 +144,7 @@ func TestSelectedReleaseMacOS(t *testing.T) { }, } - // Check that it is selected and the asset is as epected + // Check that it is selected and the asset is as expected sel, err := SelectLatestRelease(rels, "v0.14.46", false) if err != nil { t.Fatal("Unexpected error:", err) diff --git a/lib/watchaggregator/aggregator.go b/lib/watchaggregator/aggregator.go index a21b5462b..c4567226f 100644 --- a/lib/watchaggregator/aggregator.go +++ b/lib/watchaggregator/aggregator.go @@ -399,7 +399,7 @@ func (a *aggregator) popOldEventsTo(to map[string]*aggregatedEvent, dir *eventDi func (a *aggregator) isOld(ev *aggregatedEvent, currTime time.Time, delayRem bool) bool { // Deletes should in general be scanned last, therefore they are delayed by - // letting them time out. This behaviour is overriden by delayRem == false. + // letting them time out. This behaviour is overridden by delayRem == false. // Refer to following comments as to why. // An event that has not registered any new modifications recently is scanned. // a.notifyDelay is the user facing value signifying the normal delay between @@ -413,7 +413,7 @@ func (a *aggregator) isOld(ev *aggregatedEvent, currTime time.Time, delayRem boo // is delayed to reduce resource usage, but after a certain time (notifyTimeout) // passed it is scanned anyway. // If only removals are remaining to be scanned, there is no point to delay - // removals further, so this behaviour is overriden by delayRem == false. + // removals further, so this behaviour is overridden by delayRem == false. return currTime.Sub(ev.firstModTime) > a.notifyTimeout } diff --git a/man/syncthing-rest-api.7 b/man/syncthing-rest-api.7 index 0ee4a33ae..8e474b67f 100644 --- a/man/syncthing-rest-api.7 +++ b/man/syncthing-rest-api.7 @@ -1944,7 +1944,7 @@ These endpoints require the \fBgui.debugging\fP configuration option to be enabled and yield an access denied error code otherwise. .SS GET /rest/debug/peerCompletion .sp -Summarizes the completion precentage for each remote device. Returns an object +Summarizes the completion percentage for each remote device. Returns an object with device IDs as keys and an integer percentage as values. .SS GET /rest/debug/httpmetrics .sp diff --git a/script/codecov-upload.sh b/script/codecov-upload.sh index d443a8979..cb507a62c 100755 --- a/script/codecov-upload.sh +++ b/script/codecov-upload.sh @@ -155,8 +155,8 @@ cat << EOF -c Move discovered coverage reports to the trash -z FILE Upload specified file directly to Codecov and bypass all report generation. - This is inteded to be used only with a pre-formatted Codecov report and is not - expected to work under any other circumstances. + This is intended to be used only with a pre-formatted Codecov report and is + not expected to work under any other circumstances. -Z Exit with 1 if not successful. Default will Exit with 0 -- xcode --