Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Kohler authored Sep 4, 2018
1 parent 97880da commit 51cf163
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ identypo is a Go static analysis tool to find typos in identifiers (functions, f

go get -u github.com/alexkohler/identypo/cmd/identypo

## 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.

## Usage

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

0 comments on commit 51cf163

Please sign in to comment.