From 9b416b2e36a035672226d4b83c6b7e87578b17fe Mon Sep 17 00:00:00 2001 From: Yoan Blanc Date: Thu, 6 Apr 2023 22:01:20 +0200 Subject: Use graceful editorconfig loader to reduce errors when loading malformed editorconfigs (#21257) The _graceful_ should fail less when the `.editorconfig` file isn't properly written, e.g. boolean values from YAML or unparseable numbers (when a number is expected). As is... information is lost as the _warning_ (a go-multierror.Error) is ignored. If anybody knows how to send them to the UI as warning; any help is appreciated. Closes #20694 Signed-off-by: Yoan Blanc --- templates/repo/view_file.tmpl | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'templates') diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 70d33621c6..36b50e0c7f 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -1,9 +1,12 @@
{{- if .FileError}} +
+
{{.FileError}}
+
+ {{end}} + {{- if .FileWarning}}
-
-
{{.FileError}}
-
+
{{.FileWarning}}
{{end}}

-- cgit v1.2.3