Technology Radar
Published : Oct 27, 2021
NOT ON THE CURRENT EDITION
This blip is not on the current edition of the Radar. If it was on one of the last few editions, it is likely that it is still relevant. If the blip is older, it might no longer be relevant and our assessment might be different today. Unfortunately, we simply don't have the bandwidth to continuously review blips from previous editions of the Radar.
Understand more
Oct 2021
Assess
本期技术雷达引入了两款使用抽象语法树表示进行搜索和替换代码的工具。它们与jscodeshift有相似的定位,但包含适用于多种编程语言的解析器。尽管它们有一些相似之处,但它们在某些方面还是有所不同。其中 Comby 工具的独特之处,在于其简单的命令行界面,该命令行界面是根据awk和sed等Unix工具的精神设计的。虽然 Unix 命令基于操作匹配文本的正则表达式,但 Comby 使用特定于编程语言结构的模式语法,并在搜索之前解析代码。这有助于开发人员在大型代码库中搜索结构模式。和sed一样,Comby 可以用新的结构替换它匹配的模式。这对于大型代码库进行自动批量更改,或在一组微服务存储库中进行重复更改非常有用。由于这些工具相当新,我们希望看到一系列尚未发现的创造性用途。