mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 02:38:35 +00:00
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 <yoan@dosimple.ch>
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
<div class="{{TabSizeClass .Editorconfig .FileName}} non-diff-file-content">
|
||||
{{- if .FileError}}
|
||||
<div class="ui error message">
|
||||
<div class="text left gt-whitespace-pre">{{.FileError}}</div>
|
||||
</div>
|
||||
{{end}}
|
||||
{{- if .FileWarning}}
|
||||
<div class="ui warning message">
|
||||
<div class="text left">
|
||||
<div>{{.FileError}}</div>
|
||||
</div>
|
||||
<div class="text left gt-whitespace-pre">{{.FileWarning}}</div>
|
||||
</div>
|
||||
{{end}}
|
||||
<h4 class="file-header ui top attached header gt-df gt-ac gt-sb gt-fw">
|
||||
|
Reference in New Issue
Block a user