1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

tools: improve deprecation detection in missdoc.v (#13960)

This commit is contained in:
Larpon 2022-04-07 11:20:14 +02:00 committed by GitHub
parent e7fd8c4e7c
commit d34ef69229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,14 @@ fn (opt &Options) report_undocumented_functions_in_file(nfile string) {
if opt.deprecated {
println('$ofile:$line_numbers$undocumented_fn.signature $tags_str')
} else {
if 'deprecated' !in undocumented_fn.tags {
mut has_deprecation_tag := false
for tag in undocumented_fn.tags {
if tag.starts_with('deprecated') {
has_deprecation_tag = true
break
}
}
if !has_deprecation_tag {
println('$ofile:$line_numbers$undocumented_fn.signature $tags_str')
}
}