Recommend this page to a friend! |
Classes of DeGraciaMathieu | PHP GIT Insights Analyzer | README.md | Download |
|
Download <p align="center"> <img src="https://github.com/DeGraciaMathieu/php-smelly-code-detector/blob/master/arts/robot.png" width="250"> </p> php-git-insights-analyzerPharThis tool is distributed as a PHP Archive (PHAR):
UsageFirst, you need to load the data required for the analysis :
Package uses git commands to retrieve files history, which is relatively time-consuming, so it was more efficient to create a database before carrying out the analyses. > For information, database is stored in the analyse.json Then analyse the data using the following command :
Understanding analysis : | Abbreviation | Metric | Description | | ------------ | ------------------------------ | ------------------------------------------------------------------------------ | | comm. | Commits | Number of file commits. | | cont. | Contributors | Number of distinct contributors. | | acs | Average Commit Size | Average size of file commits. | | acsr | Average Commit Size Ratio | Proportion of average commit size compared to the total file size. | | wpc | Workload Per Contributor | Average size of a contributor's commits. | | wpcr | Workload Per Contributor Ratio | Proportion of average contributor commit size compared to the total file size. | Options| Options | Description | |-----------------------|-------------| | --folder= | Filter results by folder (e.g., --folder=Http/Controllers).| | --limit= | Specify the maximum number of results to display (default is 10).| | --sorts= | Sets the sorting order for results. The first value (lines, commits, contributors, acs, acsr, wpc, wpcr) corresponds to the affected field, and the second value (desc,asc; default desc) determines the sorting order.| | --thresholds= | Sets a threshold for the specified metric to filter results. The first value (lines, commits, contributors, acs, acsr, wpc, wpcr) corresponds to the affected metric, and the second value (e.g., 60) represents the minimum value required to apply the threshold.| ExamplesFiles with more than 300 lines and low contributor diversity :
Files with more than 10 commits and low contributor diversity :
File with more than 10 commits and a renewal ratio of 10% with each commit.
> [!TIP] > Other analysis tools are available. |