Skip to content

Commit

Permalink
Add misspell vs. identypo section. Fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Kohler authored Sep 3, 2018
1 parent 14b7eb2 commit 97880da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ identypo is a Go static analysis tool to find typos in identifiers (functions, f
Similar to other Go static analysis tools (such as golint, go vet), identypo can be invoked with one or more filenames, directories, or packages named by its import path. Identypo also supports the `...` wildcard. By default, it will search for typos in every identifier (functions, function calls, variables, constants, type declarations, packages, labels).

identypo [flags] files/directories/packages

## How is this different from https://github.com/client9/misspell?
`misspell` operates on raw text and comments. `identypo` operates on [AST identifiers](https://golang.org/pkg/go/ast/#Ident) (i.e. variable names, function names, etc.). Moreover, `identypo` splits each camelcased identifier if necessary (MyIdentifierName turns into 'My Identifier Name') prior to analyzing whether or not it is spelled correctly. Under the hood, `identypo` is using [misspell's spellchecking engine](https://godoc.org/github.com/client9/misspell#Replacer.Replace) to determine whether not a given word is spelled correctly.

### Flags
- **-tests** (default true) - Include test files in analysis
Expand Down Expand Up @@ -101,4 +104,4 @@ Please open an issue and/or a PR for any features/bugs.
If you've enjoyed identypo, take a look at my other static anaylsis tools!
- [prealloc](https://github.com/alexkohler/prealloc) - Finds slice declarations that could potentially be preallocated.
- [nakedret](https://github.com/alexkohler/nakedret) - Finds naked returns.
- [unimport](https://github.com/alexkohler/unimport) - Finds unnecessary import aliases.
- [unimport](https://github.com/alexkohler/unimport) - Finds unnecessary import aliases.

0 comments on commit 97880da

Please sign in to comment.