From fe3186ba9dba176fd3f8a5513c16a1895d62bc2b Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Sat, 21 Aug 2021 18:07:43 -0400 Subject: [PATCH] Ignore tool files --- cmd/micro/clean.go | 2 +- runtime/syntax/make_headers.go | 2 ++ runtime/syntax/syntax_checker.go | 38 ------------------------------ runtime/syntax/syntax_converter.go | 2 ++ tools/build-date.go | 2 ++ tools/build-version.go | 2 ++ tools/info-plist.go | 2 ++ tools/remove-nightly-assets.go | 2 ++ tools/testgen.go | 2 ++ 9 files changed, 15 insertions(+), 39 deletions(-) delete mode 100644 runtime/syntax/syntax_checker.go diff --git a/cmd/micro/clean.go b/cmd/micro/clean.go index 7dfd2c7a..e4aa7240 100644 --- a/cmd/micro/clean.go +++ b/cmd/micro/clean.go @@ -23,7 +23,7 @@ func shouldContinue() bool { return false } - text = strings.TrimRight(text, "\r\n") + text = strings.TrimRight(text, "\r\n") return len(text) == 0 || strings.ToLower(text)[0] == 'y' } diff --git a/runtime/syntax/make_headers.go b/runtime/syntax/make_headers.go index 4717a32b..e04d8062 100644 --- a/runtime/syntax/make_headers.go +++ b/runtime/syntax/make_headers.go @@ -1,3 +1,5 @@ +//+build ignore + package main import ( diff --git a/runtime/syntax/syntax_checker.go b/runtime/syntax/syntax_checker.go deleted file mode 100644 index 5b8da244..00000000 --- a/runtime/syntax/syntax_checker.go +++ /dev/null @@ -1,38 +0,0 @@ -package main - -import ( - "fmt" - "io/ioutil" - "strings" - - "github.com/zyedidia/highlight" -) - -func main() { - files, _ := ioutil.ReadDir(".") - - hadErr := false - for _, f := range files { - if strings.HasSuffix(f.Name(), ".yaml") { - input, _ := ioutil.ReadFile(f.Name()) - //fmt.Println("Checking file -> ", f.Name()) - file, err := highlight.ParseFile(input) - if err != nil { - hadErr = true - fmt.Printf("Could not parse file -> %s:\n", f.Name()) - fmt.Println(err) - continue - } - _, err1 := highlight.ParseDef(file, nil) - if err1 != nil { - hadErr = true - fmt.Printf("Could not parse input file using highlight.ParseDef(%s):\n", f.Name()) - fmt.Println(err1) - continue - } - } - } - if !hadErr { - fmt.Println("No issues found!") - } -} diff --git a/runtime/syntax/syntax_converter.go b/runtime/syntax/syntax_converter.go index 037a4bd4..d2954e3a 100644 --- a/runtime/syntax/syntax_converter.go +++ b/runtime/syntax/syntax_converter.go @@ -1,3 +1,5 @@ +//+build ignore + package main import ( diff --git a/tools/build-date.go b/tools/build-date.go index 427ef1b1..48174c1b 100644 --- a/tools/build-date.go +++ b/tools/build-date.go @@ -1,3 +1,5 @@ +//+build ignore + package main import ( diff --git a/tools/build-version.go b/tools/build-version.go index 8aaffa3d..8194fba6 100644 --- a/tools/build-version.go +++ b/tools/build-version.go @@ -1,3 +1,5 @@ +//+build ignore + package main import ( diff --git a/tools/info-plist.go b/tools/info-plist.go index 231901aa..b2beee78 100644 --- a/tools/info-plist.go +++ b/tools/info-plist.go @@ -1,3 +1,5 @@ +//+build ignore + package main import ( diff --git a/tools/remove-nightly-assets.go b/tools/remove-nightly-assets.go index 0d7fb48e..9367408c 100644 --- a/tools/remove-nightly-assets.go +++ b/tools/remove-nightly-assets.go @@ -1,3 +1,5 @@ +//+build ignore + package main import ( diff --git a/tools/testgen.go b/tools/testgen.go index 2465ae0a..f110202f 100644 --- a/tools/testgen.go +++ b/tools/testgen.go @@ -1,3 +1,5 @@ +//+build ignore + package main import (