diff --git a/vlib/v/builder/builder.v b/vlib/v/builder/builder.v index 2c3afd67bd..d3f1f6a225 100644 --- a/vlib/v/builder/builder.v +++ b/vlib/v/builder/builder.v @@ -62,7 +62,7 @@ pub fn new_builder(pref &pref.Preferences) Builder { $if windows { msvc = find_msvc(pref.m64) or { if pref.ccompiler == 'msvc' { - // verror('Cannot find MSVC on this OS') + // verror('cannot find MSVC on this OS') } MsvcResult{ valid: false diff --git a/vlib/v/builder/msvc_windows.v b/vlib/v/builder/msvc_windows.v index 6c6bed6b61..76e5d3564c 100644 --- a/vlib/v/builder/msvc_windows.v +++ b/vlib/v/builder/msvc_windows.v @@ -253,7 +253,7 @@ fn find_msvc(m64_target bool) !MsvcResult { pub fn (mut v Builder) cc_msvc() { r := v.cached_msvc if r.valid == false { - verror('Cannot find MSVC on this OS') + verror('cannot find MSVC on this OS') } out_name_obj := os.real_path(v.out_name_c + '.obj') out_name_pdb := os.real_path(v.out_name_c + '.pdb') @@ -368,7 +368,7 @@ pub fn (mut v Builder) cc_msvc() { // Also the double quotes at the start ARE needed. v.show_cc(cmd, out_name_cmd_line, args) if os.user_os() != 'windows' && !v.pref.out_name.ends_with('.c') { - verror('Cannot build with msvc on ${os.user_os()}') + verror('cannot build with msvc on ${os.user_os()}') } util.timing_start('C msvc') res := os.execute(cmd) @@ -391,7 +391,7 @@ pub fn (mut v Builder) cc_msvc() { fn (mut v Builder) build_thirdparty_obj_file_with_msvc(mod string, path string, moduleflags []cflag.CFlag) { msvc := v.cached_msvc if msvc.valid == false { - verror('Cannot find MSVC on this OS') + verror('cannot find MSVC on this OS') } // msvc expects .obj not .o path_without_o_postfix := path[..path.len - 2] // remove .o diff --git a/vlib/v/checker/assign.v b/vlib/v/checker/assign.v index da198c674d..8cd2f7e9f9 100644 --- a/vlib/v/checker/assign.v +++ b/vlib/v/checker/assign.v @@ -273,7 +273,7 @@ pub fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) { if left_type in ast.unsigned_integer_type_idxs { if mut right is ast.IntegerLiteral { if right.val[0] == `-` { - c.error('Cannot assign negative value to unsigned integer type', + c.error('cannot assign negative value to unsigned integer type', right.pos) } } @@ -324,7 +324,7 @@ pub fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) { if left_type in ast.unsigned_integer_type_idxs { if mut right is ast.IntegerLiteral { if right.val[0] == `-` { - c.error('Cannot assign negative value to unsigned integer type', + c.error('cannot assign negative value to unsigned integer type', right.pos) } } diff --git a/vlib/v/checker/orm.v b/vlib/v/checker/orm.v index fafa002efd..8836701184 100644 --- a/vlib/v/checker/orm.v +++ b/vlib/v/checker/orm.v @@ -18,7 +18,7 @@ fn (mut c Checker) sql_expr(mut node ast.SqlExpr) ast.Type { c.cur_orm_ts = old_ts } if sym.info !is ast.Struct { - c.error('The table symbol `${sym.name}` has to be a struct', node.table_expr.pos) + c.error('the table symbol `${sym.name}` has to be a struct', node.table_expr.pos) return ast.void_type } info := sym.info as ast.Struct @@ -106,7 +106,7 @@ fn (mut c Checker) sql_expr(mut node ast.SqlExpr) ast.Type { if node.or_expr.kind == .block { if node.or_expr.stmts.len == 0 { - c.error('Or block needs to return a default value', node.or_expr.pos) + c.error('or block needs to return a default value', node.or_expr.pos) } if node.or_expr.stmts.len > 0 && node.or_expr.stmts.last() is ast.ExprStmt { c.expected_or_type = node.typ diff --git a/vlib/v/checker/struct.v b/vlib/v/checker/struct.v index 82192c3496..29b1146176 100644 --- a/vlib/v/checker/struct.v +++ b/vlib/v/checker/struct.v @@ -127,7 +127,7 @@ pub fn (mut c Checker) struct_decl(mut node ast.StructDecl) { if field.typ in ast.unsigned_integer_type_idxs { if field.default_expr is ast.IntegerLiteral { if field.default_expr.val[0] == `-` { - c.error('Cannot assign negative value to unsigned integer type', + c.error('cannot assign negative value to unsigned integer type', field.default_expr.pos) } } @@ -493,7 +493,7 @@ pub fn (mut c Checker) struct_init(mut node ast.StructInit) ast.Type { if field_info.typ in ast.unsigned_integer_type_idxs { if mut field.expr is ast.IntegerLiteral { if field.expr.val[0] == `-` { - c.error('Cannot assign negative value to unsigned integer type', + c.error('cannot assign negative value to unsigned integer type', field.expr.pos) } } diff --git a/vlib/v/checker/tests/negative_assign_to_unsigned.out b/vlib/v/checker/tests/negative_assign_to_unsigned.out index 19274475f0..1d2427e6f9 100644 --- a/vlib/v/checker/tests/negative_assign_to_unsigned.out +++ b/vlib/v/checker/tests/negative_assign_to_unsigned.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/negative_assign_to_unsigned.vv:3:9: error: Cannot assign negative value to unsigned integer type +vlib/v/checker/tests/negative_assign_to_unsigned.vv:3:9: error: cannot assign negative value to unsigned integer type 1 | fn main() { 2 | mut u := u32(10) 3 | u = -10 diff --git a/vlib/v/checker/tests/orm_no_default_value.out b/vlib/v/checker/tests/orm_no_default_value.out index de33096b39..707e137b3c 100644 --- a/vlib/v/checker/tests/orm_no_default_value.out +++ b/vlib/v/checker/tests/orm_no_default_value.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/orm_no_default_value.vv:11:4: error: Or block needs to return a default value +vlib/v/checker/tests/orm_no_default_value.vv:11:4: error: or block needs to return a default value 9 | _ := sql db { 10 | select from Person 11 | } or { diff --git a/vlib/v/checker/tests/orm_not_a_struct.out b/vlib/v/checker/tests/orm_not_a_struct.out index 5468aba794..3948231c32 100644 --- a/vlib/v/checker/tests/orm_not_a_struct.out +++ b/vlib/v/checker/tests/orm_not_a_struct.out @@ -1,4 +1,4 @@ -vlib/v/checker/tests/orm_not_a_struct.vv:10:15: error: The table symbol `Person` has to be a struct +vlib/v/checker/tests/orm_not_a_struct.vv:10:15: error: the table symbol `Person` has to be a struct 8 | db := sqlite.connect(':memory:')! 9 | _ := sql db { 10 | select from Person diff --git a/vlib/v/checker/tests/struct_field_unsign_type_check_err.out b/vlib/v/checker/tests/struct_field_unsign_type_check_err.out index 9695fa2281..e38ae5c591 100644 --- a/vlib/v/checker/tests/struct_field_unsign_type_check_err.out +++ b/vlib/v/checker/tests/struct_field_unsign_type_check_err.out @@ -1,18 +1,18 @@ -vlib/v/checker/tests/struct_field_unsign_type_check_err.vv:3:10: error: Cannot assign negative value to unsigned integer type +vlib/v/checker/tests/struct_field_unsign_type_check_err.vv:3:10: error: cannot assign negative value to unsigned integer type 1 | struct Foo { 2 | mut: 3 | n u32 = -1 | ~~ 4 | } 5 | -vlib/v/checker/tests/struct_field_unsign_type_check_err.vv:8:6: error: Cannot assign negative value to unsigned integer type +vlib/v/checker/tests/struct_field_unsign_type_check_err.vv:8:6: error: cannot assign negative value to unsigned integer type 6 | fn main() { 7 | mut foo := Foo{ 8 | n: -1 | ~~ 9 | } 10 | -vlib/v/checker/tests/struct_field_unsign_type_check_err.vv:11:10: error: Cannot assign negative value to unsigned integer type +vlib/v/checker/tests/struct_field_unsign_type_check_err.vv:11:10: error: cannot assign negative value to unsigned integer type 9 | } 10 | 11 | foo.n = -1 diff --git a/vlib/v/gen/js/fn.v b/vlib/v/gen/js/fn.v index f8fff9eb76..75b4574142 100644 --- a/vlib/v/gen/js/fn.v +++ b/vlib/v/gen/js/fn.v @@ -638,7 +638,7 @@ fn (mut g JsGen) gen_method_decl(it ast.FnDecl, typ FnGenType) { for attr in it.attrs { if attr.name == 'async' { if g.pref.output_es5 { - verror('Cannot use [async] attribute when outputing ES5 source code') + verror('cannot use [async] attribute when outputing ES5 source code') } has_go = true break diff --git a/vlib/v/parser/struct.v b/vlib/v/parser/struct.v index ef5dedc5e7..f63dacdc4b 100644 --- a/vlib/v/parser/struct.v +++ b/vlib/v/parser/struct.v @@ -599,7 +599,7 @@ fn (mut p Parser) interface_decl() ast.InterfaceDecl { from_mod_typ := p.parse_type() from_mod_name := '${mod_name}.${p.prev_tok.lit}' if from_mod_name.is_lower() { - p.error_with_pos('The interface name need to have the pascal case', p.prev_tok.pos()) + p.error_with_pos('the interface name need to have the pascal case', p.prev_tok.pos()) break } comments := p.eat_comments()