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

Fix misspellings and add misspell lint. #2209

Merged
merged 1 commit into from
Dec 7, 2018
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 .buildkite/steps/setup.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
- label: Prepare scion_base and scion images
command:
- $BASE/clean_env.sh
- ./tools/ci/prepare_image 1b1fef8952469b4895c9871314b0a92228426d9058132e8b5f3a8b89308f2fed
- ./tools/ci/prepare_image a57a514a4270294849579bbb335acc754ed969c0591a13884757fc73f3c49da1
- ./docker.sh build
- wait
- label: Start container
Expand Down
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
command: sudo apt-get update && sudo ./tools/install_docker
- run:
name: Pull and tag scion_base image
command: ./tools/ci/prepare_image 1b1fef8952469b4895c9871314b0a92228426d9058132e8b5f3a8b89308f2fed
command: ./tools/ci/prepare_image a57a514a4270294849579bbb335acc754ed969c0591a13884757fc73f3c49da1
when: always
- run:
name: Build scion:latest image
Expand Down
2 changes: 2 additions & 0 deletions go/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ lint: vendor/.deps.stamp
out=$$(find . -type f -iname '*.go' -a '!' '(' -ipath './vendor/*' -o -ipath '*/*.capnp.go' -o -ipath '*/*.gen.go' -o -ipath '*/mock_*/*' ')' | lll -w 4 -l 100 --files -e '`comment:"|`ini:"|https?:'); if [ -n "$$out" ]; then echo "$$out"; exit 1; fi
@echo "======> go vet"
go vet ${LOCAL_PKGS}
@echo "======> misspell"
misspell ${LOCAL_DIRS}

deps_gen: deps proto

Expand Down
2 changes: 1 addition & 1 deletion go/border/braccept/tpkt/overlay.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
var _ LayerBuilder = (*OverlayIP4UDP)(nil)
var _ LayerMatcher = (*OverlayIP4UDP)(nil)

