Java code commit impact analysis, is a pure python library that analyzes the impact of two git submissions of Java projects on the project and generates tree chart data.
Github: jcci
Start a new python project, add a new python file, code example:
from jcci.analyze import JCCI
# Compare different commits on the same branch
commit_analyze = JCCI('[email protected]', 'username1')
commit_analyze.analyze_two_commit('master','commit_id1','commit_id2')
# To analyze the impact of methods in a class, use the analyze_class_method method. The last parameter is the line number(s) of the method(s) you want to analyze. If multiple methods are specified, separate their line numbers with commas. If left blank, it will analyze the impact of the entire class.
class_analyze = JCCI('[email protected]', 'username1')
class_analyze.analyze_class_method('master','commit_id1', 'package\src\main\java\ClassA.java', '20,81')
# Compare different branches
branch_analyze = JCCI('[email protected]', 'username1')
branch_analyze.analyze_two_branch('branch_new','branch_old')
At the same time, the project will be cloned in the directory and then analyzed to generate a file with the suffix format xxxx.cci, which contains the tree diagram data generated by the analysis results, download jcci-result.html , upload analyze result file end with .cci, then can be displayed through the view.