Skip to content

Commit

Permalink
chore: remove duplicate word in comments
Browse files Browse the repository at this point in the history
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
Change-Id: I44110b67882b1f1e525904e4b264018f7613ea00
  • Loading branch information
Abirdcfly committed Aug 30, 2022
1 parent ac11215 commit 86a2425
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cue/ast/ast.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ type StructLit struct {
// NewStruct creates a struct from the given fields.
//
// A field is either a *Field, an *Elipsis, *LetClause, a *CommentGroup, or a
// Label, optionally followed by a a token.OPTION to indicate the field is
// Label, optionally followed by a token.OPTION to indicate the field is
// optional, optionally followed by a token.ISA to indicate the field is a
// definition followed by an expression for the field value.
//
Expand Down
2 changes: 1 addition & 1 deletion cue/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (p *parser) consumeCommentGroup(prevLine, n int) (comments *ast.CommentGrou

// Advance to the next non-comment In the process, collect
// any comment groups encountered, and refield the last lead and
// and line comments.
// line comments.
//
// A lead comment is a comment group that starts and ends in a
// line without any other tokens and that is followed by a non-comment
Expand Down
2 changes: 1 addition & 1 deletion cue/testdata/references/errors.txtar
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ missingFieldNestedInInterpolation: {
// Must refer to `b` in error
r1: "\(a.b.c)"
// Must refer to `d` in error: in case only one error is shown for a
// a location, ensure it doesn't alphabetically sort and pick `c` instead.
// location, ensure it doesn't alphabetically sort and pick `c` instead.
r2: "\(a.d.c)"
}
-- out/eval --
Expand Down
2 changes: 1 addition & 1 deletion encoding/jsonschema/constraints.go
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ var constraints = []*constraint{
state.doc(f)
f.Optional = token.Blank.Pos()
if len(obj.Elts) > 0 && len(f.Comments()) > 0 {
// TODO: change formatter such that either a a NewSection on the
// TODO: change formatter such that either a NewSection on the
// field or doc comment will cause a new section.
ast.SetRelPos(f.Comments()[0], token.NewSection)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/core/adt/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func (c *OpContext) Validate(check Validator, value Value) *Bottom {
return err
}

// yield evaluates a Comprehension within the given Environment and and calls
// yield evaluates a Comprehension within the given Environment and calls
// f for each result.
func (c *OpContext) yield(
node *Vertex, // errors are associated with this node
Expand Down
4 changes: 2 additions & 2 deletions internal/core/adt/eval.go
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ func (c *OpContext) Unify(v *Vertex, state VertexStatus) {

// TODO: use a more principled form of dereferencing. For instance,
// disjuncts could already be assumed to be the given Vertex, and
// the the main vertex could be dereferenced during evaluation.
// the main vertex could be dereferenced during evaluation.
for _, a := range d.Arcs {
for _, x := range a.Conjuncts {
// All the environments for embedded structs need to be
Expand Down Expand Up @@ -1953,7 +1953,7 @@ func (n *nodeContext) expandOne() (done bool) {
for _, x := range exprs {
n.addExprConjunct(x.c)

// collect and and or
// collect and or
}
if len(n.exprs) < len(exprs) {
return true
Expand Down
4 changes: 2 additions & 2 deletions pkg/strings/manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func Runes(s string) []rune {
}

// MinRunes reports whether the number of runes (Unicode codepoints) in a string
// is at least a certain minimum. MinRunes can be used a a field constraint to
// is at least a certain minimum. MinRunes can be used a field constraint to
// except all strings for which this property holds.
func MinRunes(s string, min int) bool {
// TODO: CUE strings cannot be invalid UTF-8. In case this changes, we need
Expand All @@ -64,7 +64,7 @@ func MinRunes(s string, min int) bool {
}

// MaxRunes reports whether the number of runes (Unicode codepoints) in a string
// exceeds a certain maximum. MaxRunes can be used a a field constraint to
// exceeds a certain maximum. MaxRunes can be used a field constraint to
// except all strings for which this property holds
func MaxRunes(s string, max int) bool {
// See comment in MinRunes implementation.
Expand Down

0 comments on commit 86a2425

Please sign in to comment.