From 6e42220bb03724789c27efdaac35cca2d08a1a02 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Mon, 3 Nov 2025 17:54:34 -0600 Subject: renumber must exit like reformat or things don't work --- doProto.go | 2 +- main.go | 10 +++++----- protoReformat.go | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doProto.go b/doProto.go index b2a2148..4e87dc0 100644 --- a/doProto.go +++ b/doProto.go @@ -44,7 +44,7 @@ func doProto(argvProto string) (string, error) { return "doClean() ran", nil } - if argv.ReFormat { + if argv.ReFormat || argv.Renumber { protoReformatComments(argvProto) // time.Sleep(5 * time.Second) protoReformat(argvProto) diff --git a/main.go b/main.go index ea542e3..ae82e55 100644 --- a/main.go +++ b/main.go @@ -58,11 +58,11 @@ func main() { } else { // user is trying a specific proto file // check if it's ok to run autogenpb - s, err = doPrecheck(argv.Proto) - if err == nil { - // it's safe to run - s, err = doProto(argv.Proto) - } + // s, err = doPrecheck(argv.Proto) + // if err == nil { + // it's safe to run + s, err = doProto(argv.Proto) + // } } // safe exits back to your shell (with timing and toolkit close) diff --git a/protoReformat.go b/protoReformat.go index 77cc723..188bf66 100644 --- a/protoReformat.go +++ b/protoReformat.go @@ -576,8 +576,8 @@ func (msg *FormatMsg) formatVarLine(line string, dbg string) string { } msg.Counter += 1 if int(msg.Counter) != newint { + log.Info("COUNTER WAS WRONG", newint, id, vartype, varname, msg.Header) // panic("you can't count") - log.Info("counter is wrong", newint, id, msg.Header) } id = fmt.Sprintf("%d", msg.Counter) } -- cgit v1.2.3