You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/advanced/tool-comparison.md
+20-19
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ The author is grateful to these predecessor tools for inspiring ast-grep! The re
9
9
## ast-grep
10
10
11
11
**Pros**:
12
-
* It is very performant. It uses ignore to do multi-thread processing, which makes it utilize all your CPU cores.
12
+
* It is very performant. It uses [ignore](https://docs.rs/ignore/latest/ignore/) to do multi-thread processing, which makes it utilize all your CPU cores.
13
13
* It is language aware. It uses tree-sitter, a real parser, to parse the code into ASTs, which enables more precise and accurate matching and fixing.
14
14
* It has a powerful and flexible rule system. It allows you to write patterns, AST types and regular expressions to match code. It provides operators to compose complex matching rules for various scenarios.
15
15
* It can be used as a lightweight CLI tool or as a library, depending on your usage. It has a simple and user-friendly interface, and it also exposes its core functionality as a library for other applications.
@@ -37,6 +37,18 @@ Semgrep is a well-established tool that uses code patterns to find and fix bugs
37
37
* It is relatively slow when used as command line tools.
38
38
* It cannot be used as a library in other applications, which may reduce its integration and customization options.
39
39
40
+
## [GritQL](https://about.grit.io/)
41
+
42
+
[GritQL](https://docs.grit.io/language/overview) language is [Grit](https://docs.grit.io/)'s embedded query language for searching and transforming source code.
43
+
44
+
**Pros**:
45
+
46
+
* GritQL is generally more powerful. It has features like [clause](https://docs.grit.io/language/modifiers) from [logic programming language](https://en.wikipedia.org/wiki/Logic_programming#:~:text=A%20logic%20program%20is%20a,Programming%20(ASP)%20and%20Datalog.) and [operations](https://docs.grit.io/language/conditions#match-condition) from imperative programming languages.
47
+
* It is used as [linter plugins](https://biomejs.dev/linter/plugins/) in [Biome](https://biomejs.dev/), a toolchain for JS ecosystem.
48
+
49
+
**Cons**:
50
+
* Depending on different background, developers may find it harder to learn a multi-paradigm DSL.
51
+
40
52
## [Comby](https://comby.dev/)
41
53
42
54
Comby is a fast and flexible tool that uses structural patterns to match and rewrite code across languages and file formats.
@@ -51,17 +63,6 @@ Comby is a fast and flexible tool that uses structural patterns to match and rew
51
63
* It does not support indentation-sensitive languages like Python or Haskell, which require special handling for whitespace and indentation.
52
64
* It is hard to write complex queries with Comby, such as finding a function that does not call another function. It does not support logical operators or filters for patterns.
53
65
54
-
## [Shisho](https://docs.shisho.dev/shisho)
55
-
Shisho is a new and promising tool that uses code patterns to search and manipulate code in various languages.
56
-
57
-
**Pros**:
58
-
* It offers fast and flexible rule composition using code patterns.
59
-
* It can handle multiple languages and files in parallel, and it has a simple and intuitive syntax for specifying patterns and filters.
60
-
61
-
**Cons**:
62
-
* It is still in development and it has limited language support compared to the other tools.
63
-
It currently supports only 3 languages, while the other tools support over 20 languages.
IntelliJ Structural Search Replace is not a standalone tool, but a feature of the IntelliJ IDE that allows users to search and replace code using structural patterns.
@@ -72,14 +73,14 @@ IntelliJ Structural Search Replace is not a standalone tool, but a feature of th
72
73
**Cons**:
73
74
* Currently, IntelliJ IDEA supports the structural search and replace for Java, Kotlin and Groovy.
74
75
75
-
## [GritQL](https://about.grit.io/)
76
-
77
-
[GritQL](https://docs.grit.io/language/overview) language is [Grit](https://docs.grit.io/)'s embedded query language for searching and transforming source code.
76
+
## [Shisho](https://docs.shisho.dev/shisho)
77
+
Shisho is a new and promising tool that uses code patterns to search and manipulate code in various languages.
78
78
79
79
**Pros**:
80
-
81
-
* GritQL is generally more powerful. It has features like [clause](https://docs.grit.io/language/modifiers) from [logic programming language](https://en.wikipedia.org/wiki/Logic_programming#:~:text=A%20logic%20program%20is%20a,Programming%20(ASP)%20and%20Datalog.) and [operations](https://docs.grit.io/language/conditions#match-condition) from imperative programming languages.
82
-
* It is used as [linter plugins](https://biomejs.dev/linter/plugins/) in [Biome](https://biomejs.dev/), a toolchain for JS ecosystem.
80
+
* It offers fast and flexible rule composition using code patterns.
81
+
* It can handle multiple languages and files in parallel, and it has a simple and intuitive syntax for specifying patterns and filters.
83
82
84
83
**Cons**:
85
-
* Depending on different background, developers may find it harder to learn a multi-paradigm DSL.
84
+
* It is still in development and it has limited language support compared to the other tools.
85
+
It currently supports only 3 languages, while the other tools support over 20 languages.
86
+
* The tool's parent company seems to have changed their business direction.
0 commit comments