Skip to content
This repository has been archived by the owner on Dec 7, 2020. It is now read-only.

Commit

Permalink
Spelling Check (#322)
Browse files Browse the repository at this point in the history
- adding the misspell check to `make test`
  • Loading branch information
gambol99 committed Mar 2, 2018
1 parent 4d69ac3 commit 35e834a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ go:
install:
- go get github.com/Masterminds/glide
- go get github.com/mattn/goveralls
- go get -u github.com/client9/misspell/cmd/misspell
script:
- make test
- if ([[ ${TRAVIS_BRANCH} == "master" ]] && [[ ${TRAVIS_EVENT_TYPE} == "push" ]]) || [[ -n ${TRAVIS_TAG} ]]; then
Expand Down
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,13 @@ cover:
@echo "--> Running go cover"
@go test --cover

spelling:
@echo "--> Chekcing the spelling"
@which misspell 2>/dev/null ; if [ $$? -eq 1 ]; then \
go get -u github.com/client9/misspell/cmd/misspell; \
fi
@misspell -error *.go

test:
@echo "--> Running the tests"
@if [ ! -d "vendor" ]; then \
Expand All @@ -141,6 +148,7 @@ test:
@go test -v
@$(MAKE) golang
@$(MAKE) gofmt
@$(MAKE) spelling
@$(MAKE) vet
@$(MAKE) cover

Expand Down
2 changes: 1 addition & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ type Config struct {
Headers map[string]string `json:"headers" yaml:"headers" usage:"custom headers to the upstream request, key=value"`

// EnableDefaultDeny indicates we should deny by default all requests
EnableDefaultDeny bool `json:"enable-default-deny" yaml:"enable-default-deny" usage:"enables a default denial on all requests, you have to explicity say what is permitted (recommended)"`
EnableDefaultDeny bool `json:"enable-default-deny" yaml:"enable-default-deny" usage:"enables a default denial on all requests, you have to explicitly say what is permitted (recommended)"`
// EnableEncryptedToken indicates the access token should be encoded
EnableEncryptedToken bool `json:"enable-encrypted-token" yaml:"enable-encrypted-token" usage:"enable encryption for the access tokens"`
// EnableLogging indicates if we should log all the requests
Expand Down
2 changes: 1 addition & 1 deletion rotation.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func (c *certificationRotation) watch() error {
c.log.Info("replacing the server certifacte with updated version")
}
case err := <-watcher.Errors:
c.log.Error("recieved an error from the file watcher", zap.Error(err))
c.log.Error("received an error from the file watcher", zap.Error(err))
}
}
}()
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (r *oauthProxy) createReverseProxy() error {
r.log.Warn("the resource url is not a prefix",
zap.String("resource", x.URL),
zap.String("change", x.URL),
zap.String("ammended", strings.TrimRight(x.URL, "/")))
zap.String("amended", strings.TrimRight(x.URL, "/")))
}
if x.URL == "/*" && r.config.EnableDefaultDeny {
switch x.WhiteListed {
Expand Down

0 comments on commit 35e834a

Please sign in to comment.