mirror of
https://github.com/zyedidia/micro
synced 2024-09-29 20:54:50 +00:00
Ignore tool files
This commit is contained in:
parent
3a97ce820c
commit
fe3186ba9d
|
@ -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'
|
||||
}
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -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!")
|
||||
}
|
||||
}
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
//+build ignore
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
|
|
Loading…
Reference in a new issue