From d34ef69229e10af41593a528cbf2399472d77d5d Mon Sep 17 00:00:00 2001 From: Larpon Date: Thu, 7 Apr 2022 11:20:14 +0200 Subject: [PATCH] tools: improve deprecation detection in missdoc.v (#13960) --- cmd/tools/missdoc.v | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/cmd/tools/missdoc.v b/cmd/tools/missdoc.v index 51f8ac6354..136d5e5b0b 100644 --- a/cmd/tools/missdoc.v +++ b/cmd/tools/missdoc.v @@ -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') } }