Skip to content

Commit

Permalink
docs: fix documentation about source/mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Dec 20, 2023
1 parent 9304602 commit 885fec0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,7 @@ zebra
<a name="golang"></a>
### Are there special rules for golang source files?

Yes! If the file ends in `.go`, then misspell will only check spelling in comments.

If you want to force a file to be checked as a golang source, use `-source=go` on the command line.
yes, if you want to force a file to be checked as a golang source, use `-source=go` on the command line.
Conversely, you can check a golang source as if it were pure text by using `-source=text`.
You might want to do this since many variable names have misspellings in them!

Expand Down
2 changes: 1 addition & 1 deletion cmd/misspell/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func main() {
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 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")
mode = flag.String("source", "text", "Source mode: text (default), go")
debugFlag = flag.Bool("debug", false, "Debug matching, very slow")
exitError = flag.Bool("error", false, "Exit with 2 if misspelling found")
showVersion = flag.Bool("v", false, "Show version and exit")
Expand Down

0 comments on commit 885fec0

Please sign in to comment.