@@ -8,6 +8,7 @@ const DOC_SITE_HOST: &str = "https://ast-grep.github.io";
8
8
const PATTERN_GUIDE : Option < & str > = Some ( "/guide/pattern-syntax.html" ) ;
9
9
const CONFIG_GUIDE : Option < & str > = Some ( "/guide/rule-config.html" ) ;
10
10
const CONFIG_REFERENCE : Option < & str > = Some ( "/reference/sgconfig.html" ) ;
11
+ const PROJECT_GUIDE : Option < & str > = Some ( "/guide/scan-project.html" ) ;
11
12
const TOOL_OVERVIEW : Option < & str > = Some ( "/guide/tooling-overview.html#parse-code-from-stdin" ) ;
12
13
const CLI_USAGE : Option < & str > = Some ( "/reference/cli.html" ) ;
13
14
const TEST_GUIDE : Option < & str > = Some ( "/guide/test-rule.html" ) ;
@@ -233,12 +234,12 @@ impl ErrorMessage {
233
234
ProjectAlreadyExist => Self :: new (
234
235
"ast-grep project already exists." ,
235
236
"You are already inside a sub-folder of an ast-grep project. Try finding sgconfig.yml in ancestor directory?" ,
236
- CONFIG_GUIDE ,
237
+ PROJECT_GUIDE ,
237
238
) ,
238
239
ProjectNotExist => Self :: new (
239
- "Fail to create the item because no project configuration is found." ,
240
- "You need to create an ast-grep project before creating rule . Try `sg new` to create one." ,
241
- CONFIG_GUIDE ,
240
+ "No ast-grep project configuration is found." ,
241
+ "You need to create an ast-grep project for this command . Try `sg new` to create one." ,
242
+ PROJECT_GUIDE ,
242
243
) ,
243
244
FileAlreadyExist ( path) => Self :: new (
244
245
format ! ( "File `{}` already exists." , path. display( ) ) ,
0 commit comments