Skip to content

Commit

Permalink
chore: Update ast-grep rule
Browse files Browse the repository at this point in the history
  • Loading branch information
last-partizan committed Nov 16, 2023
1 parent 965aea3 commit 625e4ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ All notable changes to this project will be documented in this file. See [standa
```
ast-grep scan -r sg-rules/0.6.0-rewrite-blank.yml . -i
```
It's not 100% safe, as it can introduce `,,` in your code, so be careful to
review, clean it up and test.
Be careful to review, clean it up and test.

* Switch to mongoengine style field arguments. Drop old django ([#200](https://github.com/MongoEngine/django-mongoengine/issues/200)) ([9d56f6a](https://github.com/MongoEngine/django-mongoengine/commit/9d56f6a58ccee93e2acae7af0a8d81d9aa43ae5b))

Expand Down
2 changes: 1 addition & 1 deletion sg-rules/0.6.0-rewrite-blank.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ transform:
MAYBE_COMMA:
replace:
source: $$$A
replace: '^.+'
replace: '^.+[^,]$'
by: ', '
fix: fields.$C($$$A$MAYBE_COMMArequired=True)

0 comments on commit 625e4ee

Please sign in to comment.