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

Spelling fixes #117

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Usage of misspell:
-legal
Show legal information and exit
-locale string
Correct spellings using locale perferances 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'
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'
-o string
output file or [stderr|stdout|] (default "stdout")
-q Do not emit misspelling output
Expand Down
4 changes: 2 additions & 2 deletions cmd/misspell/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var (

const (
// Note for gometalinter it must be "File:Line:Column: Msg"
// note space beteen ": Msg"
// note space between ": Msg"
defaultWriteTmpl = `{{ .Filename }}:{{ .Line }}:{{ .Column }}: corrected "{{ .Original }}" to "{{ .Corrected }}"`
defaultReadTmpl = `{{ .Filename }}:{{ .Line }}:{{ .Column }}: "{{ .Original }}" is a misspelling of "{{ .Corrected }}"`
csvTmpl = `{{ printf "%q" .Filename }},{{ .Line }},{{ .Column }},{{ .Original }},{{ .Corrected }}`
Expand Down Expand Up @@ -105,7 +105,7 @@ func main() {
outFlag = flag.String("o", "stdout", "output file or [stderr|stdout|]")
format = flag.String("f", "", "'csv', 'sqlite3' or custom Golang template for output")
ignores = flag.String("i", "", "ignore the following corrections, comma separated")
locale = flag.String("locale", "", "Correct spellings using locale perferances 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 = flag.String("locale", "", "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'")
mode = flag.String("source", "auto", "Source mode: auto=guess, go=golang source, text=plain or markdown-like text")
debugFlag = flag.Bool("debug", false, "Debug matching, very slow")
exitError = flag.Bool("error", false, "Exit with 2 if misspelling found")
Expand Down
4 changes: 2 additions & 2 deletions ignore/glob.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func NewMultiMatch(matchers []Matcher) *MultiMatch {
return &MultiMatch{matchers: matchers}
}

// Match satifies the Matcher iterface
// Match satisfies the Matcher iterface
func (mm *MultiMatch) Match(arg string) bool {
// Normal: OR
// false, false -> false
Expand All @@ -51,7 +51,7 @@ func (mm *MultiMatch) Match(arg string) bool {
// True returns true
func (mm *MultiMatch) True() bool { return true }

// MarshalText satifies the ?? interface
// MarshalText satisfies the ?? interface
func (mm *MultiMatch) MarshalText() ([]byte, error) {
return []byte("multi"), nil
}
Expand Down
2 changes: 1 addition & 1 deletion notwords.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func RemoveHost(s string) string {
return reHost.ReplaceAllStringFunc(s, replaceWithBlanks)
}

// RemoveBackslashEscapes removes characters that are preceeded by a backslash
// RemoveBackslashEscapes removes characters that are preceded by a backslash
// commonly found in printf format stringd "\nto"
func removeBackslashEscapes(s string) string {
return reBackslash.ReplaceAllStringFunc(s, replaceWithBlanks)
Expand Down
2 changes: 1 addition & 1 deletion url.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
// @(https?|ftp)://(-\.)?([^\s/?\.#-]+\.?)+(/[^\s]*)?$@iS
var reURL = regexp.MustCompile(`(?i)(https?|ftp)://(-\.)?([^\s/?\.#]+\.?)+(/[^\s]*)?`)

// StripURL attemps to replace URLs with blank spaces, e.g.
// StripURL attempts to replace URLs with blank spaces, e.g.
// "xxx http://foo.com/ yyy -> "xxx yyyy"
func StripURL(s string) string {
return reURL.ReplaceAllStringFunc(s, replaceWithBlanks)
Expand Down