Skip to content

Commit 220bb9d

Browse files
authored
Merge pull request #218 from vim-volt/kind-config-func-warning
Fix warning message of s:config() function is found in plugconf files
2 parents 2c368c2 + ef6dc00 commit 220bb9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugconf/plugconf.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,9 @@ func ParsePlugconf(file *ast.File, src []byte, path string) (*ParsedInfo, *Parse
346346
return true
347347
}
348348
parseErr.mwarn = multierror.Append(parseErr.mwarn,
349-
errors.New("s:config() is deprecated. please use s:on_load_pre() instead"))
349+
errors.New("s:config() is deprecated. "+
350+
"please use s:on_load_pre() instead, or run "+
351+
"\"volt migrate plugconf/config-func\" to rewrite existing plugconf files"))
350352
if !isEmptyFunc(fn) {
351353
onLoadPreFunc = string(extractBody(fn, src))
352354
onLoadPreFunc = rxFuncName.ReplaceAllString(

0 commit comments

Comments
 (0)