Skip to content

PFCCLab/ast-grep-pre-commit-mirror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ast-grep-pre-commit-mirror

ast-grep pre-commit hook that uses the PyPI distribution for seamless integration with Python projects.

Usage

Add this to your .pre-commit-config.yaml:

- repo: https://github.com/PFCCLab/ast-grep-pre-commit-mirror
  rev: v0.40.0
  hooks:
    - id: ast-grep

Auto-fix code issues

- id: ast-grep
  args: ["--update-all"]

Custom configuration

- id: ast-grep
  args: ["--config", "ast-grep/sgconfig.yml"]

Writing Rules

ast-grep uses AST pattern matching to search and rewrite code:

About

ast-grep pre-commit hook that uses the PyPI distribution for seamless integration with Python projects.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages