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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Looking for a tool

4 点作者 szatkus将近 8 年前
I&#x27;m not even sure what to type in Google.<p>Let&#x27;s say I have a commit. I want a tool which analyzes codebase and show all places in code which could be affected by this commit. For example if I change a function X the tool will show all places which depends on a result of the function.<p>I guess that in Java it could be doable because of its strict nature. Is there anything like this? Or it&#x27;s an idea for a side-project?

6 条评论

gvisoc将近 8 年前
That particular sub-area of static analysis is called (change) impact analysis. If you google that you&#x27;ll find several tools, but many of those results are a couple of years old, or framework-specific. Take a look and good luck.
remyp将近 8 年前
Good test coverage goes a long way towards solving this problem.
BjoernKW将近 8 年前
It&#x27;s called static analysis, which given JavaScript&#x27;s dynamic nature obviously doesn&#x27;t work as well as with statically-typed languages like Java. However, IntelliJ IDEA or WebStorm offer decent analysis tools for JavaScript as well. In IntelliJ IDEA &quot;Find usages&quot; is the name of the feature you&#x27;re looking for.
评论 #15045439 未加载
评论 #15045373 未加载
paradite将近 8 年前
You can definitely write a tool to do it for JavaScript.<p>Sublime text has something similar that gives you the usages of a function when you hover over its name. Its not as 100 percent accurate as strict static code analysis, but it works pretty well for function names that are not duplicated everywhere.
stephenr将近 8 年前
What language is your project? Jetbrains IDEs have static analysis based &quot;find usage&quot; for dynamic languages like php.
rawland将近 8 年前
<p><pre><code> grep -inr &#x27;X&#x27; </code></pre> Can be expanded via regex, awk, etc...
评论 #15045492 未加载