this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

all: fix a few minor typos spotted by gospel

I skimmed its output and picked the lowest hanging fruit.
See https://github.com/kortschak/gospel.

Change-Id: Id2af07ad85ec40c9a248f27d7813ad1142cedc77
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/536357
Unity-Result: CUEcueckoo <cueckoo@cuelang.org>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Reviewed-by: Roger Peppe <rogpeppe@gmail.com>

+18 -18
+1 -1
cmd/cue/cmd/get_go.go
··· 795 795 panic(fmt.Errorf("failed to parse %v: %v", sv, err)) 796 796 } 797 797 798 - // Use orignal Go value if compatible with CUE (octal is okay) 798 + // Use the original Go value if compatible with CUE (octal is okay) 799 799 if b, ok := cv.(*cueast.BasicLit); ok { 800 800 if b.Kind == cuetoken.INT && val != "" && val[0] != '\'' { 801 801 b.Value = val
+1 -1
cmd/cue/cmd/import.go
··· 551 551 return false 552 552 } 553 553 554 - // found a replacable string 554 + // found a replaceable string 555 555 dataField := h.uniqueName(name, "_", "cue_") 556 556 557 557 f.Value = ast.NewCall(
+1 -1
cue/ast/astutil/resolve.go
··· 307 307 // references to bind to these illegally. 308 308 // We need this kind of administration anyway to detect 309 309 // illegal name clashes, and it allows giving better error 310 - // messages. This puts the burdon on clients of this library 310 + // messages. This puts the burden on clients of this library 311 311 // to detect illegal usage, though. 312 312 name, err := ast.ParseIdent(a.Ident) 313 313 if err == nil {
+1 -1
cue/types.go
··· 2096 2096 } 2097 2097 } 2098 2098 2099 - // DisallowCycles forces validation in the precense of cycles, even if 2099 + // DisallowCycles forces validation in the presence of cycles, even if 2100 2100 // non-concrete values are allowed. This is implied by Concrete(true). 2101 2101 func DisallowCycles(disallow bool) Option { 2102 2102 return func(p *options) { p.disallowCycles = disallow }
+1 -1
encoding/gocode/generator.go
··· 79 79 // 80 80 // Generate will not generate any code for fields that have no go attribute 81 81 // and that are not exported or for which there is no namesake Go type. 82 - // If the go attribute has the special value '-' as its name it wil be dropped 82 + // If the go attribute has the special value '-' as its name it will be dropped 83 83 // as well. In all other cases Generate will generate Go code, even if the 84 84 // resulting code will not compile. For instance, Generate will generate Go 85 85 // code even if the user defines a Go type in the attribute that does not
+1 -1
encoding/openapi/build.go
··· 469 469 470 470 if op == cue.NoOp && len(args) == 1 { 471 471 // TODO: this is to deal with default value removal. This may change 472 - // whe we completely separate default values from values. 472 + // when we completely separate default values from values. 473 473 a = append(a, args...) 474 474 } else if op != splitBy { 475 475 a = append(a, v)
+3 -3
internal/core/adt/eval.go
··· 610 610 // 611 611 // In practice this should not be a problem: when disjuncts originate 612 612 // from the same disjunct, they will have the same StructInfos, and thus 613 - // Equal is able to equate them even in the precense of optional field. 613 + // Equal is able to equate them even in the presence of optional field. 614 614 // In general, combining any limited set of disjuncts will soon reach 615 615 // a fixed point where duplicate elements can be eliminated this way. 616 616 // ··· 1757 1757 n.updateCyclicStatus(env) // to handle empty structs. 1758 1758 1759 1759 // NOTE: This is a crucial point in the code: 1760 - // Unification derferencing happens here. The child nodes are set to 1760 + // Unification dereferencing happens here. The child nodes are set to 1761 1761 // an Environment linked to the current node. Together with the De Bruijn 1762 1762 // indices, this determines to which Vertex a reference resolves. 1763 1763 ··· 1811 1811 n.addExprConjunct(MakeConjunct(childEnv, x, id)) 1812 1812 1813 1813 case *OptionalField, *BulkOptionalField, *Ellipsis: 1814 - // Nothing to do here. Note that the precense of these fields do not 1814 + // Nothing to do here. Note that the presence of these fields do not 1815 1815 // excluded embedded scalars: only when they match actual fields 1816 1816 // does it exclude those. 1817 1817
+1 -1
internal/core/adt/expr.go
··· 508 508 // evaluation strategy that makes nodes increasingly more specific. 509 509 // 510 510 // For instance, a completely different implementation would be to allow 511 - // the precense of a concrete value to ignore incomplete errors. 511 + // the presence of a concrete value to ignore incomplete errors. 512 512 // 513 513 // TODO: consider an alternative approach. 514 514 switch y := v.(type) {
+1 -1
pkg/doc.go
··· 29 29 // - no querying of the file system of any kind 30 30 // - no communication on the network 31 31 // - no information about the type of environment 32 - // - only reproduceable random generators 32 + // - only reproducible random generators 33 33 // 34 34 // Hermetic configurations allow for fast and advanced analysis that otherwise 35 35 // would not be possible or practical. The cue "cmd" command can be used to mix
+2 -2
pkg/list/list.go
··· 50 50 // extensions are introduced, which may provide flatten functionality 51 51 // natively. 52 52 // 53 - // // Flatten reports a flattend sequence of the list xs by expanding any elements 53 + // // Flatten reports a flattened sequence of the list xs by expanding any elements 54 54 // // that are lists. 55 55 // // 56 56 // // For instance: ··· 86 86 // return flatten(xs) 87 87 // } 88 88 89 - // FlattenN reports a flattend sequence of the list xs by expanding any elements 89 + // FlattenN reports a flattened sequence of the list xs by expanding any elements 90 90 // depth levels deep. If depth is negative all elements are expanded. 91 91 // 92 92 // For instance:
+1 -1
pkg/tool/cli/cli.cue
··· 27 27 // Example: 28 28 // task: ask: cli.Ask({ 29 29 // prompt: "Are you okay?" 30 - // repsonse: bool 30 + // response: bool 31 31 // }) 32 32 Ask: { 33 33 $id: "tool/cli.Ask"
+1 -1
pkg/tool/cli/doc.go
··· 17 17 // // Example: 18 18 // // task: ask: cli.Ask({ 19 19 // // prompt: "Are you okay?" 20 - // // repsonse: bool 20 + // // response: bool 21 21 // // }) 22 22 // Ask: { 23 23 // $id: "tool/cli.Ask"
+1 -1
pkg/tool/doc.go
··· 1 1 // Code generated by cue get go. DO NOT EDIT. 2 2 3 - // Package tool defines statefull operation types for cue commands. 3 + // Package tool defines stateful operation types for cue commands. 4 4 // 5 5 // This package is only visible in cue files with a _tool.cue or _tool_test.cue 6 6 // ending.
+1 -1
pkg/tool/gen.go
··· 29 29 30 30 const msg = `// Code generated by cue get go. DO NOT EDIT. 31 31 32 - // Package tool defines statefull operation types for cue commands. 32 + // Package tool defines stateful operation types for cue commands. 33 33 // 34 34 // This package is only visible in cue files with a _tool.cue or _tool_test.cue 35 35 // ending.
+1 -1
tools/flow/flow.go
··· 270 270 // Terminated 271 271 // 272 272 // A Task may move from Waiting to Terminating if one of 273 - // the tasks on which it dependends fails. 273 + // the tasks on which it depends fails. 274 274 // 275 275 // NOTE: transitions from Running to Waiting are currently not supported. In 276 276 // the future this may be possible if a task depends on continuously running