aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/tetafro
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-11-11 11:41:38 +0100
committerTaras Madan <tarasmadan@google.com>2024-11-11 11:10:48 +0000
commit27e76fae2ee2d84dc7db63af1d9ed7358ba35b7a (patch)
treeed19c0e35e272b3c4cc5a2f2c595e035b2428337 /vendor/github.com/tetafro
parent621e84e063b0e15b23e17780338627c509e1b9e8 (diff)
vendor: update
Diffstat (limited to 'vendor/github.com/tetafro')
-rw-r--r--vendor/github.com/tetafro/godot/checks.go2
-rw-r--r--vendor/github.com/tetafro/godot/getters.go6
2 files changed, 3 insertions, 5 deletions
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 ""
}