Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: typos in docs and code #303

Merged
merged 1 commit into from
Nov 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Contributing Guide
----

We welcome dontributions in multiple forms. This file describes some of the ways how you can help out in various ways.
We welcome contributions in multiple forms. This file describes some of the ways how you can help out in various ways.

## Bug fixes or new feature

Expand Down
2 changes: 1 addition & 1 deletion cmd/logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func configureLogging(cmd *cobra.Command, logFile string) {
return []string{"trace", "debug", "info", "error"}, cobra.ShellCompDirectiveDefault
})

flags.StringP("log-format", "", "text", `The formating of the logs. Available values: text, json, json-pretty.`)
flags.StringP("log-format", "", "text", `The formatting of the logs. Available values: text, json, json-pretty.`)
_ = cmd.RegisterFlagCompletionFunc("log-format", func(cmd *cobra.Command, _ []string, _ string) ([]string, cobra.ShellCompDirective) {
return []string{"text", "json", "json-pretty"}, cobra.ShellCompDirectiveDefault
})
Expand Down
6 changes: 3 additions & 3 deletions internal/log/censor-formatter.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ import (
log "github.com/sirupsen/logrus"
)

// NewCensorFormatter creates a new formater that censors sensitive logs.
// NewCensorFormatter creates a new formatter that censors sensitive logs.
// It contains some default censoring rules, but additional items may be used
func NewCensorFormatter(underlyingFormater log.Formatter, additionalCensoring ...CensorItem) *CensorFormatter {
func NewCensorFormatter(underlyingFormatter log.Formatter, additionalCensoring ...CensorItem) *CensorFormatter {
return &CensorFormatter{
CensorItems: append(defaultCensorItems, additionalCensoring...),
UnderlyingFormatter: underlyingFormater,
UnderlyingFormatter: underlyingFormatter,
}
}

Expand Down
12 changes: 6 additions & 6 deletions internal/log/censor-formatter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"github.com/stretchr/testify/assert"
)

type dummyFormater struct {
type dummyFormatter struct {
entry logrus.Entry
}

func (f *dummyFormater) Format(entry *logrus.Entry) ([]byte, error) {
func (f *dummyFormatter) Format(entry *logrus.Entry) ([]byte, error) {
f.entry = *entry
return []byte{}, nil
}
Expand Down Expand Up @@ -119,16 +119,16 @@ Some Data`),

for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
dummyFormater := &dummyFormater{}
dummyFormatter := &dummyFormatter{}
formatter := CensorFormatter{
CensorItems: test.items,
UnderlyingFormatter: dummyFormater,
UnderlyingFormatter: dummyFormatter,
}
_, err := formatter.Format(&test.entry)
assert.NoError(t, err)

assert.Equal(t, test.expectedData, dummyFormater.entry.Data)
assert.Equal(t, test.expectedMessage, dummyFormater.entry.Message)
assert.Equal(t, test.expectedData, dummyFormatter.entry.Data)
assert.Equal(t, test.expectedMessage, dummyFormatter.entry.Message)
})
}
}
2 changes: 1 addition & 1 deletion internal/multigitter/repocounter/counter.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func (r *Counter) AddSuccessPullRequest(repo scm.PullRequest) {
r.successPullRequests = append(r.successPullRequests, repo)
}

// Info returns a formated string about all repositories
// Info returns a formatted string about all repositories
func (r *Counter) Info() string {
defer r.lock.RUnlock()
r.lock.RLock()
Expand Down
2 changes: 1 addition & 1 deletion internal/scm/github/github.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ func (g *Github) GetAutocompleteRepositories(ctx context.Context, str string) ([
var q string

// If the user has already provided a org/user, it's much more effective to search based on that
// comparared to a complete freetext search
// comparared to a complete free text search
splitted := strings.SplitN(str, "/", 2)
switch {
case len(splitted) == 2:
Expand Down
2 changes: 1 addition & 1 deletion tests/story_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
)

// TestStory tests the common usecase: run, status, merge, status
// TestStory tests the common use case: run, status, merge, status
func TestStory(t *testing.T) {
vcMock := &vcmock.VersionController{}
defer vcMock.Clean()
Expand Down