diff --git a/docs/development.md b/docs/development.md index 589af71e..54076f1a 100644 --- a/docs/development.md +++ b/docs/development.md @@ -139,7 +139,7 @@ easy as copying one of the files in [`test/shell/`](/test/shell) and adapting it. This test suite won't run by default (unless when on CI server) and needs to be -called explictly using: +called explicitly using: ``` make test-shell diff --git a/docs/function-guide.md b/docs/function-guide.md index 9197a227..39c0a3cd 100644 --- a/docs/function-guide.md +++ b/docs/function-guide.md @@ -327,7 +327,7 @@ Yes, you can use a function generator in `golang` to build multiple different implementations from the same function generator. You just need to implement a function which *returns* a `golang` type of `func([]types.Value) (types.Value, error)` which is what `FuncValue` expects. The generator function can use any input it -wants to build the individual functions, thus helping with code re-use. +wants to build the individual functions, thus helping with code reuse. ### How do I determine the signature of my simple, polymorphic function? diff --git a/docs/language-guide.md b/docs/language-guide.md index d298c706..4c6937de 100644 --- a/docs/language-guide.md +++ b/docs/language-guide.md @@ -985,7 +985,7 @@ Not really, but practically it can be used as such. The `class` statement is not a singleton since it can be called multiple times in different locations, and it can also be parameterized and called multiple times (with `include`) using different input parameters. The reason it can be used as such is that statement -output (from multple classes) that is compatible (and usually identical) will +output (from multiple classes) that is compatible (and usually identical) will be automatically collated and have the duplicates removed. In that way, you can assume that an unparameterized class is always a singleton, and that parameterized classes can often be singletons depending on their contents and if @@ -1027,7 +1027,7 @@ thing FRP experts might notice is that some of the concepts from FRP are either named differently, or are notably absent. In mgmt, we don't talk about behaviours, events, or signals in the strict FRP -definitons of the words. Firstly, because we only support discretized, streams +definitions of the words. Firstly, because we only support discretized, streams of values with no plan to add continuous semantics. Secondly, because we prefer to use terms which are more natural and relatable to what our target audience is expecting. Our users are more likely to have a background in Physiology, or diff --git a/docs/release-notes/0.0.24 b/docs/release-notes/0.0.24 index 019b9434..143a0087 100644 --- a/docs/release-notes/0.0.24 +++ b/docs/release-notes/0.0.24 @@ -62,7 +62,7 @@ status-quo of using your own etcd cluster is stable, and you can even use the embedded etcd server in standalone mode... * This means you can run `mgmt etcd` and get the standard etcd binary -behviour that you'd get from running `etcd` normally. This makes it +behaviour that you'd get from running `etcd` normally. This makes it easy to use both together since you only need to transport one binary around. (And maybe mgmt will do that for you!) diff --git a/docs/service-guide.md b/docs/service-guide.md index bc5bbf72..c86cc29b 100644 --- a/docs/service-guide.md +++ b/docs/service-guide.md @@ -133,7 +133,7 @@ result, it might be very hard for them to improve their API's, particularly without breaking compatibility promises for their existing customers. As a result, they should either add a versioned API, which lets newer consumers get the benefit, or add new parallel services which offer the modern features. If -they don't, the only solution is for new competitors to build-in these better +they don't, the only solution is for new competitors to build in these better efficiencies, eventually offering better value to cost ratios, which will then make legacy products less lucrative and therefore unmaintainable as compared to their competitors. diff --git a/docs/style-guide.md b/docs/style-guide.md index d48d2391..f948bd19 100644 --- a/docs/style-guide.md +++ b/docs/style-guide.md @@ -129,9 +129,9 @@ For example, in a short string snippet you can use `s` instead of `myString`, as well as other common choices. `i` is a common `int` counter, `f` for files, `fn` for functions, `x` for something else and so on. -### Variable re-use +### Variable reuse -Feel free to create and use new variables instead of attempting to re-use the +Feel free to create and use new variables instead of attempting to reuse the same string. For example, if a function input arg is named `s`, you can use a new variable to receive the first computation result on `s` instead of storing it back into the original `s`. This avoids confusion if a different part of the @@ -145,7 +145,7 @@ MyNotIdealFunc(s string, b bool) string { if !b { return s + "hey" } - s = strings.Replace(s, "blah", "", -1) // not ideal (re-use of `s` var) + s = strings.Replace(s, "blah", "", -1) // not ideal (reuse of `s` var) return s } @@ -153,7 +153,7 @@ MyOkayFunc(s string, b bool) string { if !b { return s + "hey" } - s2 := strings.Replace(s, "blah", "", -1) // doesn't re-use `s` variable + s2 := strings.Replace(s, "blah", "", -1) // doesn't reuse `s` variable return s2 } diff --git a/engine/graph/autoedge/autoedge.go b/engine/graph/autoedge/autoedge.go index e11df9d7..5dbd25da 100644 --- a/engine/graph/autoedge/autoedge.go +++ b/engine/graph/autoedge/autoedge.go @@ -56,7 +56,7 @@ func AutoEdge(graph *pgraph.Graph, debug bool, logf func(format string, v ...int sorted = append(sorted, res) } - for _, res := range sorted { // for each vertexes autoedges + for _, res := range sorted { // for each vertices autoedges autoEdgeObj, e := res.AutoEdges() if e != nil { err = errwrap.Append(err, e) // collect all errors diff --git a/engine/graph/autogroup/autogroup_test.go b/engine/graph/autogroup/autogroup_test.go index 0e584e50..a0c8b187 100644 --- a/engine/graph/autogroup/autogroup_test.go +++ b/engine/graph/autogroup/autogroup_test.go @@ -301,7 +301,7 @@ Loop: // check edges for v1 := range g1.Adjacency() { // for each vertex in g1 - v2 := m[v1] // lookup in map to get correspondance + v2 := m[v1] // lookup in map to get correspondence // g1.Adjacency()[v1] corresponds to g2.Adjacency()[v2] if e1, e2 := len(g1.Adjacency()[v1]), len(g2.Adjacency()[v2]); e1 != e2 { r1 := v1.(engine.Res) diff --git a/engine/graph/autogroup/base.go b/engine/graph/autogroup/base.go index ccf417fe..2c033833 100644 --- a/engine/graph/autogroup/base.go +++ b/engine/graph/autogroup/base.go @@ -134,7 +134,7 @@ func (ag *baseGrouper) VertexNext() (v1, v2 pgraph.Vertex, err error) { return } -// VertexCmp can be used in addition to an overridding implementation. +// VertexCmp can be used in addition to an overriding implementation. func (ag *baseGrouper) VertexCmp(v1, v2 pgraph.Vertex) error { if v1 == nil || v2 == nil { return fmt.Errorf("the vertex is nil") diff --git a/engine/graph/state.go b/engine/graph/state.go index 701b3b30..5349863d 100644 --- a/engine/graph/state.go +++ b/engine/graph/state.go @@ -228,7 +228,7 @@ func (obj *State) Init() error { if !ok { continue } - // pass in information on requestor... + // pass in information on requester... if err := r1.GraphQueryAllowed( engine.GraphQueryableOptionKind(res.Kind()), engine.GraphQueryableOptionName(res.Name()), @@ -243,7 +243,7 @@ func (obj *State) Init() error { if !ok { continue } - // pass in information on requestor... + // pass in information on requester... if err := r2.GraphQueryAllowed( engine.GraphQueryableOptionKind(res.Kind()), engine.GraphQueryableOptionName(res.Name()), diff --git a/engine/metaparams.go b/engine/metaparams.go index d4d82f7e..5ecbcd6c 100644 --- a/engine/metaparams.go +++ b/engine/metaparams.go @@ -150,7 +150,7 @@ func (obj *MetaParams) Cmp(meta *MetaParams) error { // XXX: add a one way cmp like we used to have ? //if obj.Noop != meta.Noop { // // obj is the existing res, res is the *new* resource - // // if we go from no-noop -> noop, we can re-use the obj + // // if we go from no-noop -> noop, we can reuse the obj // // if we go from noop -> no-noop, we need to regenerate // if obj.Noop { // asymmetrical // return fmt.Errorf("values for Noop are different") // going from noop to no-noop! diff --git a/engine/resources/aws_ec2.go b/engine/resources/aws_ec2.go index e6431896..0d2a72c9 100644 --- a/engine/resources/aws_ec2.go +++ b/engine/resources/aws_ec2.go @@ -193,7 +193,7 @@ type AwsEc2Res struct { // UserData is used to run bash and cloud-init commands on first launch. // See http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html - // for documantation and examples. + // for documentation and examples. UserData string `lang:"userdata" yaml:"userdata"` client *ec2.EC2 // client session for AWS API calls diff --git a/engine/resources/cron.go b/engine/resources/cron.go index b2feaca3..213cbfa7 100644 --- a/engine/resources/cron.go +++ b/engine/resources/cron.go @@ -142,7 +142,7 @@ type CronRes struct { WakeSystem bool `lang:"wakesystem" yaml:"wakesystem"` // RemainAfterElapse, if true, means an elapsed timer will stay loaded, - // and its state remains queriable. If false, an elapsed timer unit that + // and its state remains queryable. If false, an elapsed timer unit that // cannot elapse anymore is unloaded. It defaults to true. RemainAfterElapse bool `lang:"remainafterelapse" yaml:"remainafterelapse"` @@ -271,7 +271,7 @@ func (obj *CronRes) Watch(ctx context.Context) error { //args = append(args, "eavesdrop='true'") // XXX: not allowed anymore? args = append(args, fmt.Sprintf("arg2='%s.timer'", obj.Name())) - // match dbus messsages + // match dbus messages if call := bus.BusObject().Call(engineUtil.DBusAddMatch, 0, strings.Join(args, ",")); call.Err != nil { return call.Err } diff --git a/engine/resources/dhcp.go b/engine/resources/dhcp.go index 6247bae0..802876b0 100644 --- a/engine/resources/dhcp.go +++ b/engine/resources/dhcp.go @@ -1863,7 +1863,7 @@ func (obj *DHCPRangeRes) handler4(data *HostData) (func(*dhcpv4.DHCPv4, *dhcpv4. // FIXME: Run this somewhere for now, eventually it should get scheduled // to run in the returned duration of time. This way, it would clean old - // peristed entries when they're stale, not when a new request comes in. + // persisted entries when they're stale, not when a new request comes in. if _, err := obj.leaseClean(); err != nil { return nil, errwrap.Wrapf(err, "clean error") } diff --git a/engine/resources/docker_container.go b/engine/resources/docker_container.go index 2da8eb39..4c579718 100644 --- a/engine/resources/docker_container.go +++ b/engine/resources/docker_container.go @@ -407,7 +407,7 @@ func (obj *DockerContainerRes) Cmp(r engine.Res) error { return errwrap.Wrapf(err, "the Cmd field differs") } if err := util.SortedStrSliceCompare(obj.Env, res.Env); err != nil { - return errwrap.Wrapf(err, "tne Env field differs") + return errwrap.Wrapf(err, "the Env field differs") } if len(obj.Ports) != len(res.Ports) { return fmt.Errorf("the Ports length differs") @@ -461,7 +461,7 @@ func (obj *DockerContainerRes) AutoEdges() (engine.AutoEdge, error) { }, nil } -// Next returnes the next automatic edge. +// Next returns the next automatic edge. func (obj *DockerContainerResAutoEdges) Next() []engine.ResUID { if len(obj.UIDs) == 0 { return nil diff --git a/engine/resources/file.go b/engine/resources/file.go index 02ec9ab6..2a9d5791 100644 --- a/engine/resources/file.go +++ b/engine/resources/file.go @@ -145,7 +145,7 @@ type FileRes struct { // Source specifies the source contents for the file resource. It cannot // be combined with the Content or Fragments parameters. It must be an // absolute path, and it can point to a file or a directory. If it - // points to a file, then that will will be copied throuh directly. If + // points to a file, then that will will be copied through directly. If // it points to a directory, then it will copy the directory "rsync // style" onto the file destination. As a result, if this is a file, // then the main file res must be a file, and if it is a directory, then @@ -643,7 +643,7 @@ func (obj *FileRes) fileCheckApply(ctx context.Context, apply bool, src io.ReadS return "", false, err } sha256sum = hex.EncodeToString(hash.Sum(nil)) - // since we re-use this src handler below, it is + // since we reuse this src handler below, it is // *critical* to seek to 0, or we'll copy nothing! if n, err := src.Seek(0, 0); err != nil || n != 0 { return sha256sum, false, err @@ -673,7 +673,7 @@ func (obj *FileRes) fileCheckApply(ctx context.Context, apply bool, src io.ReadS if err != nil { return sha256sum, false, err } - defer dstFile.Close() // TODO: is this redundant because of the earlier defered Close() ? + defer dstFile.Close() // TODO: is this redundant because of the earlier deferred Close() ? if isFile { // set mode because it's a new file if err := dstFile.Chmod(srcStat.Mode()); err != nil { diff --git a/engine/resources/panic.go b/engine/resources/panic.go index 40386b28..f08a0e53 100644 --- a/engine/resources/panic.go +++ b/engine/resources/panic.go @@ -46,7 +46,7 @@ func init() { // PanicRes is a no-op resource that does nothing as quietly as possible. One of // these will be added the graph if you use the panic function. (Even when it is // in a non-panic mode.) This is possibly the simplest resource that exists, and -// in fact, everytime it is used, it will always have the same "name" value. It +// in fact, every time it is used, it will always have the same "name" value. It // is only used so that there is a valid destination for the panic function. type PanicRes struct { traits.Base // add the base methods without re-implementation diff --git a/engine/resources/virt.go b/engine/resources/virt.go index 8151eafb..971c5776 100644 --- a/engine/resources/virt.go +++ b/engine/resources/virt.go @@ -853,7 +853,7 @@ func (obj *VirtRes) CheckApply(ctx context.Context, apply bool) (bool, error) { } // FIXME: is doing this early check (therefore twice total) a good idea? - // run additional pre-emptive attr change checks here for hotplug stuff! + // run additional preemptive attr change checks here for hotplug stuff! if !obj.absent { if c, err := obj.attrCheckApply(ctx, apply, dom); err != nil { return false, errwrap.Wrapf(err, "early attrCheckApply failed") diff --git a/engine/util/mode.go b/engine/util/mode.go index 6cee5167..b1ed342c 100644 --- a/engine/util/mode.go +++ b/engine/util/mode.go @@ -69,7 +69,7 @@ func modeIsValidWhat(what string) bool { return len(what) == 0 } -// modeAssigned executes an assigment symbolic mode string (u=r). It clears out +// modeAssigned executes an assignment symbolic mode string (u=r). It clears out // any bits for every subject in who and then assigns the specified modes in // what. func modeAssigned(who, what string, from os.FileMode) (os.FileMode, error) { @@ -208,7 +208,7 @@ func modeSubtracted(who, what string, from os.FileMode) (os.FileMode, error) { } // modeValueFrom will return the bits requested for the mode in the correct -// possitions for the specified subjects in who. +// positions for the specified subjects in who. func modeValueFrom(who string, modeType uint32) os.FileMode { i := uint32(0) for _, w := range who { diff --git a/engine/util/util.go b/engine/util/util.go index 85bfdd34..495a0255 100644 --- a/engine/util/util.go +++ b/engine/util/util.go @@ -51,7 +51,7 @@ import ( ) const ( - // DBusInterface is the dbus interface that contains genereal methods. + // DBusInterface is the dbus interface that contains general methods. DBusInterface = "org.freedesktop.DBus" // DBusAddMatch is the dbus method to receive a subset of dbus broadcast // signals. @@ -387,7 +387,7 @@ func GetGID(group string) (int, error) { return -1, errwrap.Wrapf(err, "group lookup error (%s)", group) } -// RestartUnit resarts the given dbus unit and waits for it to finish starting. +// RestartUnit restarts the given dbus unit and waits for it to finish starting. func RestartUnit(ctx context.Context, conn *dbus.Conn, unit string) error { return unitStateAction(ctx, conn, unit, DBusRestartUnit) } diff --git a/etcd/callback.go b/etcd/callback.go index e8cbecad..f65f6e32 100644 --- a/etcd/callback.go +++ b/etcd/callback.go @@ -271,7 +271,7 @@ func (obj *EmbdEtcd) nominateCb(ctx context.Context) error { // didn't remove a member... // XXX: If the leader changes, do we need to kick the volunteerCb or anything // else that might have required a leader and which returned because it did not -// have one, thus loosing an event? +// have one, thus losing an event? func (obj *EmbdEtcd) volunteerCb(ctx context.Context) error { // Ensure that only one copy of this function is run simultaneously. // It's not entirely clear if this can ever happen or if it's needed, diff --git a/etcd/scheduler/options.go b/etcd/scheduler/options.go index aaa9ccfd..bfe91d13 100644 --- a/etcd/scheduler/options.go +++ b/etcd/scheduler/options.go @@ -84,7 +84,7 @@ func MaxCount(maxCount int) Option { } } -// ReuseLease specifies whether we should try and re-use the lease between runs. +// ReuseLease specifies whether we should try and reuse the lease between runs. // Ordinarily it would get discarded with each new version (deploy) of the code. func ReuseLease(reuseLease bool) Option { return func(so *schedulerOptions) { diff --git a/etcd/scheduler/rrstrategy.go b/etcd/scheduler/rrstrategy.go index 4e722ec9..f7b6720f 100644 --- a/etcd/scheduler/rrstrategy.go +++ b/etcd/scheduler/rrstrategy.go @@ -72,7 +72,7 @@ func (obj *rrStrategy) Schedule(hostnames map[string]string, opts *schedulerOpti } } - // remove any hosts we previouly knew about from the list + // remove any hosts we previously knew about from the list for ix := len(obj.hosts) - 1; ix >= 0; ix-- { if !util.StrInList(obj.hosts[ix], sortedHosts) { // delete entry at this index diff --git a/etcd/scheduler/scheduler.go b/etcd/scheduler/scheduler.go index 1ee622ca..d2421e1c 100644 --- a/etcd/scheduler/scheduler.go +++ b/etcd/scheduler/scheduler.go @@ -146,8 +146,8 @@ func Schedule(client *etcd.Client, path string, hostname string, opts ...Option) sessionOptions := []concurrency.SessionOption{} - // here we try to re-use lease between multiple runs of the code - // TODO: is it a good idea to try and re-use the lease b/w runs? + // here we try to reuse lease between multiple runs of the code + // TODO: is it a good idea to try and reuse the lease b/w runs? if options.reuseLease { if leaseID, exists := schedulerLeases[path]; exists { sessionOptions = append(sessionOptions, concurrency.WithLease(leaseID)) diff --git a/lang/ast/structs.go b/lang/ast/structs.go index 3cbbfec2..97e2e5d4 100644 --- a/lang/ast/structs.go +++ b/lang/ast/structs.go @@ -3916,7 +3916,7 @@ func (obj *StmtProg) SetScope(scope *interfaces.Scope) error { // Track all the bind statements, functions, and classes. This is used // for duplicate checking. These might appear out-of-order as code, but - // are iterated in the topoligically sorted node order. When we collect + // are iterated in the topologically sorted node order. When we collect // all the functions, we group by name (if polyfunc is ok) and we also // do something similar for classes. // TODO: if we ever allow poly classes, then group in lists by name @@ -4494,7 +4494,7 @@ func (obj *StmtFunc) TypeCheck() ([]*interfaces.UnificationInvariant, error) { invariants = append(invariants, invar) // I think the invariants should come in from ExprCall instead, because - // ExprCall operates on an instatiated copy of the contained ExprFunc + // ExprCall operates on an instantiated copy of the contained ExprFunc // which will have different pointers than what is seen here. // nope! @@ -7398,7 +7398,7 @@ func (obj *ExprFunc) Copy() (interfaces.Expr, error) { // copied = true // XXX: add this if anyone isn't static? } - // We wan't to allow static functions, although we have to be careful... + // We want to allow static functions, although we have to be careful... // Doing this for static functions causes us to hit a strange case in // the SetScope function for ExprCall... Investigate if we find a bug... if !copied { // it's static diff --git a/lang/core/embedded/provisioner/files/kickstart.ks.tmpl b/lang/core/embedded/provisioner/files/kickstart.ks.tmpl index 5e7bb456..14e7ac61 100644 --- a/lang/core/embedded/provisioner/files/kickstart.ks.tmpl +++ b/lang/core/embedded/provisioner/files/kickstart.ks.tmpl @@ -40,7 +40,7 @@ timezone {{ .timezone }} --isUtc # security # {{ if .password -}} -# password can be crypted with: +# password can be encrypted with: # python3 -c 'import crypt; print(crypt.crypt("password", crypt.mksalt(crypt.METHOD_SHA512)))' # or # openssl passwd -6 -salt (salt can be omitted to generate one) diff --git a/lang/core/embedded/provisioner/main.mcl b/lang/core/embedded/provisioner/main.mcl index 6a817fd0..ba8f2225 100644 --- a/lang/core/embedded/provisioner/main.mcl +++ b/lang/core/embedded/provisioner/main.mcl @@ -562,7 +562,7 @@ class base:host($name, $config) { #} else { # "" + get_value("network") # XXX: implement some sort of lookup function #} - #$ip = $config->ip || magic.pool($ns, [1,2,3,4], $name) # XXX: if $ns is "", then don't allocate. Otherwise get from list. Re-use based on $name hash. + #$ip = $config->ip || magic.pool($ns, [1,2,3,4], $name) # XXX: if $ns is "", then don't allocate. Otherwise get from list. Reuse based on $name hash. $bios = $config->bios || false $password = $config->password || "" # empty means disabled panic(len($password) != 0 and len($password) != 106) # length of salted password diff --git a/lang/funcs/dage/dage.go b/lang/funcs/dage/dage.go index 7abd2adc..c7391fca 100644 --- a/lang/funcs/dage/dage.go +++ b/lang/funcs/dage/dage.go @@ -806,7 +806,7 @@ func (obj *Engine) process(ctx context.Context) (reterr error) { // Check each leaf and make sure they're all ready to send, for us to // send anything to ag channel. In addition, we need at least one send // message from any of the valid isLeaf nodes. Since this only runs if - // everyone is loaded, we just need to check for activty leaf nodes. + // everyone is loaded, we just need to check for activity leaf nodes. obj.stateMutex.Lock() for node := range obj.activity { if obj.leafSend { diff --git a/lang/funcs/funcgen/func.go b/lang/funcs/funcgen/func.go index f282207c..8ab3bad9 100644 --- a/lang/funcs/funcgen/func.go +++ b/lang/funcs/funcgen/func.go @@ -53,7 +53,7 @@ type function struct { GolangPackage *golangPackage `yaml:"golangPackage"` // GolangFunc is the name of the function in golang. GolangFunc string `yaml:"golangFunc"` - // Errorful indicates wether the golang function can return an error + // Errorful indicates whether the golang function can return an error // as second argument. Errorful bool `yaml:"errorful"` // Args is the list of the arguments of the function. diff --git a/lang/parser/parser.y b/lang/parser/parser.y index 8ef02d56..9d2aa362 100644 --- a/lang/parser/parser.y +++ b/lang/parser/parser.y @@ -1366,7 +1366,7 @@ type_struct_field: IDENTIFIER type { posLast(yylex, yyDollar) // our pos - $$.arg = &interfaces.Arg{ // re-use the Arg struct + $$.arg = &interfaces.Arg{ // reuse the Arg struct Name: $1.str, Type: $2.typ, } diff --git a/modules/grafana/files/grafana.ini.tmpl b/modules/grafana/files/grafana.ini.tmpl index 2f270d49..3ea72186 100644 --- a/modules/grafana/files/grafana.ini.tmpl +++ b/modules/grafana/files/grafana.ini.tmpl @@ -507,7 +507,7 @@ min_refresh_interval = 1s # Login cookie name ;login_cookie_name = grafana_session -# Disable usage of Grafana build-in login solution. +# Disable usage of Grafana built-in login solution. ;disable_login = false # The maximum lifetime (duration) an authenticated user can be inactive before being required to login at next visit. Default is 7 days (7d). This setting should be expressed as a duration, e.g. 5m (minutes), 6h (hours), 10d (days), 2w (weeks), 1M (month). The lifetime resets at each successful token rotation. @@ -1530,7 +1530,7 @@ allow_loading_unsigned_plugins = performancecopilot-pcp-app,pcp-redis-datasource # there are currently two ways to enable feature toggles in the `grafana.ini`. # you can either pass an array of feature you want to enable to the `enable` field or # configure each toggle by setting the name of the toggle to true/false. Toggles set to true/false -# will take presidence over toggles in the `enable` list. +# will take precedence over toggles in the `enable` list. ;enable = feature1,feature2 diff --git a/pgp/pgp.go b/pgp/pgp.go index 68a1d3c7..ea46469c 100644 --- a/pgp/pgp.go +++ b/pgp/pgp.go @@ -230,13 +230,13 @@ func ParseIdentity(identity string) (name, comment, email string, err error) { // get name n := strings.Split(identity, " <") if len(n) != 2 { - return "", "", "", errwrap.Wrapf(err, "user string mal formated") + return "", "", "", errwrap.Wrapf(err, "user string malformed") } // get email and comment ec := strings.Split(n[1], "> ") if len(ec) != 2 { - return "", "", "", errwrap.Wrapf(err, "user string mal formated") + return "", "", "", errwrap.Wrapf(err, "user string malformed") } return n[0], ec[1], ec[0], nil diff --git a/pgraph/pgraph.go b/pgraph/pgraph.go index c46bf231..fb3c8af2 100644 --- a/pgraph/pgraph.go +++ b/pgraph/pgraph.go @@ -240,7 +240,7 @@ func (g *Graph) DeleteVertex(xv ...Vertex) { // AddEdge adds a directed edge to the graph from v1 to v2. func (g *Graph) AddEdge(v1, v2 Vertex, e Edge) { - // NOTE: this doesn't allow more than one edge between two vertexes... + // NOTE: this doesn't allow more than one edge between two vertices... g.AddVertex(v1, v2) // supports adding N vertices now // TODO: check if an edge exists to avoid overwriting it! // NOTE: VertexMerge() depends on overwriting it at the moment... @@ -856,7 +856,7 @@ Loop: // check edges for v1 := range g.Adjacency() { // for each vertex in g - v2 := m[v1] // lookup in map to get correspondance + v2 := m[v1] // lookup in map to get correspondence // g.Adjacency()[v1] corresponds to graph.Adjacency()[v2] if e1, e2 := len(g.Adjacency()[v1]), len(graph.Adjacency()[v2]); e1 != e2 { return fmt.Errorf("base graph, vertex(%s) has %d edges, while input graph, vertex(%s) has %d", v1, e1, v2, e2) diff --git a/pgraph/subgraph_test.go b/pgraph/subgraph_test.go index 212c2f72..f129cb57 100644 --- a/pgraph/subgraph_test.go +++ b/pgraph/subgraph_test.go @@ -54,7 +54,7 @@ func TestAddEdgeGraph1(t *testing.T) { g.AddGraph(sub) - // expected (can re-use the same vertices) + // expected (can reuse the same vertices) expected := &Graph{} expected.AddEdge(v1, v3, e1) expected.AddEdge(v2, v3, e2) @@ -87,7 +87,7 @@ func TestAddEdgeVertexGraph1(t *testing.T) { g.AddEdgeVertexGraph(v3, sub, edgeGenFn) - // expected (can re-use the same vertices) + // expected (can reuse the same vertices) expected := &Graph{} expected.AddEdge(v1, v3, e1) expected.AddEdge(v2, v3, e2) @@ -120,7 +120,7 @@ func TestAddEdgeGraphVertex1(t *testing.T) { g.AddEdgeGraphVertex(sub, v3, edgeGenFn) - // expected (can re-use the same vertices) + // expected (can reuse the same vertices) expected := &Graph{} expected.AddEdge(v1, v3, e1) expected.AddEdge(v2, v3, e2) @@ -153,7 +153,7 @@ func TestAddEdgeVertexGraphLight1(t *testing.T) { g.AddEdgeVertexGraphLight(v3, sub, edgeGenFn) - // expected (can re-use the same vertices) + // expected (can reuse the same vertices) expected := &Graph{} expected.AddEdge(v1, v3, e1) expected.AddEdge(v2, v3, e2) @@ -186,7 +186,7 @@ func TestAddEdgeGraphVertexLight1(t *testing.T) { g.AddEdgeGraphVertexLight(sub, v3, edgeGenFn) - // expected (can re-use the same vertices) + // expected (can reuse the same vertices) expected := &Graph{} expected.AddEdge(v1, v3, e1) expected.AddEdge(v2, v3, e2) diff --git a/test.sh b/test.sh index f2f26d14..29ca8559 100755 --- a/test.sh +++ b/test.sh @@ -45,7 +45,7 @@ function skip-testsuite() { echo skipping "$@" "($REASON)" echo 'SKIP' else - # if a skipped suite is explicity called, run it anyway + # if a skipped suite is explicitly called, run it anyway if test "test-$testsuite" == "$testname"; then run-testsuite "$@" fi diff --git a/test/test-commit-message.sh b/test/test-commit-message.sh index f194b454..f44b2977 100755 --- a/test/test-commit-message.sh +++ b/test/test-commit-message.sh @@ -49,7 +49,7 @@ commit_title_regex='^\([a-z0-9]\(\(, \)\|[a-z0-9]\)*[a-z0-9]: \)\+[A-Z0-9][^:]\+ # More than one char is required before : [[ $(echo "a: bar" | grep -c "$commit_title_regex") -eq 0 ]] -# Run checks agains multiple :. +# Run checks against multiple :. [[ $(echo "a: bar:" | grep -c "$commit_title_regex") -eq 0 ]] [[ $(echo "a: bar, fooX: Barfoo" | grep -c "$commit_title_regex") -eq 0 ]] [[ $(echo "a: bar, foo: barfoo foo: Nope" | grep -c "$commit_title_regex") -eq 0 ]] diff --git a/test/test-golint.sh b/test/test-golint.sh index ae8166ca..325c756d 100755 --- a/test/test-golint.sh +++ b/test/test-golint.sh @@ -26,7 +26,7 @@ if [ "$COMMITS" != "" ] && [ "$COMMITS" -gt "1" ]; then HACK="yes" fi -# find all go files, exluding temporary directories and generated files +# find all go files, excluding temporary directories and generated files LINT=$(find * -maxdepth 9 -iname '*.go' -not -path 'old/*' -not -path 'tmp/*' -not -path 'lang/parser/y.go' -not -path 'lang/parser/lexer.nn.go' -not -path 'lang/interpolate/parse.generated.go' -not -path 'vendor/*' -exec golint {} \;) # current golint output COUNT=`echo -e "$LINT" | wc -l` # number of golint problems in current branch diff --git a/util/errwrap/errwrap.go b/util/errwrap/errwrap.go index 687ed89b..f545366b 100644 --- a/util/errwrap/errwrap.go +++ b/util/errwrap/errwrap.go @@ -58,7 +58,7 @@ func Append(reterr, err error) error { } // String returns a string representation of the error. In particular, if the -// error is nil, it returns an empty string instead of panicing. +// error is nil, it returns an empty string instead of panicking. func String(err error) string { if err == nil { return "" diff --git a/util/socketset/socketset.go b/util/socketset/socketset.go index e928b710..f4bfd918 100644 --- a/util/socketset/socketset.go +++ b/util/socketset/socketset.go @@ -151,7 +151,7 @@ type UEvent struct { } // ReceiveUEvent is a wrapper around ReceiveBytes. Parses the UEvent data -// receieved from the socket and puts it into a UEvent struct. +// received from the socket and puts it into a UEvent struct. func (obj *SocketSet) ReceiveUEvent() (*UEvent, error) { // TODO: can multiple events come in the same socket? event := &UEvent{Data: map[string]string{}} diff --git a/util/sync.go b/util/sync.go index 3403c6c1..11f52763 100644 --- a/util/sync.go +++ b/util/sync.go @@ -180,7 +180,7 @@ func (obj *EasyExit) Error() error { // instantiated before it can be used. It must not be copied after first use. It // is equivalent to receiving a multicast signal from a closing channel, except // that it must be acknowledged by every reader of the signal, and once this is -// done, it is reset and can be re-used. Readers must obtain a handle to the +// done, it is reset and can be reused. Readers must obtain a handle to the // signal with the Subscribe method, and the signal is sent out with the Done // method. type SubscribedSignal struct { @@ -239,7 +239,7 @@ func (obj *SubscribedSignal) Send() { obj.exit = make(chan struct{}) // reset - // release (re-use the above mutex) + // release (reuse the above mutex) } // BoundedReadSemaphore is a mutex that allows multiple Lock operations to occur