mirror of
https://github.com/rwinkhart/go-highlite.git
synced 2026-09-05 16:37:20 -04:00
- Add du lexer
- Print problematic YAML filename when error is detected
This commit is contained in:
+2
-2
@@ -73,12 +73,12 @@ func ParseSyntaxFiles(dir string, defs *[]*Def) (error, []string) {
|
||||
for _, file_path := range files {
|
||||
file, err := ioutil.ReadFile(file_path)
|
||||
if err != nil {
|
||||
warnings = append(warnings, err.Error())
|
||||
warnings = append(warnings, file_path+": "+err.Error())
|
||||
} else {
|
||||
if len(file) > 0 {
|
||||
d, err := ParseDef(file)
|
||||
if err != nil {
|
||||
warnings = append(warnings, err.Error())
|
||||
warnings = append(warnings, file_path+": "+err.Error())
|
||||
} else {
|
||||
*defs = append(*defs, d)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user