From 27e76fae2ee2d84dc7db63af1d9ed7358ba35b7a Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Mon, 11 Nov 2024 11:41:38 +0100 Subject: vendor: update --- vendor/github.com/tetafro/godot/checks.go | 2 ++ vendor/github.com/tetafro/godot/getters.go | 6 +----- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/tetafro') diff --git a/vendor/github.com/tetafro/godot/checks.go b/vendor/github.com/tetafro/godot/checks.go index df5019f6c..d30766358 100644 --- a/vendor/github.com/tetafro/godot/checks.go +++ b/vendor/github.com/tetafro/godot/checks.go @@ -230,6 +230,8 @@ func isSpecialBlock(comment string) bool { strings.Contains(comment, "#define")) { return true } + // This should only be skipped in test files, but we don't have this + // information here, so - always skip if strings.HasPrefix(comment, "// Output:") || strings.HasPrefix(comment, "// Unordered output:") { return true diff --git a/vendor/github.com/tetafro/godot/getters.go b/vendor/github.com/tetafro/godot/getters.go index 7d3d22fb1..de3d06e10 100644 --- a/vendor/github.com/tetafro/godot/getters.go +++ b/vendor/github.com/tetafro/godot/getters.go @@ -209,12 +209,8 @@ func (pf *parsedFile) getAllComments(exclude []*regexp.Regexp) []comment { // special lines (e.g., tags or indented code examples), they are replaced // with `specialReplacer` to skip checks for them. // The result can be multiline. -// -//nolint:cyclop func getText(comment *ast.CommentGroup, exclude []*regexp.Regexp) (s string) { - if len(comment.List) == 1 && - strings.HasPrefix(comment.List[0].Text, "/*") && - isSpecialBlock(comment.List[0].Text) { + if len(comment.List) > 0 && isSpecialBlock(comment.List[0].Text) { return "" } -- cgit mrf-deployment