TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Comby - Structural code search and replace for every language

196 点作者 WallyFunk大约 3 年前

9 条评论

feanaro大约 3 年前
A more interesting comparison than with Coccinelle is with semgrep (<a href="https:&#x2F;&#x2F;semgrep.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;semgrep.dev&#x2F;</a>) since it also supports semantic&#x2F;structural pattern matching over a number of languages, but also adds in a bunch of Boolean logic into the mix, as well as some more advanced semantic features like constant propagation.<p>Curious whether the teams behind these tools are aware of each other? I suppose it&#x27;s unlikely that they&#x27;re not.
评论 #31416810 未加载
评论 #31415504 未加载
kretaceous大约 3 年前
Okay wow. I didn&#x27;t tools like this existed! There&#x27;s been more than once where I&#x27;ve found myself in a situation like &quot;find all code like this, change if this, delete if this&quot;. Regex can only get you so far.<p>Does someone know if this or something similar is available as a VSCode extension? It&#x27;d be fun to make one if not!
评论 #31417295 未加载
评论 #31415320 未加载
adamesque大约 3 年前
I believe Sourcegraph uses Comby under the hood to an extent for structural matching as well!
评论 #31416202 未加载
picardo大约 3 年前
Superb tool. I used Comby to create a massive (3000+ changes) PR in which I ported JS type annotations into TS typings.
slightknack大约 3 年前
I mocked up a prototype for something similar to this using TreeSitter and its query language the other day for some heavy refactoring I had to do. This looks like a really cool project, will have to try it out!
CrazyPyroLinux大约 3 年前
This looks a lot like <a href="https:&#x2F;&#x2F;semgrep.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;semgrep.dev&#x2F;</a> Interesting that they are both largely OCaml.
评论 #31415082 未加载
marcodiego大约 3 年前
License?<p>Also, how does it compare to Coccinelle?
评论 #31414844 未加载
jedisct1大约 3 年前
No support for Zig :(
评论 #31423892 未加载
otherflavors大约 3 年前
s&#x2F;every language&#x2F;some languages&#x2F;