We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
actual result with empty rule: error: missing field id
rules.yaml
id: rule_1 language: Python rule: pattern: 'aaa' fix: 'bbb' --- id: rule_2 language: Python rule: pattern: 'ccc' fix: 'ddd' ---
similar: trailing commas in array declarations
allowing empty rules would be useful for generating rules.yaml in a for loop
#!/usr/bin/env bash rules_yaml="" rule_id=0 function r() { rules_yaml+=$( echo echo echo "id: rule_$rule_id" echo "language: javascript" echo "rule:" echo " pattern: '$1'" echo "fix: '$2'" echo echo "---" # rule separator ) rule_id=$((rule_id + 1)) } r 'nt' sleep r 'an' firebaseApiKey r 'on' typesenseServer # fix: error: missing field id rules_yaml=${rules_yaml:0: -4} # debug: print rules yaml echo "rules_yaml:"; echo "$rules_yaml" | grep -n '' ast-grep scan -U -r <(echo "$rules_yaml") src/patchme.js
The text was updated successfully, but these errors were encountered:
After some thoughts I think this feature should be supported by serde-yaml or yaml.rs, instead of ast-grep.
Feel free to open issue there~
Sorry, something went wrong.
No branches or pull requests
actual result with empty rule: error: missing field id
rules.yaml
similar: trailing commas in array declarations
allowing empty rules would be useful for generating rules.yaml in a for loop
The text was updated successfully, but these errors were encountered: