func CheckRules(files ...string) int {
	failed := false

	for _, f := range files {
		if n, errs := checkRules(f); errs != nil {
			fmt.Fprintln(os.Stderr, "  FAILED:")
			for _, e := range errs {
				fmt.Fprintln(os.Stderr, e.Error())
			}
			failed = true
		} else {
			fmt.Printf("  SUCCESS: %d rules found\n", n)
		}
		fmt.Println()
	}
	if failed {
		return 1
	}
	return 0
}
func CheckRules(files ...string) int {
	failed := false

	for _, f := range files {
		if n, errs := checkRules(f); errs != nil {
			fmt.Fprintln(os.Stderr, "  FAILED:")
			for _, e := range errs {
				fmt.Fprintln(os.Stderr, e.Error())
			}
			failed = true
		} else {
			fmt.Printf("  SUCCESS: %d rules found\n", n)
		}
		fmt.Println()
	}
	if failed {
		return 1
	}
	return 0
}
func CheckRules ( files ... string ) int { failed := false for _ , f := range files { if n , errs := checkRules ( f ) ; errs != nil { fmt . Fprintln ( os . Stderr , " " ) for _ , e := range errs { fmt . Fprintln ( os . Stderr , e . Error ( ) ) } failed = true } else { fmt . Printf ( " \n " , n ) } fmt . Println ( ) } if failed { return 1 } return 0 }
// CheckRules validates rule files.
CheckRules validates rule files .