1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

increase the name limit to 15

This commit is contained in:
Alexander Medvednikov 2019-12-16 19:36:29 +03:00
parent bcde155da7
commit 10718557a2

View File

@ -894,7 +894,7 @@ fn good_type_name(s string) bool {
// registration_date good // registration_date good
// registrationdate bad // registrationdate bad
fn (s &Scanner) validate_var_name(name string) { fn (s &Scanner) validate_var_name(name string) {
if name.len > 11 && !name.contains('_') { if name.len > 15 && !name.contains('_') {
s.error('bad variable name `$name`\n' + s.error('bad variable name `$name`\n' +
'looks like you have a multi-word name without separating them with `_`' + 'looks like you have a multi-word name without separating them with `_`' +
'\nfor example, use `registration_date` instead of `registrationdate` ') '\nfor example, use `registration_date` instead of `registrationdate` ')