ast-grep: [bug] Unable to make ast-grep scan work with ignored rules in VCS
Please read the FAQ for the bug you encountered.
- I have read the existing FAQ
β― Playground Link
N/A
π» Code
// Your code here
π Actual behavior
I have a use case where I want to generate some rules outside of VCS (the point being that we want to enforce some import restrictions, with certain file paths excluded according to our own guidelines).
I donβt want to check in tons of generated files in git, but if I exclude the rules in git, theyβre no longer picked up by ast-grep scan.
π Expected behavior
ast-grep scan should not take .gitignore contents into account when discovering rules (only when deciding on which files to run those rules against).
Additional information about the issue
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (8 by maintainers)
@HerringtonDarkholme I tried
--no-ignore=vcsbut this still doesnβt pick up the rules. It seems this only applies to discovery for the files the rules are running against and not the rules that are being discovered byast-grep scan.