From fd43f0ff7b8eb6879cac7e3685f97e77aba88704 Mon Sep 17 00:00:00 2001 From: John Kerl Date: Wed, 3 Mar 2021 21:03:05 -0500 Subject: [PATCH] move uninitialized-variable warnings from stdout to stderr --- go/src/dsl/cst/warn.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/src/dsl/cst/warn.go b/go/src/dsl/cst/warn.go index b1da30f4a..3a8655e29 100644 --- a/go/src/dsl/cst/warn.go +++ b/go/src/dsl/cst/warn.go @@ -9,6 +9,7 @@ package cst import ( "fmt" + "os" "miller/src/dsl" "miller/src/lib" @@ -106,7 +107,8 @@ func warnOnASTAux( // -- not thousands of lines of Miller-DSL source code -- so // people can look at their few lines of Miller-DSL code and // spot their error. - fmt.Printf( + fmt.Fprintf( + os.Stderr, "Variable name %s might not have been assigned yet.\n", variableName, )