From b90c59d90c71e9b28b90e37e08d04c10f4c1ae0d Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sat, 30 Apr 2022 16:09:11 +0300 Subject: [PATCH] tools: support `v missdoc .` instead of `v run cmd/tools/missdoc.v .` --- cmd/tools/{missdoc.v => vmissdoc.v} | 4 ++-- cmd/v/help/missdoc.txt | 16 ++++++++++++++++ cmd/v/v.v | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) rename cmd/tools/{missdoc.v => vmissdoc.v} (98%) create mode 100644 cmd/v/help/missdoc.txt diff --git a/cmd/tools/missdoc.v b/cmd/tools/vmissdoc.v similarity index 98% rename from cmd/tools/missdoc.v rename to cmd/tools/vmissdoc.v index 136d5e5b0b..56417cc1bd 100644 --- a/cmd/tools/missdoc.v +++ b/cmd/tools/vmissdoc.v @@ -5,8 +5,8 @@ import os import flag const ( - tool_name = os.file_name(os.executable()) - tool_version = '0.0.3' + tool_name = 'v missdoc' + tool_version = '0.0.4' tool_description = 'Prints all V functions in .v files under PATH/, that do not yet have documentation comments.' work_dir_prefix = normalise_path(os.real_path(os.wd_at_startup) + '/') ) diff --git a/cmd/v/help/missdoc.txt b/cmd/v/help/missdoc.txt new file mode 100644 index 0000000000..ef90ee899f --- /dev/null +++ b/cmd/v/help/missdoc.txt @@ -0,0 +1,16 @@ +v missdoc 0.0.4 +----------------------------------------------- +Usage: v missdoc [options] PATH [PATH]... + +Description: Prints all V functions in .v files under PATH/, that do not yet have documentation comments. + +Options: + -h, --help Show this help text. + -t, --tags Also print function tags if any is found. + -d, --deprecated Include deprecated functions in output. + -p, --private Include private functions in output. + --js Include JavaScript functions in output. + -n, --no-line-numbers Exclude line numbers in output. + -e, --exclude + + -r, --relative-paths Use relative paths in output. diff --git a/cmd/v/v.v b/cmd/v/v.v index 5e31dece63..c201516222 100644 --- a/cmd/v/v.v +++ b/cmd/v/v.v @@ -28,6 +28,7 @@ const ( 'doctor', 'fmt', 'gret', + 'missdoc', 'repl', 'self', 'setup-freetype',