diff --git a/Makefile b/Makefile index cec18cbf7d..7eaeaf0c5d 100644 --- a/Makefile +++ b/Makefile @@ -580,7 +580,7 @@ config-reset: ## Resets the config/config.json file to the default. diff-config: ## Compares default configuration between two mattermost versions @./scripts/diff-config.sh -clean: stop-docker ## Clean up everything except persistant server data. +clean: stop-docker ## Clean up everything except persistent server data. @echo Cleaning rm -Rf $(DIST_ROOT) @@ -670,7 +670,7 @@ ifeq ($(BUILD_ENTERPRISE_READY),true) @! ag --ignore Makefile --ignore-dir vendor --ignore-dir runtime '(TODO|XXX|FIXME|"FIX ME")[: ]+' enterprise/ endif -## Help documentatin à la https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html +## Help documentation à la https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html help: @grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' ./Makefile | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' @echo diff --git a/NOTICE.txt b/NOTICE.txt index 0d3d8dd98f..3f186ef717 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -4494,7 +4494,7 @@ SOFTWARE. This product contains 'archiver' by Matthew Holt -A library to handle direferen archive files (zip, rar, tar.gz...) +A library to handle different archive files (zip, rar, tar.gz...) * HOMEPAGE: * https://github.com/mholt/archiver diff --git a/api4/plugin_test.go b/api4/plugin_test.go index e28ee48d19..88e980dd5f 100644 --- a/api4/plugin_test.go +++ b/api4/plugin_test.go @@ -1706,7 +1706,7 @@ func TestInstallMarketplacePlugin(t *testing.T) { require.NoError(t, err) th := SetupConfig(t, func(cfg *model.Config) { - // Disable auto-installing prepackged plugins + // Disable auto-installing prepackaged plugins *cfg.PluginSettings.AutomaticPrepackagedPlugins = false }).InitBasic() defer th.TearDown() diff --git a/api4/post_test.go b/api4/post_test.go index 1529525d35..f6fb01ce96 100644 --- a/api4/post_test.go +++ b/api4/post_test.go @@ -2680,7 +2680,7 @@ func TestSetPostUnreadWithoutCollapsedThreads(t *testing.T) { // user2: first root mention @user1 // - user1: hello // - user2: mention @u1 - // - user1: another repoy + // - user1: another reply // - user2: another mention @u1 // user1: a root post // user2: Another root mention @u1 diff --git a/api4/system.go b/api4/system.go index 3dc93ba4bb..bf477f75d3 100644 --- a/api4/system.go +++ b/api4/system.go @@ -75,7 +75,7 @@ func generateSupportPacket(c *Context, w http.ResponseWriter, r *http.Request) { const OutputDirectory = "support_packet" // Checking to see if the user is a admin of any sort or not - // If they are a admin, they should theoritcally have access to one or more of the system console read permissions + // If they are a admin, they should theoretically have access to one or more of the system console read permissions if !c.App.SessionHasPermissionToAny(*c.AppContext.Session(), model.SysconsoleReadPermissions) { c.SetPermissionError(model.SysconsoleReadPermissions...) return diff --git a/api4/webhook_test.go b/api4/webhook_test.go index b588f3d6d0..2de602625e 100644 --- a/api4/webhook_test.go +++ b/api4/webhook_test.go @@ -752,7 +752,7 @@ func TestUpdateIncomingHook(t *testing.T) { th.App.UpdateConfig(func(cfg *model.Config) { *cfg.ServiceSettings.EnablePostIconOverride = false }) th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) { - // webhook creations are allways performed by a sysadmin + // webhook creations are always performed by a sysadmin // because it's not currently possible to create a webhook via // local mode var err error diff --git a/app/app_iface.go b/app/app_iface.go index 6bf77be339..108934b0f8 100644 --- a/app/app_iface.go +++ b/app/app_iface.go @@ -111,7 +111,7 @@ type AppIface interface { DeleteGroupConstrainedMemberships(c *request.Context) error // DeletePublicKey will delete plugin public key from the config. DeletePublicKey(name string) *model.AppError - // DemoteUserToGuest Convert user's roles and all his mermbership's roles from + // DemoteUserToGuest Convert user's roles and all his membership's roles from // regular user roles to guest roles. DemoteUserToGuest(user *model.User) *model.AppError // DisablePlugin will set the config for an installed plugin to disabled, triggering deactivation if active. @@ -253,7 +253,7 @@ type AppIface interface { // PopulateWebConnConfig checks if the connection id already exists in the hub, // and if so, accordingly populates the other fields of the webconn. PopulateWebConnConfig(s *model.Session, cfg *WebConnConfig, seqVal string) (*WebConnConfig, error) - // PromoteGuestToUser Convert user's roles and all his mermbership's roles from + // PromoteGuestToUser Convert user's roles and all his membership's roles from // guest roles to regular user roles. PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError // RenameChannel is used to rename the channel Name and the DisplayName fields diff --git a/app/bot_test.go b/app/bot_test.go index 981376161e..c491f9aca8 100644 --- a/app/bot_test.go +++ b/app/bot_test.go @@ -565,7 +565,7 @@ func TestDisableUserBots(t *testing.T) { err = th.App.disableUserBots(th.Context, ownerId1) require.Nil(t, err) - // Check all bots and corrensponding users are disabled for creator 1 + // Check all bots and corresponding users are disabled for creator 1 for _, bot := range bots { retbot, err2 := th.App.GetBot(bot.UserId, true) require.Nil(t, err2) diff --git a/app/channel_test.go b/app/channel_test.go index 3f8d069d03..1f9dbd053a 100644 --- a/app/channel_test.go +++ b/app/channel_test.go @@ -1048,7 +1048,7 @@ func TestGetPublicChannelsForTeam(t *testing.T) { expectedChannels = append(expectedChannels, rchannel) } - // Fetch public channels multipile times + // Fetch public channels multiple times channelList, err := th.App.GetPublicChannelsForTeam(team.Id, 0, 5) require.Nil(t, err) channelList2, err := th.App.GetPublicChannelsForTeam(team.Id, 5, 5) @@ -1081,7 +1081,7 @@ func TestGetPrivateChannelsForTeam(t *testing.T) { expectedChannels = append(expectedChannels, rchannel) } - // Fetch private channels multipile times + // Fetch private channels multiple times channelList, err := th.App.GetPrivateChannelsForTeam(team.Id, 0, 5) require.Nil(t, err) channelList2, err := th.App.GetPrivateChannelsForTeam(team.Id, 5, 5) @@ -2216,7 +2216,7 @@ func TestMarkChannelAsUnreadFromPostCollapsedThreadsTurnedOff(t *testing.T) { // user2: first root mention @user1 // - user1: hello // - user2: mention @u1 - // - user1: another repoy + // - user1: another reply // - user2: another mention @u1 // user1: a root post // user2: Another root mention @u1 diff --git a/app/email/email_batching.go b/app/email/email_batching.go index 7fd54006ee..ae7d3cc174 100644 --- a/app/email/email_batching.go +++ b/app/email/email_batching.go @@ -186,11 +186,11 @@ func (job *EmailBatchingJob) checkPendingNotifications(now time.Time, handler fu var interval int64 preference, err := job.service.store.Preference().Get(userID, model.PreferenceCategoryNotifications, model.PreferenceNameEmailInterval) if err != nil { - // use the default batching interval if an error ocurrs while fetching user preferences + // use the default batching interval if an error occurs while fetching user preferences interval, _ = strconv.ParseInt(model.PreferenceEmailIntervalBatchingSeconds, 10, 64) } else { if value, err := strconv.ParseInt(preference.Value, 10, 64); err != nil { - // // use the default batching interval if an error ocurrs while deserializing user preferences + // // use the default batching interval if an error occurs while deserializing user preferences interval, _ = strconv.ParseInt(model.PreferenceEmailIntervalBatchingSeconds, 10, 64) } else { interval = value diff --git a/app/export_test.go b/app/export_test.go index 8aa8412ce0..a427883e74 100644 --- a/app/export_test.go +++ b/app/export_test.go @@ -387,7 +387,7 @@ func TestExportGMandDMChannels(t *testing.T) { channels, nErr = th2.App.Srv().Store.Channel().GetAllDirectChannelsForExportAfter(1000, "00000000") require.NoError(t, nErr) - // Adding some deteminism so its possible to assert on slice index + // Adding some determinism so its possible to assert on slice index sort.Slice(channels, func(i, j int) bool { return channels[i].Type > channels[j].Type }) assert.Equal(t, 2, len(channels)) assert.ElementsMatch(t, []string{th1.BasicUser.Username, user1.Username, user2.Username}, *channels[0].Members) @@ -465,7 +465,7 @@ func TestExportDMandGMPost(t *testing.T) { posts, err = th2.App.Srv().Store.Post().GetDirectPostParentsForExportAfter(1000, "0000000") require.NoError(t, err) - // Adding some deteminism so its possible to assert on slice index + // Adding some determinism so its possible to assert on slice index sort.Slice(posts, func(i, j int) bool { return posts[i].Message > posts[j].Message }) assert.Equal(t, 4, len(posts)) assert.ElementsMatch(t, gmMembers, *posts[0].ChannelMembers) diff --git a/app/extract_plugin_tar.go b/app/extract_plugin_tar.go index 4a62e6ee5f..43c8344b3f 100644 --- a/app/extract_plugin_tar.go +++ b/app/extract_plugin_tar.go @@ -39,7 +39,7 @@ func extractTarGz(gzipStream io.Reader, dst string) error { return errors.Wrap(err, "failed to read next file from archive") } - // Pre-emptively check type flag to avoid reporting a misleading error in + // Preemptively check type flag to avoid reporting a misleading error in // trying to sanitize the header name. switch header.Typeflag { case tar.TypeDir: diff --git a/app/featureflag/feature_flags_sync.go b/app/featureflag/feature_flags_sync.go index 224574b1bd..aa492ff9fa 100644 --- a/app/featureflag/feature_flags_sync.go +++ b/app/featureflag/feature_flags_sync.go @@ -55,7 +55,7 @@ func NewSynchronizer(params SyncParams) (*Synchronizer, error) { }, nil } -// EnsureReady blocks until the syncronizer is ready to update feature flag values +// EnsureReady blocks until the synchronizer is ready to update feature flag values func (f *Synchronizer) EnsureReady() error { if err := f.client.BlockUntilReady(10); err != nil { return errors.Wrap(err, "split.io client could not initialize") diff --git a/app/file.go b/app/file.go index 14e5ddee5d..96437b2815 100644 --- a/app/file.go +++ b/app/file.go @@ -648,7 +648,7 @@ type UploadFileTask struct { imageType string imageOrientation int - // Testing: overrideable dependency functions + // Testing: overridable dependency functions pluginsEnvironment *plugin.Environment writeFile func(io.Reader, string) (int64, *model.AppError) saveToDatabase func(*model.FileInfo) (*model.FileInfo, error) diff --git a/app/import_validators_test.go b/app/import_validators_test.go index 5b90602051..e2340fd66f 100644 --- a/app/import_validators_test.go +++ b/app/import_validators_test.go @@ -617,7 +617,7 @@ func TestImportValidateUserImportData(t *testing.T) { data.NotifyProps.MentionKeys = ptrStr("valid") checkNoError(t, validateUserImportData(&data)) - //Test the emai batching interval validators + //Test the email batching interval validators //Happy paths data.EmailInterval = ptrStr("immediately") checkNoError(t, validateUserImportData(&data)) diff --git a/app/permissions_migrations.go b/app/permissions_migrations.go index 540d5fce71..93fb4fd62d 100644 --- a/app/permissions_migrations.go +++ b/app/permissions_migrations.go @@ -536,7 +536,7 @@ func (a *App) getAddManageSecureConnectionsPermissionsMigration() (permissionsMa Add: []string{PermissionManageSecureConnections}, }) - // remote the decprecated permission from system admin + // remote the deprecated permission from system admin transformations = append(transformations, permissionTransformation{ On: isRole(model.SystemAdminRoleId), @@ -667,7 +667,7 @@ func (a *App) getAddComplianceSubsectionPermissions() (permissionsMap, error) { Add: permissionsComplianceWrite, }) - // Ancilary permissions + // Ancillary permissions transformations = append(transformations, permissionTransformation{ On: permissionExists(model.PermissionSysconsoleWriteComplianceDataRetentionPolicy.Id), Add: []string{model.PermissionCreateDataRetentionJob.Id}, diff --git a/app/plugin.go b/app/plugin.go index e74b345d27..ca3ad16bc8 100644 --- a/app/plugin.go +++ b/app/plugin.go @@ -639,7 +639,7 @@ func (a *App) mergePrepackagedPlugins(remoteMarketplacePlugins map[string]*model continue } - // If available in the markteplace, only overwrite if newer. + // If available in the marketplace, only overwrite if newer. prepackagedVersion, err := semver.Parse(prepackaged.Manifest.Version) if err != nil { return model.NewAppError("mergePrepackagedPlugins", "app.plugin.invalid_version.app_error", nil, err.Error(), http.StatusBadRequest) diff --git a/app/post.go b/app/post.go index 6994c9db24..638009af04 100644 --- a/app/post.go +++ b/app/post.go @@ -299,7 +299,7 @@ func (a *App) CreatePost(c *request.Context, post *model.Post, channel *model.Ch rPostCopy := rpost.Clone() // FIXME: Removes PreviewPost from the post payload sent to the MessageHasBeenPosted hook so that plugins compiled with older versions of - // Mattermost—without the gob registeration of the PreviewPost struct—won't crash. + // Mattermost—without the gob registration of the PreviewPost struct—won't crash. if rPostCopy.Metadata != nil { rPostCopy.Metadata = rPostCopy.Metadata.Copy() } diff --git a/app/post_metadata.go b/app/post_metadata.go index 6e62a9d184..b2868330da 100644 --- a/app/post_metadata.go +++ b/app/post_metadata.go @@ -515,7 +515,7 @@ func (a *App) getLinkMetadata(requestURL string, timestamp int64, isNewPost bool referencedPostID := requestURL[len(requestURL)-26:] referencedPost, appErr := a.GetSinglePost(referencedPostID) - // TODO: Look into saving a value in the LinkMetadat.Data field to prevent perpetually re-querying for the deleted post. + // TODO: Look into saving a value in the LinkMetadata.Data field to prevent perpetually re-querying for the deleted post. if appErr != nil { return nil, nil, nil, appErr } diff --git a/app/team_test.go b/app/team_test.go index ff583f201f..da42ed4fcc 100644 --- a/app/team_test.go +++ b/app/team_test.go @@ -929,7 +929,7 @@ func TestGetTeamMembers(t *testing.T) { return users[i].Id < users[j].Id }) - // Fetch team members multipile times + // Fetch team members multiple times members, err := th.App.GetTeamMembers(th.BasicTeam.Id, 0, 5, nil) require.Nil(t, err) diff --git a/app/user.go b/app/user.go index 7ed9fc783a..34dab0b6dd 100644 --- a/app/user.go +++ b/app/user.go @@ -2037,7 +2037,7 @@ func (a *App) GetViewUsersRestrictions(userID string) (*model.ViewUsersRestricti return &model.ViewUsersRestrictions{Teams: teamIDsWithPermission, Channels: channelIDs}, nil } -// PromoteGuestToUser Convert user's roles and all his mermbership's roles from +// PromoteGuestToUser Convert user's roles and all his membership's roles from // guest roles to regular user roles. func (a *App) PromoteGuestToUser(c *request.Context, user *model.User, requestorId string) *model.AppError { nErr := a.ch.srv.userService.PromoteGuestToUser(user) @@ -2097,7 +2097,7 @@ func (a *App) PromoteGuestToUser(c *request.Context, user *model.User, requestor return nil } -// DemoteUserToGuest Convert user's roles and all his mermbership's roles from +// DemoteUserToGuest Convert user's roles and all his membership's roles from // regular user roles to guest roles. func (a *App) DemoteUserToGuest(user *model.User) *model.AppError { demotedUser, nErr := a.ch.srv.userService.DemoteUserToGuest(user) diff --git a/app/user_test.go b/app/user_test.go index 276596c3bc..443dde6b38 100644 --- a/app/user_test.go +++ b/app/user_test.go @@ -120,7 +120,7 @@ func TestAdjustProfileImage(t *testing.T) { assert.True(t, adjusted.Len() > 0) assert.NotEqual(t, testjpg, adjusted) - // default image should require adjustement + // default image should require adjustment user := th.BasicUser image, err := th.App.GetDefaultProfileImage(user) require.Nil(t, err) @@ -524,7 +524,7 @@ func TestUpdateUserEmail(t *testing.T) { tokens, err = th.App.Srv().Store.Token().GetAllTokensByType(TokenTypeVerifyEmail) // We verify the same conditions as the earlier function, // but we also need to ensure that this is not the same token - // as before, which is possible if the token updation goroutine + // as before, which is possible if the token update goroutine // hasn't yet run. return err == nil && len(tokens) == 1 && tokens[0].Token != firstToken.Token }, 100*time.Millisecond, 10*time.Millisecond) diff --git a/app/users/password.go b/app/users/password.go index 4a27efd0b6..da286f73ad 100644 --- a/app/users/password.go +++ b/app/users/password.go @@ -47,7 +47,7 @@ func (us *UserService) isPasswordValid(password string) error { } // IsPasswordValidWithSettings is a utility functions that checks if the given password -// comforms to the password settings. It returns the error id as error value. +// conforms to the password settings. It returns the error id as error value. func IsPasswordValidWithSettings(password string, settings *model.PasswordSettings) error { id := "model.user.is_valid.pwd" isError := false diff --git a/build/docker-compose-generator/main.go b/build/docker-compose-generator/main.go index 1d5f938135..6fba5d43ee 100644 --- a/build/docker-compose-generator/main.go +++ b/build/docker-compose-generator/main.go @@ -35,7 +35,7 @@ func main() { "keycloak": 8080, "prometheus": 9090, "grafana": 3000, - "mysql-read-replica": 3306, // FIXME: not recorgnizing the successfully running service on port 3307. + "mysql-read-replica": 3306, // FIXME: not recognizing the successfully running service on port 3307. } command := []string{} for _, arg := range os.Args[1:] { diff --git a/config.mk b/config.mk index 688045449f..d22efdd2cf 100644 --- a/config.mk +++ b/config.mk @@ -20,7 +20,7 @@ RUN_SERVER_IN_BACKGROUND ?= true # Data loaded by default in openldap when container starts. # -# Posible options: test or qa +# Possible options: test or qa LDAP_DATA ?= test # Mock the CWS. diff --git a/model/channel_count.go b/model/channel_count.go index 25329a15c9..17cea756c6 100644 --- a/model/channel_count.go +++ b/model/channel_count.go @@ -17,7 +17,7 @@ type ChannelCounts struct { } func (o *ChannelCounts) Etag() string { - // we don't include CountsRoot in ETag calculation, since it's a deriviative + // we don't include CountsRoot in ETag calculation, since it's a derivative ids := []string{} for id := range o.Counts { ids = append(ids, id) diff --git a/model/client4.go b/model/client4.go index dd9de4d000..e896808827 100644 --- a/model/client4.go +++ b/model/client4.go @@ -1978,7 +1978,7 @@ func (c *Client4) GetBotsIncludeDeleted(page, perPage int, etag string) ([]*Bot, return bots, BuildResponse(r), nil } -// GetBotsOrphaned fetches the given page of bots, only including orphanded bots. +// GetBotsOrphaned fetches the given page of bots, only including orphaned bots. func (c *Client4) GetBotsOrphaned(page, perPage int, etag string) ([]*Bot, *Response, error) { query := fmt.Sprintf("?page=%v&per_page=%v&only_orphaned="+c.boolString(true), page, perPage) r, err := c.DoAPIGet(c.botsRoute()+query, etag) diff --git a/model/post_metadata.go b/model/post_metadata.go index 0f9e61d3d4..6ccc1ebffc 100644 --- a/model/post_metadata.go +++ b/model/post_metadata.go @@ -14,7 +14,7 @@ type PostMetadata struct { // Files holds information about the file attachments on the post. Files []*FileInfo `json:"files,omitempty"` - // Images holds the dimensions of all external images in the post as a map of the image URL to its diemsnions. + // Images holds the dimensions of all external images in the post as a map of the image URL to its dimensions. // This includes image embeds (when the message contains a plaintext link to an image), Markdown images, images // contained in the OpenGraph metadata, and images contained in message attachments. It does not contain // the dimensions of any file attachments as those are stored in FileInfos. diff --git a/model/role.go b/model/role.go index b8d75d4b4c..0dcb405c6c 100644 --- a/model/role.go +++ b/model/role.go @@ -558,7 +558,7 @@ func (r *Role) GetChannelModeratedPermissions(channelType ChannelType) map[strin return moderatedPermissions } -// RolePatchFromChannelModerationsPatch Creates and returns a RolePatch based on a slice of ChannelModerationPatchs, roleName is expected to be either "members" or "guests". +// RolePatchFromChannelModerationsPatch Creates and returns a RolePatch based on a slice of ChannelModerationPatches, roleName is expected to be either "members" or "guests". func (r *Role) RolePatchFromChannelModerationsPatch(channelModerationsPatch []*ChannelModerationPatch, roleName string) *RolePatch { permissionsToAddToPatch := make(map[string]bool) diff --git a/model/testdata/markdown-sample-with-rewritten-image-urls.md b/model/testdata/markdown-sample-with-rewritten-image-urls.md index 6683bc459c..327d5675fa 100644 --- a/model/testdata/markdown-sample-with-rewritten-image-urls.md +++ b/model/testdata/markdown-sample-with-rewritten-image-urls.md @@ -163,7 +163,7 @@ The killer feature of `markdown-it` is very effective support of [syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). -### [Emojies](https://github.com/markdown-it/markdown-it-emoji) +### [Emojis](https://github.com/markdown-it/markdown-it-emoji) > Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum: > diff --git a/model/testdata/markdown-sample.md b/model/testdata/markdown-sample.md index f894c1d35a..ba18f36804 100644 --- a/model/testdata/markdown-sample.md +++ b/model/testdata/markdown-sample.md @@ -163,7 +163,7 @@ The killer feature of `markdown-it` is very effective support of [syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin). -### [Emojies](https://github.com/markdown-it/markdown-it-emoji) +### [Emojis](https://github.com/markdown-it/markdown-it-emoji) > Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum: > diff --git a/model/user.go b/model/user.go index 0b691c6cb9..5035f9a520 100644 --- a/model/user.go +++ b/model/user.go @@ -703,7 +703,7 @@ func IsValidUserRoles(userRoles string) bool { return true } -// Make sure you acually want to use this function. In context.go there are functions to check permissions +// Make sure you actually want to use this function. In context.go there are functions to check permissions // This function should not be used to check permissions. func (u *User) IsGuest() bool { return IsInRole(u.Roles, SystemGuestRoleId) @@ -713,13 +713,13 @@ func (u *User) IsSystemAdmin() bool { return IsInRole(u.Roles, SystemAdminRoleId) } -// Make sure you acually want to use this function. In context.go there are functions to check permissions +// Make sure you actually want to use this function. In context.go there are functions to check permissions // This function should not be used to check permissions. func (u *User) IsInRole(inRole string) bool { return IsInRole(u.Roles, inRole) } -// Make sure you acually want to use this function. In context.go there are functions to check permissions +// Make sure you actually want to use this function. In context.go there are functions to check permissions // This function should not be used to check permissions. func IsInRole(userRoles string, inRole string) bool { roles := strings.Split(userRoles, " ") diff --git a/services/cache/cache.go b/services/cache/cache.go index 05588d0a86..9c0ef08e22 100644 --- a/services/cache/cache.go +++ b/services/cache/cache.go @@ -23,11 +23,11 @@ type Cache interface { Set(key string, value interface{}) error // SetWithDefaultExpiry adds the given key and value to the store with the default expiry. If - // the key already exists, it will overwrite the previoous value + // the key already exists, it will overwrite the previous value SetWithDefaultExpiry(key string, value interface{}) error // SetWithExpiry adds the given key and value to the cache with the given expiry. If the key - // already exists, it will overwrite the previoous value + // already exists, it will overwrite the previous value SetWithExpiry(key string, value interface{}, ttl time.Duration) error // Get the content stored in the cache for the given key, and decode it into the value interface. diff --git a/services/cache/lru.go b/services/cache/lru.go index cb241f3c5a..dcb43589c3 100644 --- a/services/cache/lru.go +++ b/services/cache/lru.go @@ -75,13 +75,13 @@ func (l *LRU) Set(key string, value interface{}) error { } // SetWithDefaultExpiry adds the given key and value to the store with the default expiry. If -// the key already exists, it will overwrite the previoous value +// the key already exists, it will overwrite the previous value func (l *LRU) SetWithDefaultExpiry(key string, value interface{}) error { return l.SetWithExpiry(key, value, l.defaultExpiry) } // SetWithExpiry adds the given key and value to the cache with the given expiry. If the key -// already exists, it will overwrite the previoous value +// already exists, it will overwrite the previous value func (l *LRU) SetWithExpiry(key string, value interface{}, ttl time.Duration) error { return l.set(key, value, ttl) } diff --git a/services/cache/provider.go b/services/cache/provider.go index 4c6b0e4ca8..a55dabf429 100644 --- a/services/cache/provider.go +++ b/services/cache/provider.go @@ -9,7 +9,7 @@ import ( "github.com/mattermost/mattermost-server/v6/model" ) -// CacheOptions contains options for initializaing a cache +// CacheOptions contains options for initializing a cache type CacheOptions struct { Size int DefaultExpiry time.Duration diff --git a/shared/filestore/s3_overrides.go b/shared/filestore/s3_overrides.go index e7b29b98e8..697809ee50 100644 --- a/shared/filestore/s3_overrides.go +++ b/shared/filestore/s3_overrides.go @@ -23,7 +23,7 @@ type customTransport struct { // RoundTrip implements the http.Roundtripper interface. func (t *customTransport) RoundTrip(req *http.Request) (*http.Response, error) { - // Rountrippers should not modify the original request. + // Roundtrippers should not modify the original request. newReq := req.Clone(context.Background()) *newReq.URL = *req.URL req.URL.Scheme = t.scheme diff --git a/shared/mfa/mfa.go b/shared/mfa/mfa.go index 1e015c5062..a5c73dc296 100644 --- a/shared/mfa/mfa.go +++ b/shared/mfa/mfa.go @@ -106,7 +106,7 @@ func (m *MFA) Activate(userMfaSecret, userID string, token string) error { return nil } -// Deactivate set the mfa as deactive, remove the mfa secret, store it with the StoreActive and StoreSecret functions provided +// Deactivate set the mfa as deactivated, remove the mfa secret, store it with the StoreActive and StoreSecret functions provided func (m *MFA) Deactivate(userId string) error { if err := m.store.UpdateMfaActive(userId, false); err != nil { return errors.Wrap(err, "unable to store mfa active") diff --git a/shared/mlog/mlog.go b/shared/mlog/mlog.go index 0f4cc1fe0b..9b4bb820bf 100644 --- a/shared/mlog/mlog.go +++ b/shared/mlog/mlog.go @@ -352,7 +352,7 @@ func (l *Logger) RedirectStdLog(level Level, fields ...Field) func() { // RemoveTargets safely removes one or more targets based on the filtering method. // `f` should return true to delete the target, false to keep it. // When removing a target, best effort is made to write any queued log records before -// closing, with cxt determining how much time can be spent in total. +// closing, with ctx determining how much time can be spent in total. // Note, keep the timeout short since this method blocks certain logging operations. func (l *Logger) RemoveTargets(ctx context.Context, f func(ti TargetInfo) bool) error { return l.log.Logr().RemoveTargets(ctx, f) @@ -379,7 +379,7 @@ func (l *Logger) Flush() error { return l.log.Logr().FlushWithTimeout(ctx) } -// Flush forces all targets to write out any queued log records with the specfified timeout. +// Flush forces all targets to write out any queued log records with the specified timeout. func (l *Logger) FlushWithTimeout(ctx context.Context) error { return l.log.Logr().FlushWithTimeout(ctx) } diff --git a/store/sqlstore/channel_store_categories.go b/store/sqlstore/channel_store_categories.go index b129793c90..3cbfcac182 100644 --- a/store/sqlstore/channel_store_categories.go +++ b/store/sqlstore/channel_store_categories.go @@ -90,7 +90,7 @@ func (s SqlChannelStore) createInitialSidebarCategoriesT(transaction *gorp.Trans if !hasCategoryOfType[model.SidebarCategoryChannels] { if err := transaction.Insert(&model.SidebarCategory{ - DisplayName: "Channels", // This will be retranslateed by the client into the user's locale + DisplayName: "Channels", // This will be retranslated by the client into the user's locale Id: channelsCategoryId, UserId: userId, TeamId: teamId, @@ -104,7 +104,7 @@ func (s SqlChannelStore) createInitialSidebarCategoriesT(transaction *gorp.Trans if !hasCategoryOfType[model.SidebarCategoryDirectMessages] { if err := transaction.Insert(&model.SidebarCategory{ - DisplayName: "Direct Messages", // This will be retranslateed by the client into the user's locale + DisplayName: "Direct Messages", // This will be retranslated by the client into the user's locale Id: directMessagesCategoryId, UserId: userId, TeamId: teamId, diff --git a/store/sqlstore/team_store.go b/store/sqlstore/team_store.go index 6bf6d6bcc2..82f87dbf93 100644 --- a/store/sqlstore/team_store.go +++ b/store/sqlstore/team_store.go @@ -1208,7 +1208,7 @@ func (s SqlTeamStore) UpdateLastTeamIconUpdate(teamId string, curTime int64) err } // GetTeamsByScheme returns from the database all teams that match the schemeId provided as parameter, up to -// a total limit passed as paramater and paginated by offset number passed as parameter. +// a total limit passed as parameter and paginated by offset number passed as parameter. func (s SqlTeamStore) GetTeamsByScheme(schemeId string, offset int, limit int) ([]*model.Team, error) { query, args, err := s.teamsQuery.Where(sq.Eq{"SchemeId": schemeId}). OrderBy("DisplayName"). @@ -1381,7 +1381,7 @@ func (s SqlTeamStore) AnalyticsGetTeamCountForScheme(schemeId string) (int64, er return count, nil } -// GetAllForExportAfter returns teams for export, up to a total limit passed as paramater where Teams.Id is greater than the afterId passed as parameter. +// GetAllForExportAfter returns teams for export, up to a total limit passed as parameter where Teams.Id is greater than the afterId passed as parameter. func (s SqlTeamStore) GetAllForExportAfter(limit int, afterId string) ([]*model.TeamForExport, error) { var data []*model.TeamForExport query, args, err := s.getQueryBuilder(). diff --git a/store/sqlstore/thread_store.go b/store/sqlstore/thread_store.go index aac8ed5fc1..94d0aaaa8f 100644 --- a/store/sqlstore/thread_store.go +++ b/store/sqlstore/thread_store.go @@ -629,7 +629,7 @@ func (s *SqlThreadStore) MaintainMembership(userId, postId string, opts store.Th membership, err := s.getMembershipForUser(trx, userId, postId) now := utils.MillisFromTime(time.Now()) - // if memebership exists, update it if: + // if membership exists, update it if: // a. user started/stopped following a thread // b. mention count changed // c. user viewed a thread diff --git a/store/storetest/group_store.go b/store/storetest/group_store.go index 30d4350399..9baae5c768 100644 --- a/store/storetest/group_store.go +++ b/store/storetest/group_store.go @@ -3879,7 +3879,7 @@ func groupTestAdminRoleGroupsForSyncableMemberChannel(t *testing.T, ss store.Sto }) require.NoError(t, err) - // User is a member of both groups but only one is SchmeAdmin: true + // User is a member of both groups but only one is SchemeAdmin: true actualGroupIDs, err := ss.Group().AdminRoleGroupsForSyncableMember(user.Id, channel.Id, model.GroupSyncableTypeChannel) require.NoError(t, err) require.ElementsMatch(t, []string{group1.Id}, actualGroupIDs) @@ -3966,7 +3966,7 @@ func groupTestAdminRoleGroupsForSyncableMemberTeam(t *testing.T, ss store.Store) }) require.NoError(t, err) - // User is a member of both groups but only one is SchmeAdmin: true + // User is a member of both groups but only one is SchemeAdmin: true actualGroupIDs, err := ss.Group().AdminRoleGroupsForSyncableMember(user.Id, team.Id, model.GroupSyncableTypeTeam) require.NoError(t, err) require.ElementsMatch(t, []string{group1.Id}, actualGroupIDs) diff --git a/store/storetest/user_store.go b/store/storetest/user_store.go index 167de8c693..cd12f58b33 100644 --- a/store/storetest/user_store.go +++ b/store/storetest/user_store.go @@ -4028,7 +4028,7 @@ func testUserStoreAnalyticsActiveCountForPeriod(t *testing.T, ss store.Store, s // u0 last activity status is two months ago. // u1 last activity status is one month ago - // u2 last activiy is two days ago + // u2 last activity is two days ago // u2 last activity is one day ago // u3 last activity is within last day // u4 last activity is within last day diff --git a/tests/README.md b/tests/README.md index 05c91a2eee..3a464bf033 100644 --- a/tests/README.md +++ b/tests/README.md @@ -19,9 +19,9 @@ It is possible to manually test specific sections of any test, instead of using ## Test plugins -There are two test plugins: `testplugin.tar.gz` and `testplugin2.tar.gz`. These are use in some integration tests in the `api4` package. Any changes to the plugin bundles require updating the coresponding signatures. +There are two test plugins: `testplugin.tar.gz` and `testplugin2.tar.gz`. These are use in some integration tests in the `api4` package. Any changes to the plugin bundles require updating the corresponding signatures. -First, import the public and privat development key: +First, import the public and private development key: ``` $ gpg --import ./development-public-key.gpg $ gpg --import ./development-private-key.asc @@ -29,7 +29,7 @@ $ gpg --import ./development-private-key.asc This has to be done only once. -Then update the sigantures: +Then update the signatures: ``` $ gpg -u F3FACE45E0DE642C8BD6A8E64C7C6562C192CC1F --verbose --personal-digest-preferences SHA256 --detach-sign testplugin.tar.gz $ gpg -u F3FACE45E0DE642C8BD6A8E64C7C6562C192CC1F --verbose --personal-digest-preferences SHA256 --detach-sign --armor testplugin.tar.gz diff --git a/tests/test-markdown-basics.md b/tests/test-markdown-basics.md index 8e3a2cdfe1..d3f3c25fc2 100644 --- a/tests/test-markdown-basics.md +++ b/tests/test-markdown-basics.md @@ -55,7 +55,7 @@ _Italics_ - List - List Sub-item [Link](http://i.giphy.com/xNrM4cGJ8u3ao.gif) -[![Github](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform) +[![GitHub](https://assets-cdn.github.com/favicon.ico)](https://github.com/mattermost/platform) | Left-Aligned Text | Center Aligned Text | Right Aligned Text | | :------------ |:---------------:| -----:| | Left column 1 | this text | $100 | diff --git a/utils/utils_test.go b/utils/utils_test.go index 80d5be8d70..39bf4c545e 100644 --- a/utils/utils_test.go +++ b/utils/utils_test.go @@ -83,7 +83,7 @@ func TestGetIPAddress(t *testing.T) { assert.Equal(t, "10.1.0.1", GetIPAddress(&httpRequest3, []string{"X-Forwarded-For", "X-Real-Ip"})) - // Test without an X-Fowarded-For + // Test without an X-Forwarded-For httpRequest4 := http.Request{ Header: http.Header{ "X-Real-Ip": []string{"10.1.0.1"}, diff --git a/web/web_test.go b/web/web_test.go index 0e06a33cf0..87cc3ec519 100644 --- a/web/web_test.go +++ b/web/web_test.go @@ -345,7 +345,7 @@ func TestPublicFilesRequest(t *testing.T) { assert.Equal(t, 301, res.Code) } -/* Test disabled for now so we don't requrie the client to build. Maybe re-enable after client gets moved out. +/* Test disabled for now so we don't require the client to build. Maybe re-enable after client gets moved out. func TestStatic(t *testing.T) { Setup()