Skip to content

Commit

Permalink
Revert "feat: new ai_rewrite function for full-file rewrites (#216)"
Browse files Browse the repository at this point in the history
This reverts commit 211b373.
  • Loading branch information
morgante authored Jul 23, 2024
1 parent 211b373 commit a19b422
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 587 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
with:
go-version: '^1.22.0'

- name: Install Grit
run: npm install -g @getgrit/cli
- name: Install @getgrit/launcher
run: npm install -g @getgrit/launcher

- name: Run doctor
run: grit doctor
Expand All @@ -74,7 +74,7 @@ jobs:
- name: Run grit patterns test
run: |
if [ -n "${{ secrets.API_CLIENT_ID }}" ] && [ -n "${{ secrets.API_CLIENT_SECRET }}" ]; then
grit patterns test --exclude flaky
grit patterns test --exclude ai
else
grit patterns test --exclude ai
fi
5 changes: 1 addition & 4 deletions .grit/patterns/js/marzano.grit
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ private pattern before_each_file_stdlib() {
}

private pattern after_each_file_stdlib() {
and {
after_each_file_handle_imports(),
after_each_file_global_rewrites()
}
after_each_file_handle_imports()
}


Expand Down
3 changes: 2 additions & 1 deletion .grit/patterns/js/no_commented_out_code.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
tags: [hidden, linting, best-practice, recommended, ai, flaky]
tags: [hidden, linting, best-practice, recommended, ai]
---

# No Commented Out Code

Please [don't commit commented out code](https://kentcdodds.com/blog/please-dont-commit-commented-out-code).


```grit
engine marzano(0.1)
language js
Expand Down
3 changes: 2 additions & 1 deletion .grit/patterns/universal/ai/_ai_is_bare.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
tags: [ai, sample, util, hidden, flaky]
tags: [ai, sample, util, hidden]
---

# AI conditions.

Test `ai_is` with no counter-examples.


```grit
`console.log($msg)` => `// REDACTED: $msg` where {
$msg <: ai_is("references personally identifiable information")
Expand Down
3 changes: 2 additions & 1 deletion .grit/patterns/universal/ai/_ai_match.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
---
tags: [ai, sample, util, hidden, flaky]
tags: [ai, sample, util, hidden]
---

# AI conditions.

GritQL can use an AI for fuzzy matching. Just match the node you wish to analyze against the `ai_is` pattern.


```grit
`console.log($msg)` => `// REDACTED: $msg` where {
$msg <: ai_is("it references personally identifiable information")
Expand Down
263 changes: 0 additions & 263 deletions .grit/patterns/universal/ai/_ai_rewrite.md

This file was deleted.

Loading

0 comments on commit a19b422

Please sign in to comment.