// OverlayIP4UDP implementes the IPv4/UDP overlay
// OverlayIP4UDP implements the IPv4/UDP overlay
type OverlayIP4UDP struct {
SrcAddr string
SrcPort uint16
Expand Down
2 changes: 1 addition & 1 deletion go/border/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ Top:
rp.DirFrom = s.Dir
rp.Free = free // Set free callback.
if i == pktsRead-1 {
// Only bother setting the Guage once per ReadBatch. Use
// Only bother setting the Gauge once per ReadBatch. Use
// the last read as internally the kernel calls recvmsg
// multiple times, so it will have the latest value.
inputRcvOvfl.Set(float64(meta.RcvOvfl))
Expand Down
2 changes: 1 addition & 1 deletion go/border/rctx/rctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func (ctx *Ctx) ResolveSVCAny(svc addr.HostSVC) (*overlay.OverlayAddr, error) {
return elem.OverlayAddr(ctx.Conf.Topo.Overlay), nil
}

// ResolveSVCMulti resovles a multicast SVC address (i.e. one packet per machine hosting
// ResolveSVCMulti resolves a multicast SVC address (i.e. one packet per machine hosting
// instances for a local infrastructure service).
func (ctx *Ctx) ResolveSVCMulti(svc addr.HostSVC) ([]*overlay.OverlayAddr, error) {
_, elemMap, err := ctx.GetSVCNamesMap(svc)
Expand Down
2 changes: 1 addition & 1 deletion go/border/rpkt/rpkt.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func Init(rawSRevF func(RawSRevCallbackArgs)) {
}

// Router representation of SCION packet, including metadata. The comments for the members have
// tags to specifiy if the member is set during receiving (RECV), parsing (PARSE), processing
// tags to specify if the member is set during receiving (RECV), parsing (PARSE), processing
// (PROCESS) or routing (ROUTE). A number of the non-exported fields are pointers, as they are
// either optional or computed only on demand.
type RtrPkt struct {
Expand Down
4 changes: 2 additions & 2 deletions go/lib/common/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ type Temporary interface {
Temporary() bool
}

// IsTemporaryErr determins if e is a temporary Error. As a fall-back, if e implements ErrorNester,
// IsTemporaryErr determines if e is a temporary Error. As a fall-back, if e implements ErrorNester,
// IsTemporaryErr recurses on the nested error. Otherwise returns false.
func IsTemporaryErr(e error) bool {
if t, _ := e.(Temporary); t != nil {
Expand All @@ -84,7 +84,7 @@ type Timeout interface {
Timeout() bool
}

// IsTimeoutErr determins if e is a temporary Error. As a fall-back, if e implements ErrorNester,
// IsTimeoutErr determines if e is a temporary Error. As a fall-back, if e implements ErrorNester,
// IsTimeoutErr recurses on the nested error. Otherwise returns false.
func IsTimeoutErr(e error) bool {
if t, _ := e.(Timeout); t != nil {
Expand Down
2 changes: 1 addition & 1 deletion go/lib/pathpol/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ func (p *Policy) applyExtended(extends []string, exPolicies []*ExtPolicy) error
}

// evalOptions evaluates the options of a policy and returns the pathSet that matches the option
// with the heighest weight
// with the highest weight
func (p *Policy) evalOptions(inputSet spathmeta.AppPathSet) spathmeta.AppPathSet {
subPolicySet := make(spathmeta.AppPathSet)
currWeight := p.Options[0].Weight
Expand Down
2 changes: 1 addition & 1 deletion go/lib/sciond/reconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var _ Connector = (*reconnector)(nil)
// This is not necessary for request-response matching, but is useful for
// context.Context support. If performance becomes an issue, an improvement
// might be to have a lightweight implementation that just ensures context
// suport.
// support.
type reconnector struct {
path string
}
Expand Down
2 changes: 1 addition & 1 deletion go/lib/sciond/sciond.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (s *service) ConnectTimeout(timeout time.Duration) (Connector, error) {
// an error occurs, or the method successfully returns.
type Connector interface {
// Paths requests from SCIOND a set of end to end paths between src and
// dst. max specifices the maximum number of paths returned.
// dst. max specifies the maximum number of paths returned.
Paths(ctx context.Context, dst, src addr.IA, max uint16, f PathReqFlags) (*PathReply, error)
// ASInfo requests from SCIOND information about AS ia.
ASInfo(ctx context.Context, ia addr.IA) (*ASInfoReply, error)
Expand Down
2 changes: 1 addition & 1 deletion go/lib/scrypto/cert/cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ func Test_Certificate_Eq(t *testing.T) {
SoMsg("Eq", c1.Eq(c2), ShouldBeFalse)
})
Convey("Certificates are unequal (EncAlgorithm)", func() {
c1.EncAlgorithm = "Ceasar Cipher"
c1.EncAlgorithm = "Caesar Cipher"
SoMsg("Eq", c1.Eq(c2), ShouldBeFalse)
})
Convey("Certificates are unequal (ExpirationTime)", func() {
Expand Down
4 changes: 2 additions & 2 deletions go/lib/scrypto/mac.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
)

const (
ErrorCipherFailure = "Unable to initalize AES cipher"
ErrorMacFailure = "Unable to initalize Mac"
ErrorCipherFailure = "Unable to initialize AES cipher"
ErrorMacFailure = "Unable to initialize Mac"
)

func InitMac(key common.RawBytes) (hash.Hash, error) {
Expand Down
2 changes: 1 addition & 1 deletion go/lib/snet/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (c *scionConnWriter) WriteTo(b []byte, raddr net.Addr) (int, error) {
}

// Write sends b through a connection with fixed remote address. If the remote
// address for the conenction is unknown, Write returns an error.
// address for the connection is unknown, Write returns an error.
func (c *scionConnWriter) Write(b []byte) (int, error) {
return c.write(b, nil)
}
Expand Down
2 changes: 1 addition & 1 deletion go/lib/sock/reliable/reliable.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ func (conn *Conn) WriteTo(buf []byte, dst net.Addr) (int, error) {
return 0, err
}
if n > 0 {
// FIXME(scrye): if the message was succesfully written,
// FIXME(scrye): if the message was successfully written,
// we want to return from the function. If the message
// could not be written, repeatedly try to write until
// it works. This is far from optimal, but we will rarely
Expand Down
2 changes: 1 addition & 1 deletion go/lib/spath/hop.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func (h *HopField) Verify(macH hash.Hash, tsInt uint32, prev common.RawBytes) er
return nil
}

// CalcMac calculates the MAC of a HopField and its preceeding HopField, if any.
// CalcMac calculates the MAC of a HopField and its preceding HopField, if any.
// prev does not contain flags byte.
//
// MAC input block format:
Expand Down
2 changes: 1 addition & 1 deletion go/lib/topology/addr.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const (
ErrUnsupportedOverlay = "Unsupported overlay"
ErrUnsupportedAddrType = "Unsupported address type"
ErrInvalidPub = "Invalid public address"
ErrInvalidBind = "Invalid bind adress"
ErrInvalidBind = "Invalid bind address"
ErrAtLeastOnePub = "Overlay requires at least one public address"
ErrOverlayPort = "Overlay port set for non-UDP overlay"
ErrBindAddrEqPubAddr = "Bind address equal to Public address"
Expand Down
2 changes: 1 addition & 1 deletion go/path_srv/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func realMain() int {
return 1
}
msger.AddHandler(infra.ChainRequest, trustStore.NewChainReqHandler(false))
// TOOD(lukedirtwalker): with the new CP-PKI design the PS should no longer need to handle TRC
// TODO(lukedirtwalker): with the new CP-PKI design the PS should no longer need to handle TRC
// and cert requests.
msger.AddHandler(infra.TRCRequest, trustStore.NewTRCReqHandler(false))
args := handlers.HandlerArgs{
Expand Down
2 changes: 1 addition & 1 deletion go/sig/egress/worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ import (
// | Sess Id| Epoch | Sequence number | Index |
// +--------+--------+--------+--------+--------+--------+--------+--------+
//
// Inside the frame, all encapsulated packets are preceeded by a 2B length
// Inside the frame, all encapsulated packets are preceded by a 2B length
// field, and then padded to an 8B boundary

const (
Expand Down
4 changes: 2 additions & 2 deletions go/tools/topopruner/topopruner.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import (

var (
infn = flag.String("in", "", "Input file name. Required.")
outfnf = flag.String("out", "", "Ouput file name for the full topology. Required.")
outfnf = flag.String("out", "", "Output file name for the full topology. Required.")
outfnr = flag.String("reduced", "",
"Ouput file name for the reduced topology. Defaults to not generating this output.")
"Output file name for the reduced topology. Defaults to not generating this output.")
verbose = flag.Bool("verbose", false, "Be more verbose about what is going on")
)

Expand Down
12 changes: 12 additions & 0 deletions go/vendor/vendor.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,18 @@
"revision": "9127e812e1e9e501ce899a18121d316ecb52e4ba",
"revisionTime": "2017-03-28T20:00:08Z"
},
{
"checksumSHA1": "rYc2bTNfDk0JL5Tb+B/snlzRkJE=",
"path": "github.com/client9/misspell",
"revision": "c0b55c8239520f6b5aa15a0207ca8b28027ba49e",
"revisionTime": "2018-03-09T02:03:25Z"
},
{
"checksumSHA1": "3Lbx+qNi8brwKa9dU41O6SEOW6c=",
"path": "github.com/client9/misspell/cmd/misspell",
"revision": "c0b55c8239520f6b5aa15a0207ca8b28027ba49e",
"revisionTime": "2018-03-09T02:03:25Z"
},
{
"checksumSHA1": "s8t6UaijV8WMK0RMdX00OPI5z0o=",
"path": "github.com/dchest/cmac",
Expand Down