diff --git a/.golangci.yml b/.golangci.yml index b6a224f249..63732fc9ac 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -1,14 +1,23 @@ +linters-settings: + misspell: + # Correct spellings using locale preferences for US or UK. + # Default is to use a neutral variety of English. + # Setting locale to US will correct the British spelling of 'colour' to 'color'. + # locale: US + ignore-words: + # for gitlab notes api + - noteable + linters: enable: - errcheck - gochecknoinits -# We don't use goconst because it gives false positives in the tests. -# - goconst - gofmt - - revive - gosec - gosimple - ineffassign + - misspell + - revive - staticcheck - typecheck - unconvert diff --git a/server/events/event_parser_test.go b/server/events/event_parser_test.go index d1ec65182a..c25ce7f87f 100644 --- a/server/events/event_parser_test.go +++ b/server/events/event_parser_test.go @@ -1009,7 +1009,7 @@ func TestBitBucketNonCodeChangesAreIgnored(t *testing.T) { act = parser.GetBitbucketCloudPullEventType("pullrequest:updated", "fakeSha2", "https://github.com/fakeorg/fakerepo/pull/1") Equals(t, models.UpdatedPullEvent, act) - // If sha changes in seperate PR, + // If sha changes in separate PR, act = parser.GetBitbucketCloudPullEventType("pullrequest:updated", "otherPRSha", "https://github.com/fakeorg/fakerepo/pull/2") Equals(t, models.UpdatedPullEvent, act) // We will still ignore same shas in first PR diff --git a/server/events/project_command_context_builder.go b/server/events/project_command_context_builder.go index 16714f841a..0b4bf00f29 100644 --- a/server/events/project_command_context_builder.go +++ b/server/events/project_command_context_builder.go @@ -46,7 +46,7 @@ type ProjectCommandContextBuilder interface { // object relevant to the command it applies to. type CommandScopedStatsProjectCommandContextBuilder struct { ProjectCommandContextBuilder - // Conciously making this global since it gets flushed periodically anyways + // Consciously making this global since it gets flushed periodically anyways ProjectCounter tally.Counter } diff --git a/server/events/vcs/instrumented_client.go b/server/events/vcs/instrumented_client.go index 436b75e160..e77d2b7980 100644 --- a/server/events/vcs/instrumented_client.go +++ b/server/events/vcs/instrumented_client.go @@ -43,7 +43,7 @@ type IGithubClient interface { } // InstrumentedGithubClient should delegate to the underlying InstrumentedClient for vcs provider-agnostic -// methods and implement soley any github specific interfaces. +// methods and implement solely any github specific interfaces. type InstrumentedGithubClient struct { *InstrumentedClient PullRequestGetter GithubPullRequestGetter