Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get code file version diff showing methods (names) impacted

I want to get a diff between two versions of a code file (of the Java/C#) variety - and from that get a list of methods (names) impacted. Has this been implemented?

I presume this would require an AST Analysis of the lines that come back from the diff.

The point of this would be to refine checkstyle/findbugs to just work on the methods touched during a Sprint.

I had a look at eclipse's process for doing a diff:

http://dev.eclipse.org/viewsvn/index.cgi/org.eclipse.compare.tests/src/org/eclipse/compare/tests/

It looks like it just works on line number - not an actual AST. I'm interested in the line#=>methodName mapping.

like image 436
hawkeye Avatar asked Mar 14 '26 21:03

hawkeye


1 Answers

You can use the compare api of eclipse, even without using eclipse itself. Search org.eclipse.compare

like image 173
Fortega Avatar answered Mar 16 '26 11:03

Fortega



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!