aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/tetafro/godot
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2023-12-05 15:10:03 +0100
committerTaras Madan <tarasmadan@google.com>2023-12-06 11:31:44 +0000
commit2ab72b4feef2c97f22f90cfbf9e45a6cfcd08bda (patch)
treea6d19b94b6399fcc00a6cfa430885cd349dd1533 /vendor/github.com/tetafro/godot
parente08e8f492d31d672cc245944c185f8aadf2ee695 (diff)
vendor: updates
Diffstat (limited to 'vendor/github.com/tetafro/godot')
-rw-r--r--vendor/github.com/tetafro/godot/README.md2
-rw-r--r--vendor/github.com/tetafro/godot/checks.go3
-rw-r--r--vendor/github.com/tetafro/godot/getters.go6
-rw-r--r--vendor/github.com/tetafro/godot/godot.go2
4 files changed, 8 insertions, 5 deletions
diff --git a/vendor/github.com/tetafro/godot/README.md b/vendor/github.com/tetafro/godot/README.md
index e8d85fb0a..6b2e530b9 100644
--- a/vendor/github.com/tetafro/godot/README.md
+++ b/vendor/github.com/tetafro/godot/README.md
@@ -21,7 +21,7 @@ end of the last sentence if needed.
Build from source
```sh
-go get -u github.com/tetafro/godot/cmd/godot
+go install github.com/tetafro/godot/cmd/godot@latest
```
or download binary from [releases page](https://github.com/tetafro/godot/releases).
diff --git a/vendor/github.com/tetafro/godot/checks.go b/vendor/github.com/tetafro/godot/checks.go
index cba54f310..f5471cdf7 100644
--- a/vendor/github.com/tetafro/godot/checks.go
+++ b/vendor/github.com/tetafro/godot/checks.go
@@ -240,6 +240,9 @@ func isSpecialBlock(comment string) bool {
strings.Contains(comment, "#define")) {
return true
}
+ if strings.HasPrefix(comment, "// Output: ") {
+ return true
+ }
return false
}
diff --git a/vendor/github.com/tetafro/godot/getters.go b/vendor/github.com/tetafro/godot/getters.go
index 8adcc46ae..1a47c824f 100644
--- a/vendor/github.com/tetafro/godot/getters.go
+++ b/vendor/github.com/tetafro/godot/getters.go
@@ -200,10 +200,10 @@ func (pf *parsedFile) getAllComments(exclude []*regexp.Regexp) []comment {
return comments
}
-// getText extracts text from comment. If comment is a special block
+// getText extracts text from comment. If the comment is a special block
// (e.g., CGO code), a block of empty lines is returned. If comment contains
// special lines (e.g., tags or indented code examples), they are replaced
-// with `specialReplacer` to skip checks for it.
+// with `specialReplacer` to skip checks for them.
// The result can be multiline.
func getText(comment *ast.CommentGroup, exclude []*regexp.Regexp) (s string) {
if len(comment.List) == 1 &&
@@ -241,7 +241,7 @@ func getText(comment *ast.CommentGroup, exclude []*regexp.Regexp) (s string) {
return s[:len(s)-1] // trim last "\n"
}
-// readFile reads file and returns it's lines as strings.
+// readFile reads file and returns its lines as strings.
func readFile(file *ast.File, fset *token.FileSet) ([]string, error) {
fname := fset.File(file.Package)
f, err := os.ReadFile(fname.Name())
diff --git a/vendor/github.com/tetafro/godot/godot.go b/vendor/github.com/tetafro/godot/godot.go
index 19a652fba..df9271296 100644
--- a/vendor/github.com/tetafro/godot/godot.go
+++ b/vendor/github.com/tetafro/godot/godot.go
@@ -101,7 +101,7 @@ func Fix(path string, file *ast.File, fset *token.FileSet, settings Settings) ([
return fixed, nil
}
-// Replace rewrites original file with it's fixed version.
+// Replace rewrites original file with its fixed version.
func Replace(path string, file *ast.File, fset *token.FileSet, settings Settings) error {
info, err := os.Stat(path)
if err != nil {