increase the name limit to 15

pull/3119/head
Alexander Medvednikov 2019-12-16 19:36:29 +03:00
parent bcde155da7
commit 10718557a2
1 changed files with 1 additions and 1 deletions

View File

@ -894,7 +894,7 @@ fn good_type_name(s string) bool {
// registration_date good
// registrationdate bad
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' +
'looks like you have a multi-word name without separating them with `_`' +
'\nfor example, use `registration_date` instead of `registrationdate` ')