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

travis: Add misspell linter. #1618

Merged
merged 3 commits into from
Feb 15, 2019
Merged
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 blockchain/chaingen/generator.go
Original file line number Diff line number Diff line change
Expand Up @@ -1334,7 +1334,7 @@ func buildMerkleTreeStore(transactions []*dcrutil.Tx) []*chainhash.Hash {
merkles[offset] = newHash

// The normal case sets the parent node to the hash of the
// concatentation of the left and right children.
// concatenation of the left and right children.
default:
newHash := hashMerkleBranches(merkles[i], merkles[i+1])
merkles[offset] = newHash
Expand Down
2 changes: 1 addition & 1 deletion blockchain/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func findDeployment(params *chaincfg.Params, voteID string) (uint32, *chaincfg.C
return 0, nil, fmt.Errorf("unable to find deployement for id %q", voteID)
}

// findDeploymentChoice finds the provided choice ID withing the given
// findDeploymentChoice finds the provided choice ID within the given
// deployment params and either returns a pointer to the found choice or an
// error when not found.
func findDeploymentChoice(deployment *chaincfg.ConsensusDeployment, choiceID string) (*chaincfg.Choice, error) {
Expand Down
2 changes: 1 addition & 1 deletion blockchain/merkle.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func populateMerkleStore(offset int, merkles []*chainhash.Hash) {
merkles[offset] = newHash

// The normal case sets the parent node to the hash of the
// concatentation of the left and right children.
// concatenation of the left and right children.
default:
newHash := HashMerkleBranches(merkles[i], merkles[i+1])
merkles[offset] = newHash
Expand Down
4 changes: 2 additions & 2 deletions dcrutil/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ func NewAddressPubKeyHash(pkHash []byte, net *chaincfg.Params, algo dcrec.Signat
// newAddressPubKeyHash is the internal API to create a pubkey hash address
// with a known leading identifier byte for a network, rather than looking
// it up through its parameters. This is useful when creating a new address
// structure from a string encoding where the identifer byte is already
// structure from a string encoding where the identifier byte is already
// known.
func newAddressPubKeyHash(pkHash []byte, netID [2]byte) (*AddressPubKeyHash, error) {
// Check for a valid pubkey hash length.
Expand Down Expand Up @@ -355,7 +355,7 @@ func NewAddressScriptHashFromHash(scriptHash []byte,
// newAddressScriptHashFromHash is the internal API to create a script hash
// address with a known leading identifier byte for a network, rather than
// looking it up through its parameters. This is useful when creating a new
// address structure from a string encoding where the identifer byte is already
// address structure from a string encoding where the identifier byte is already
// known.
func newAddressScriptHashFromHash(scriptHash []byte,
netID [2]byte) (*AddressScriptHash, error) {
Expand Down
6 changes: 4 additions & 2 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ set -ex
# 2. gosimple (https://github.com/dominikh/go-simple)
# 3. unconvert (https://github.com/mdempsky/unconvert)
# 4. ineffassign (https://github.com/gordonklaus/ineffassign)
# 5. race detector (http://blog.golang.org/race-detector)
# 5. misspell (https://github.com/client9/misspell)
# 6. race detector (http://blog.golang.org/race-detector)

# golangci-lint (github.com/golangci/golangci-lint) is used to run each each
# static checker.
Expand Down Expand Up @@ -58,7 +59,8 @@ testrepo () {
--enable=gofmt \
--enable=gosimple \
--enable=unconvert \
--enable=ineffassign ./${module}/...
--enable=ineffassign \
--enable=misspell ./${module}/...
done

echo "------------------------------------------"
Expand Down