mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ci: fix v test-cleancode
This commit is contained in:
@ -247,7 +247,7 @@ fn (mut vd VDoc) generate_docs_from_file() {
|
||||
exit(1)
|
||||
}
|
||||
dir_path := if cfg.is_vlib {
|
||||
vroot
|
||||
main.vroot
|
||||
} else if os.is_dir(cfg.input_path) {
|
||||
cfg.input_path
|
||||
} else {
|
||||
@ -404,8 +404,8 @@ fn parse_arguments(args []string) Config {
|
||||
}
|
||||
'-f' {
|
||||
format := cmdline.option(current_args, '-f', '')
|
||||
if format !in allowed_formats {
|
||||
allowed_str := allowed_formats.join(', ')
|
||||
if format !in main.allowed_formats {
|
||||
allowed_str := main.allowed_formats.join(', ')
|
||||
eprintln('vdoc: "$format" is not a valid format. Only $allowed_str are allowed.')
|
||||
exit(1)
|
||||
}
|
||||
@ -472,7 +472,7 @@ fn parse_arguments(args []string) Config {
|
||||
if cfg.input_path.trim_right('/') == 'vlib' {
|
||||
cfg.is_vlib = true
|
||||
cfg.is_multi = true
|
||||
cfg.input_path = os.join_path(vroot, 'vlib')
|
||||
cfg.input_path = os.join_path(main.vroot, 'vlib')
|
||||
} else if !is_path {
|
||||
// TODO vd.vprintln('Input "$cfg.input_path" is not a valid path. Looking for modules named "$cfg.input_path"...')
|
||||
mod_path := doc.lookup_module(cfg.input_path) or {
|
||||
@ -486,7 +486,7 @@ fn parse_arguments(args []string) Config {
|
||||
|
||||
fn main() {
|
||||
if os.args.len < 2 || '-h' in os.args || '--help' in os.args || os.args[1..] == ['doc', 'help'] {
|
||||
os.system('$vexe help doc')
|
||||
os.system('$main.vexe help doc')
|
||||
exit(0)
|
||||
}
|
||||
args := os.args[2..].clone()
|
||||
|
Reference in New Issue
Block a user