You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-24Lines changed: 20 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ Usage of misspell:
49
49
-error
50
50
Exit with 2 if misspelling found
51
51
-f string
52
-
'csv', 'sqlite3' or custom Golang template for output
52
+
'csv', 'sqlite3' or custom Go template for output
53
53
-i string
54
54
ignore the following corrections, comma-separated
55
55
-j int
@@ -89,7 +89,7 @@ To use misspell with [pre-commit](https://pre-commit.com/), add the following to
89
89
*[Automatic Corrections](#correct)
90
90
*[Converting UK spellings to US](#locale)
91
91
*[Using pipes and stdin](#stdin)
92
-
*[Golang special support](#golang)
92
+
*[Go special support](#golang)
93
93
*[CSV Output](#csv)
94
94
*[Using SQLite3](#sqlite)
95
95
*[Changing output format](#output)
@@ -192,10 +192,10 @@ zebra
192
192
```
193
193
194
194
<aname="golang"></a>
195
-
### Are there special rules for golang source files?
195
+
### Are there special rules for Go source files?
196
196
197
-
yes, if you want to force a file to be checked as a golang source, use `-source=go` on the command line.
198
-
Conversely, you can check a golang source as if it were pure text by using `-source=text`.
197
+
Yes, if you want to force a file to be checked as a Go source, use `-source=go` on the command line.
198
+
Conversely, you can check a Go source as if it was pure text by using `-source=text`.
199
199
You might want to do this since many variable names have misspellings in them!
200
200
201
201
### Can I check only-comments in other programming languages?
@@ -266,7 +266,7 @@ With debug mode on, you can see it print the corrections, but it will no longer
266
266
<aname="output"></a>
267
267
### How can I change the output format?
268
268
269
-
Using the `-f template` flag you can pass in a [golang text template](https://golang.org/pkg/text/template/) to format the output.
269
+
Using the `-f template` flag you can pass in a [Go text template](https://golang.org/pkg/text/template/) to format the output.
270
270
271
271
One can use `printf "%q" VALUE` to safely quote a value.
272
272
@@ -290,7 +290,7 @@ This corrects commonly misspelled English words in computer source code, and oth
290
290
It is designed to run quickly,
291
291
so it can be used as a [pre-commit hook](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks) with minimal burden on the developer.
292
292
293
-
It does not work with binary formats (e.g. Word, etc.).
293
+
It does not work with binary formats (e.g., Word, etc.).
294
294
295
295
It is not a complete spell-checking program nor a grammar checker.
296
296
@@ -303,9 +303,9 @@ Some other misspelling correctors:
303
303
*https://github.com/lyda/misspell-check
304
304
*https://github.com/lucasdemarchi/codespell
305
305
306
-
They all work but had problems that prevented me from using them at scale:
306
+
They all work but have problems that prevented me from using them at scale:
307
307
308
-
* slow, all of the above check one misspelling at a time (i.e. linear) using regexps
308
+
* slow, all of the above check one misspelling at a time (i.e., linear) using regexps
309
309
* not MIT/Apache2 licensed (or equivalent)
310
310
* have dependencies that don't work for me (Python3, Bash, GNU sed, etc.)
311
311
* don't understand American vs. British English and sometimes makes unwelcome "corrections"
@@ -318,7 +318,7 @@ That said, they might be perfect for you and many have more features than this p
318
318
Misspell is easily 100x to 1000x faster than other spelling correctors.
319
319
You should be able to check and correct 1000 files in under 250ms.
320
320
321
-
This uses the mighty power of golang's [strings.Replacer](https://golang.org/pkg/strings/#Replacer)
321
+
This uses the mighty power of Go's [strings.Replacer](https://golang.org/pkg/strings/#Replacer)
322
322
which is an implementation or variation of the [Aho–Corasick algorithm](https://en.wikipedia.org/wiki/Aho–Corasick_algorithm).
323
323
This makes multiple substring matches *simultaneously*.
324
324
@@ -345,7 +345,7 @@ Then [file a bug](https://github.com/golangci/misspell/issues) describing the pr
345
345
Thanks!
346
346
347
347
<aname="missing"></a>
348
-
### Why is it making mistakes or missing items in golang files?
348
+
### Why is it making mistakes or missing items in Go files?
349
349
350
350
The matching function is *case-sensitive*,
351
351
so variable names that are multiple worlds either in all-uppercase or all-lowercase case sometimes can cause false positives.
@@ -360,7 +360,7 @@ You can check your code using [golint](https://github.com/golang/lint)
360
360
361
361
The main code is [MIT](https://github.com/golangci/misspell/blob/head/LICENSE).
362
362
363
-
Misspell also makes uses of the Golang standard library and contains a modified version of Golang's [strings.Replacer](https://golang.org/pkg/strings/#Replacer)
363
+
Misspell also makes use of the Go standard library and contains a modified version of Go's [strings.Replacer](https://golang.org/pkg/strings/#Replacer)
364
364
which is covered under a [BSD License](https://github.com/golang/go/blob/head/LICENSE).
365
365
Type `misspell -legal` for more details or see [legal.go](https://github.com/golangci/misspell/blob/head/legal.go)
366
366
@@ -371,9 +371,9 @@ It started with a word list from
Unfortunately, this list had to be highly edited as many of the words are obsolete or based on mistakes on mechanical typewriters (I'm guessing).
373
373
374
-
Additional words were added based on actually mistakes seen in the wild (meaning self-generated).
374
+
Additional words were added based on actual mistakes seen in the wild (meaning self-generated).
375
375
376
-
Variations of UK and US spellings are based on many sources including:
376
+
Variations of UK and US spellings are based on many sources, including:
377
377
378
378
*[Comprehensive* list of American and British spelling differences (archive)](https://web.archive.org/web/20230326222449/http://tysto.com/uk-us-spelling-list.html) (with heavy editing, many are incorrect)
379
379
*[American and British spelling (archive)](https://web.archive.org/web/20160820231624/http://www.oxforddictionaries.com/us/words/american-and-british-spelling-american) (excellent site but incomplete)
@@ -388,14 +388,10 @@ Corrections and help welcome.
388
388
389
389
Here are some ideas for enhancements:
390
390
391
-
*Capitalization of proper nouns* could be done (e.g. weekday and month names, country names, language names)
392
-
393
-
*Opinionated US spellings* US English has a number of words with alternate spellings.
391
+
- Capitalization of proper nouns: could be done (e.g., weekday and month names, country names, language names)
392
+
- Opinionated US spellings: US English has a number of words with alternate spellings.
394
393
Think [adviser vs. advisor](http://grammarist.com/spelling/adviser-advisor/).
395
-
While "advisor" is not wrong, the opinionated US locale would correct "advisor" to "adviser".
396
-
397
-
*Versioning* Some type of versioning is needed so reporting mistakes and errors is easier.
398
-
399
-
*Feedback* Mistakes would be sent to some server for aggregation and feedback review.
400
-
401
-
*Contractions and Apostrophes* This would optionally correct "isnt" to "isn't", etc.
394
+
While "advisor" is not wrong, the opinionated US locale would correct "advisor" to "adviser".
395
+
- Versioning: Some type of versioning is needed, so reporting mistakes and errors is easier.
396
+
- Feedback: Mistakes would be sent to some server for aggregation and feedback review.
397
+
- Contractions and Apostrophes: This would optionally correct "isnt" to "isn't", etc.
0 commit comments