Skip to content

Commit 4510383

Browse files
authored
chore: Spell "unmarshal" consistently with one el (#3441)
1 parent ce3a839 commit 4510383

File tree

6 files changed

+26
-5
lines changed

6 files changed

+26
-5
lines changed

.golangci.yml

+21
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ linters-settings:
3535
- G104
3636
# int(os.Stdin.Fd())
3737
- G115
38+
misspell:
39+
locale: US
40+
ignore-words:
41+
- "analyses" # returned by the GitHub API
42+
- "cancelled" # returned by the GitHub API
43+
# extra words from https://go.dev//wiki/Spelling
44+
extra-words:
45+
- typo: "marshall"
46+
correction: "marshal"
47+
- typo: "marshalled"
48+
correction: "marshaled"
49+
- typo: "marshalling"
50+
correction: "marshaling"
51+
- typo: "unmarshall"
52+
correction: "unmarshal"
53+
- typo: "unmarshalling"
54+
correction: "unmarshaling"
55+
- typo: "unmarshalled"
56+
correction: "unmarshaled"
57+
- typo: "unmarshalling"
58+
correction: "unmarshaling"
3859
perfsprint:
3960
errorf: true
4061
strconcat: false

github/code_scanning.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ func (s *CodeScanningService) UploadSarif(ctx context.Context, owner, repo strin
391391
return nil, nil, err
392392
}
393393

394-
// This will always return an error without unmarshalling the data
394+
// This will always return an error without unmarshaling the data
395395
resp, err := s.client.Do(ctx, req, nil)
396396
// Even though there was an error, we still return the response
397397
// in case the caller wants to inspect it further.

github/github.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1311,7 +1311,7 @@ func (r *RedirectionError) Is(target error) bool {
13111311

13121312
return r.StatusCode == v.StatusCode &&
13131313
(r.Location == v.Location || // either both locations are nil or exactly the same pointer
1314-
r.Location != nil && v.Location != nil && r.Location.String() == v.Location.String()) // or they are both not nil and marshalled identically
1314+
r.Location != nil && v.Location != nil && r.Location.String() == v.Location.String()) // or they are both not nil and marshaled identically
13151315
}
13161316

13171317
// sanitizeURL redacts the client_secret parameter from the URL which may be

github/pulls_reviewers_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ func TestRequestReviewers(t *testing.T) {
130130
fmt.Fprint(w, `{"number":1}`)
131131
})
132132

133-
// This returns a PR, unmarshalling of which is tested elsewhere
133+
// This returns a PR, unmarshaling of which is tested elsewhere
134134
ctx := context.Background()
135135
got, _, err := client.PullRequests.RequestReviewers(ctx, "o", "r", 1, ReviewersRequest{Reviewers: []string{"octocat", "googlebot"}, TeamReviewers: []string{"justice-league", "injustice-league"}})
136136
if err != nil {

github/repos_contents.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (s *RepositoriesService) GetContents(ctx context.Context, owner, repo, path
254254
return nil, directoryContent, resp, nil
255255
}
256256

257-
return nil, nil, resp, fmt.Errorf("unmarshalling failed for both file and directory content: %s and %s", fileUnmarshalError, directoryUnmarshalError)
257+
return nil, nil, resp, fmt.Errorf("unmarshaling failed for both file and directory content: %s and %s", fileUnmarshalError, directoryUnmarshalError)
258258
}
259259

260260
// CreateFile creates a new file in a repository at the given path and returns

github/timestamp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
"time"
1111
)
1212

13-
// Timestamp represents a time that can be unmarshalled from a JSON string
13+
// Timestamp represents a time that can be unmarshaled from a JSON string
1414
// formatted as either an RFC3339 or Unix timestamp. This is necessary for some
1515
// fields since the GitHub API is inconsistent in how it represents times. All
1616
// exported methods of time.Time can be called on Timestamp.

0 commit comments

Comments
 (0)