Skip to content

Commit d34ef69

Browse files
authored
tools: improve deprecation detection in missdoc.v (#13960)
1 parent e7fd8c4 commit d34ef69

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

cmd/tools/missdoc.v

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,14 @@ fn (opt &Options) report_undocumented_functions_in_file(nfile string) {
103103
if opt.deprecated {
104104
println('$ofile:$line_numbers$undocumented_fn.signature $tags_str')
105105
} else {
106-
if 'deprecated' !in undocumented_fn.tags {
106+
mut has_deprecation_tag := false
107+
for tag in undocumented_fn.tags {
108+
if tag.starts_with('deprecated') {
109+
has_deprecation_tag = true
110+
break
111+
}
112+
}
113+
if !has_deprecation_tag {
107114
println('$ofile:$line_numbers$undocumented_fn.signature $tags_str')
108115
}
109116
}

0 commit comments

Comments
 (0)