Skip to content

[feature] allow sgconfig.yml to not have required ruleDirs fieldΒ #2059

@khromov

Description

@khromov

Please read the FAQ for the bug you encountered.

  • I have read the existing FAQ

⏯ Playground Link

πŸ’» Code

languageGlobs:
  html: ['*.vue', '*.svelte', '*.astro']
  json: ['.eslintrc']

πŸ™ Actual behavior

 ast-grep  -p "Article"
Error: Cannot parse configuration
Help: The sgconfig.yml is not a valid configuration file. Please refer to doc and fix the error.
See also: https://ast-grep.github.io/reference/sgconfig.html

βœ– Caused by
β•°β–» missing field `ruleDirs`

πŸ™‚ Expected behavior

ast-grep to work. It seems to work if you add an empty ruleDirs key.

Additional information about the issue

ast-grep --version
ast-grep 0.38.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions