From 2332c17beacbf99a9dd11745e7b6820a23710ed7 Mon Sep 17 00:00:00 2001 From: Turiiya <34311583+ttytm@users.noreply.github.com> Date: Wed, 11 Oct 2023 02:16:59 +0200 Subject: [PATCH] tools: fix typos (#19546) --- cmd/tools/gen_vc.v | 4 ++-- cmd/tools/git_pre_commit_hook.vsh | 14 +++++++------- cmd/tools/modules/testing/common.v | 2 +- cmd/tools/repeat.v | 6 +++--- cmd/tools/vast/test/demo.v | 2 +- cmd/tools/vbug.v | 2 +- cmd/tools/vcheck-md.v | 14 +++++++------- cmd/tools/vgret.defaults.toml | 16 ++++++++-------- cmd/tools/vpm.v | 2 +- cmd/tools/vshader.v | 2 +- cmd/tools/vtest-all.v | 2 +- cmd/tools/vvet/tests/no_warn_about_missing.vv | 2 +- cmd/tools/vwhere/finder.v | 6 +++--- cmd/tools/vwhere/test/file_two.v | 2 +- 14 files changed, 38 insertions(+), 38 deletions(-) diff --git a/cmd/tools/gen_vc.v b/cmd/tools/gen_vc.v index d3ccbb579a..dfc31e8dfc 100644 --- a/cmd/tools/gen_vc.v +++ b/cmd/tools/gen_vc.v @@ -207,7 +207,7 @@ fn (mut gen_vc GenVC) generate() { if !os.is_dir(gen_vc.options.work_dir) { // try create os.mkdir(gen_vc.options.work_dir) or { panic(err) } - // still dosen't exist... we have a problem + // still doesn't exist... we have a problem if !os.is_dir(gen_vc.options.work_dir) { gen_vc.logger.error('error creating directory: ${gen_vc.options.work_dir}') gen_vc.gen_error = true @@ -219,7 +219,7 @@ fn (mut gen_vc GenVC) generate() { // if we are not running with the --serve flag (webhook server) // rather than deleting and re-downloading the repo each time // first check to see if the local v repo is behind master - // if it isn't behind theres no point continuing further + // if it isn't behind there's no point continuing further if !gen_vc.options.serve && os.is_dir(git_repo_dir_v) { gen_vc.cmd_exec('git -C ${git_repo_dir_v} checkout master') // fetch the remote repo just in case there are newer commits there diff --git a/cmd/tools/git_pre_commit_hook.vsh b/cmd/tools/git_pre_commit_hook.vsh index cf54adacbe..f9f2b7ef78 100755 --- a/cmd/tools/git_pre_commit_hook.vsh +++ b/cmd/tools/git_pre_commit_hook.vsh @@ -3,8 +3,8 @@ import os import term -// This script can be used to ensure that all commited V files are vfmt-ed automatically. -// By default, once setup, it will run `v fmt -w` on them, before commiting them. +// This script can be used to ensure that all committed V files are vfmt-ed automatically. +// By default, once setup, it will run `v fmt -w` on them, before committing them. // To use the script in your V project, you need to be in the main folder // of your project, then do the equivalent of: @@ -15,8 +15,8 @@ import term // // Note: you can use this command: // `git config --bool --add hooks.stopCommitOfNonVfmtedVFiles true` -// ... to make it just *prevent* the commiting of unformatted .v files, -// i.e. stop the commiting, if they are not, but *without modifying them* +// ... to make it just *prevent* the committing of unformatted .v files, +// i.e. stop the committing, if they are not, but *without modifying them* // automatically (you will then need to run `v fmt -w` on them manually). // // Note 2: Git supports skipping the hooks, by passing the `--no-verify` option. @@ -24,7 +24,7 @@ import term // the hook. fn main() { - // This hook cares only about the changed V files, that will be commited, as reported by git itself: + // This hook cares only about the changed V files, that will be committed, as reported by git itself: changed := os.execute('git diff --cached --name-only --diff-filter=ACMR -- "*.v" "*.vsh" "*.vv"') all_changed_vfiles := changed.output.trim_space().split('\n') @@ -43,8 +43,8 @@ fn main() { eprintln('>>> 0 changed V files, that may need formatting found.') exit(0) } - configured_stop_commiting := os.execute('git config --bool hooks.stopCommitOfNonVfmtedVFiles') - if configured_stop_commiting.output.trim_space().bool() { + configured_stop_committing := os.execute('git config --bool hooks.stopCommitOfNonVfmtedVFiles') + if configured_stop_committing.output.trim_space().bool() { verify_result := os.execute('v fmt -verify ${vfiles.join(' ')}') if verify_result.exit_code != 0 { eprintln(verify_result.output) diff --git a/cmd/tools/modules/testing/common.v b/cmd/tools/modules/testing/common.v index dbf73a972e..6e0f83e0b4 100644 --- a/cmd/tools/modules/testing/common.v +++ b/cmd/tools/modules/testing/common.v @@ -723,7 +723,7 @@ pub fn setup_new_vtmp_folder() string { pub struct TestDetails { pub mut: retry int - flaky bool // when flaky tests fail, the whole run is still considered successfull, unless VTEST_FAIL_FLAKY is 1 + flaky bool // when flaky tests fail, the whole run is still considered successful, unless VTEST_FAIL_FLAKY is 1 } pub fn get_test_details(file string) TestDetails { diff --git a/cmd/tools/repeat.v b/cmd/tools/repeat.v index 0624b18912..6a6b723e1c 100644 --- a/cmd/tools/repeat.v +++ b/cmd/tools/repeat.v @@ -276,9 +276,9 @@ fn (mut context Context) run() { eprintln('${i:10} non 0 exit code for cmd: ${cmd}') continue } - trimed_output := res.output.trim_right('\r\n') - trimed_normalized := trimed_output.replace('\r\n', '\n') - lines := trimed_normalized.split('\n') + trimmed_output := res.output.trim_right('\r\n') + trimmed_normalized := trimmed_output.replace('\r\n', '\n') + lines := trimmed_normalized.split('\n') for line in lines { context.results[icmd].outputs << line } diff --git a/cmd/tools/vast/test/demo.v b/cmd/tools/vast/test/demo.v index d08e9a8475..58a0690337 100644 --- a/cmd/tools/vast/test/demo.v +++ b/cmd/tools/vast/test/demo.v @@ -60,7 +60,7 @@ interface Myinterfacer { sub(int, int) int } -// main funciton +// main function fn main() { add(1, 3) println(add(1, 2)) diff --git a/cmd/tools/vbug.v b/cmd/tools/vbug.v index 8adec5973b..d6daabb82b 100644 --- a/cmd/tools/vbug.v +++ b/cmd/tools/vbug.v @@ -16,7 +16,7 @@ fn get_vdoctor_output(is_verbose bool) string { return result.output } -// get ouput from `v -g -o vdbg cmd/v && vdbg file.v` +// get output from `v -g -o vdbg cmd/v && vdbg file.v` fn get_v_build_output(is_verbose bool, is_yes bool, file_path string) string { mut vexe := os.getenv('VEXE') // prepare a V compiler with -g to have better backtraces if possible diff --git a/cmd/tools/vcheck-md.v b/cmd/tools/vcheck-md.v index a688f877e6..222f90faea 100644 --- a/cmd/tools/vcheck-md.v +++ b/cmd/tools/vcheck-md.v @@ -265,7 +265,7 @@ fn (mut f MDFile) parse_line(lnumber int, line string) { struct Headline { line int - lable string + label string level int } @@ -277,7 +277,7 @@ type AnchorTarget = Anchor | Headline struct AnchorLink { line int - lable string + label string } struct AnchorData { @@ -287,7 +287,7 @@ mut: } fn (mut ad AnchorData) add_links(line_number int, line string) { - query := r'\[(?P[^\]]+)\]\(\s*#(?P[a-z0-9\-\_\x7f-\uffff]+)\)' + query := r'\[(?P