Skip to content

Commit 506a0e8

Browse files
committed
all: don't use XXX strings unnecessarily
None of these were "XXX" comments in the sense that the code cannot be in master, as described in #1959. Use more realistic examples, other characters like NNN, or Foo... rather than FooXXX when we mean any object with that prefix. For #1959. Signed-off-by: Daniel Martí <[email protected]> Change-Id: Iece6ccbed29223ed44911f8fd1ecc622a6d443fc Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1193723 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Paul Jolly <[email protected]>
1 parent 53d5ab3 commit 506a0e8

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ If you see something like...
800800
remote: Processing changes: refs: 1, done
801801
remote:
802802
remote: ERROR: In commit ab13517fa29487dcf8b0d48916c51639426c5ee9
803-
remote: ERROR: author email address XXXXXXXXXXXXXXXXXXX
803+
remote: ERROR: author email address [email protected]
804804
remote: ERROR: does not match your user account.
805805
```
806806

cue/ast/astutil/sanitize.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ func (z *sanitizer) handleIdent(s *scope, n *ast.Ident) bool {
317317
}
318318

319319
// uniqueName returns a new name globally unique name of the form
320-
// base_XX ... base_XXXXXXXXXXXXXX or _base or the same pattern with a '_'
320+
// base_NN ... base_NNNNNNNNNNNNNN or _base or the same pattern with a '_'
321321
// prefix if hidden is true.
322322
//
323323
// It prefers short extensions over large ones, while ensuring the likelihood of

cue/format/format_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ func TestNodes(t *testing.T) {
281281

282282
}
283283

284-
// Verify that the printer doesn't crash if the AST contains BadXXX nodes.
284+
// Verify that the printer doesn't crash if the AST contains Bad... nodes.
285285
func TestBadNodes(t *testing.T) {
286286
const src = "package p\n("
287287
const res = "package p\n\n(_|_)\n"

cue/parser/parser.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ type parser struct {
5252
lit string // token literal
5353

5454
// Error recovery
55-
// (used to limit the number of calls to syncXXX functions
55+
// (used to limit the number of calls to sync... functions
5656
// w/o making scanning progress - avoids potential endless
5757
// loops across multiple parser functions during error recovery)
5858
syncPos token.Pos // last synchronization position
59-
syncCnt int // number of calls to syncXXX without progress
59+
syncCnt int // number of calls to sync... functions without progress
6060

6161
// Non-syntactic parser control
6262
exprLev int // < 0: in control clause, >= 0: in expression

internal/core/adt/states.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const (
126126
// This is a signal condition that is reached when:
127127
// - a node is set to a concrete scalar value
128128
// - a node is set to an error
129-
// - or if XXXstate is reached.
129+
// - or if ...state is reached.
130130
//
131131
// TODO: rename to something better?
132132
scalarKnown

internal/core/export/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ func (e *exporter) makeFeature(s string) (f adt.Feature, ok bool) {
636636

637637
// uniqueFeature returns a name for an identifier that uniquely identifies
638638
// the given expression. If the preferred name is already taken, a new globally
639-
// unique name of the form base_X ... base_XXXXXXXXXXXXXX is generated.
639+
// unique name of the form base_N ... base_NNNNNNNNNNNNNN is generated.
640640
//
641641
// It prefers short extensions over large ones, while ensuring the likelihood of
642642
// fast termination is high. There are at least two digits to make it visually

0 commit comments

Comments
 (0)